Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 8, 2024
1 parent d5a05ff commit a302b15
Show file tree
Hide file tree
Showing 47 changed files with 92 additions and 56 deletions.
1 change: 1 addition & 0 deletions examples/PIL/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Usage:
python setup.py py2app
"""

from setuptools import setup

setup(
Expand Down
1 change: 1 addition & 0 deletions examples/PyObjC/ICSharingWatcher/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Usage:
python setup.py py2app
"""

from setuptools import setup

setup(
Expand Down
1 change: 1 addition & 0 deletions examples/PyObjC/TinyTinyEdit/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Usage:
python setup.py py2app
"""

from setuptools import setup

plist = {
Expand Down
1 change: 1 addition & 0 deletions examples/PyQt/hello_app/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Usage:
python setup.py py2app
"""

from distutils.core import setup

setup(
Expand Down
1 change: 1 addition & 0 deletions examples/PySide/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Usage:
python setup.py py2app
"""

from setuptools import setup

OPTIONS = {}
Expand Down
1 change: 1 addition & 0 deletions examples/PySide6/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Usage:
python setup.py py2app
"""

from setuptools import setup

OPTIONS = {}
Expand Down
1 change: 1 addition & 0 deletions examples/Tkinter/hello_tk/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Usage:
python setup.py py2app
"""

from setuptools import setup

setup(
Expand Down
1 change: 1 addition & 0 deletions examples/multiprocessing/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Usage:
python setup.py py2app
"""

from setuptools import setup

setup(
Expand Down
1 change: 1 addition & 0 deletions examples/pygame/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Usage:
python setup.py py2app
"""

from setuptools import setup

NAME = "aliens"
Expand Down
1 change: 1 addition & 0 deletions py2app_tests/basic_app_with_encoding/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
German for Lion is Löwe.
"""

import sys


Expand Down
6 changes: 3 additions & 3 deletions py2app_tests/test_app_with_ctypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def setUpClass(cls):
print(lines)
try:
os.waitpid(0, 0)
except os.error:
except OSError:
pass

raise AssertionError("Running sharedlib failed")
Expand All @@ -72,13 +72,13 @@ def setUpClass(cls):
print(lines)
try:
os.waitpid(0, 0)
except os.error:
except OSError:
pass
raise AssertionError("Creating basic_app bundle failed")

try:
os.waitpid(0, 0)
except os.error:
except OSError:
pass

@classmethod
Expand Down
7 changes: 4 additions & 3 deletions py2app_tests/test_app_with_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- add another test that does something simular, using virtualenv to
manage a python installation
"""

import glob
import hashlib
import os
Expand Down Expand Up @@ -93,7 +94,7 @@ def setUpClass(cls):
print("Creating basic_app extension failed")
try:
os.waitpid(0, 0)
except os.error:
except OSError:
pass
raise AssertionError("Creating basic_app extension failed")

Expand All @@ -114,13 +115,13 @@ def setUpClass(cls):
print("Creating basic_app bundle failed")
try:
os.waitpid(0, 0)
except os.error:
except OSError:
pass
raise AssertionError("Creating basic_app bundle failed")

try:
os.waitpid(0, 0)
except os.error:
except OSError:
pass

cls.checksums = make_checksums(os.path.join(cls.app_dir, "dist/BasicApp.app"))
Expand Down
1 change: 1 addition & 0 deletions py2app_tests/test_argv_emulation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Testcase for checking argv_emulation
"""

import os
import shutil
import subprocess
Expand Down
1 change: 1 addition & 0 deletions py2app_tests/test_basic_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- add another test that does something simular, using virtualenv to
manage a python installation
"""

import hashlib
import os
import shutil
Expand Down
1 change: 1 addition & 0 deletions py2app_tests/test_basic_app_with_encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- add another test that does something simular, using virtualenv to
manage a python installation
"""

import hashlib
import os
import shutil
Expand Down
9 changes: 5 additions & 4 deletions py2app_tests/test_basic_plugin.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Simular to test_basic_app, but for plugin bundles
"""

import os
import shutil
import signal
Expand Down Expand Up @@ -61,7 +62,7 @@ def setUpClass(cls):
print(lines)
try:
os.waitpid(0, 0)
except os.error:
except OSError:
pass
raise AssertionError("Creating basic_plugin bundle failed")

Expand All @@ -72,7 +73,7 @@ def setUpClass(cls):
if p.wait() != 0:
try:
os.waitpid(0, 0)
except os.error:
except OSError:
pass
raise AssertionError("Fetching Xcode root failed")

Expand Down Expand Up @@ -103,13 +104,13 @@ def setUpClass(cls):
print(lines)
try:
os.waitpid(0, 0)
except os.error:
except OSError:
pass
raise AssertionError("Creating bundle_loader failed")

try:
os.waitpid(0, 0)
except os.error:
except OSError:
pass

except: # noqa: E722, B001
Expand Down
1 change: 1 addition & 0 deletions py2app_tests/test_lsenvironment.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Testcase for checking argv_emulation
"""

import ast # noqa: F401
import os
import platform # noqa: F401
Expand Down
1 change: 1 addition & 0 deletions py2app_tests/test_package_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
See also issue #53 on the py2app tracker
"""

import hashlib
import os
import shutil
Expand Down
1 change: 1 addition & 0 deletions py2app_tests/test_pkg_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test case for a project that includes a script that has the same
base-name as a package used by the script.
"""

import os
import shutil
import signal
Expand Down
1 change: 1 addition & 0 deletions py2app_tests/test_setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Tests for typechecking of input arguments
"""

import os
import unittest

Expand Down
1 change: 1 addition & 0 deletions py2app_tests/test_shell_environment.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Testcase for checking emulate_shell_environment
"""

import os
import shutil
import subprocess
Expand Down
6 changes: 3 additions & 3 deletions py2app_tests/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def kill_child_processes():
continue
try:
os.kill(int(pid), sig)
except os.error:
except OSError:
pass

ps_command = subprocess.Popen("ps -ax", shell=True, stdout=subprocess.PIPE)
Expand All @@ -33,10 +33,10 @@ def kill_child_processes():
pid, _ = line.split(None, 1)
try:
os.kill(int(pid), sig)
except os.error:
except OSError:
pass

try:
os.waitpid(0, 0)
except os.error:
except OSError:
pass
1 change: 1 addition & 0 deletions src/py2app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@
dest_base - directory and basename for the executable
if a directory is contained, must be the same for all targets
"""

__version__ = "2.0a0"
3 changes: 1 addition & 2 deletions src/py2app/_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,7 @@ def add_plist(root: pathlib.Path, plist: Dict[str, Any], progress: Progress) ->

def add_bootstrap(
root: pathlib.Path, plist: Dict[str, Any], progress: Progress
) -> None:
...
) -> None: ...


def get_info_plist(bundle: BundleOptions) -> Dict[str, Any]:
Expand Down
6 changes: 3 additions & 3 deletions src/py2app/_pkg_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ def update_metadata_cache_distinfo(
if os.path.exists(fn):
with open(fn) as stream:
for line in stream:
infos[
os.path.realpath(os.path.join(dist_info_path, line.rstrip()))
] = dist_info_path
infos[os.path.realpath(os.path.join(dist_info_path, line.rstrip()))] = (
dist_info_path
)

fn = os.path.join(dist_info_path, "RECORD")
if os.path.exists(fn):
Expand Down
1 change: 1 addition & 0 deletions src/py2app/_recipedefs/stdlib.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Recipes related to the standard library
"""

from modulegraph2 import MissingModule, ModuleGraph

from .._config import RecipeOptions
Expand Down
1 change: 1 addition & 0 deletions src/py2app/_recipes.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- Non-goal (for now) is making it easy/possible to maintain
recipes out of tree.
"""

import dataclasses
import typing

Expand Down
6 changes: 2 additions & 4 deletions src/py2app/_setuptools_stub.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,9 @@ class Py2appDistribution(Distribution):
def __new__(self) -> "Py2appDistribution":
raise RuntimeError("Don't instantiate!") # pragma: no-cover

def get_version(self) -> str:
... # pragma: no-cover
def get_version(self) -> str: ... # pragma: no-cover

def get_name(self) -> str:
... # pragma: no-cover
def get_name(self) -> str: ... # pragma: no-cover


def finalize_distribution_options(dist: Py2appDistribution) -> None:
Expand Down
1 change: 1 addition & 0 deletions src/py2app/_standalone.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
XXX: Longer term this needs a complete rewrite, but
that requires rewriting macholib as well.
"""

import pathlib
import typing
from os import sep as PATH_SEP
Expand Down
2 changes: 1 addition & 1 deletion src/py2app/apptemplate/lib/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def addsitedir(sitedir: str) -> None:
sys.path.append(sitedir) # Add path component
try:
names = os.listdir(sitedir)
except os.error:
except OSError:
return
names.sort()
for name in names:
Expand Down
Loading

0 comments on commit a302b15

Please sign in to comment.