From a302b15a4c87075fab36313ac5aeede43826c872 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 16:50:27 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- examples/PIL/setup.py | 1 + examples/PyObjC/ICSharingWatcher/setup.py | 1 + examples/PyObjC/TinyTinyEdit/setup.py | 1 + examples/PyQt/hello_app/setup.py | 1 + examples/PySide/setup.py | 1 + examples/PySide6/setup.py | 1 + examples/Tkinter/hello_tk/setup.py | 1 + examples/multiprocessing/setup.py | 1 + examples/pygame/setup.py | 1 + py2app_tests/basic_app_with_encoding/main.py | 1 + py2app_tests/test_app_with_ctypes.py | 6 +-- py2app_tests/test_app_with_scripts.py | 7 +-- py2app_tests/test_argv_emulation.py | 1 + py2app_tests/test_basic_app.py | 1 + py2app_tests/test_basic_app_with_encoding.py | 1 + py2app_tests/test_basic_plugin.py | 9 ++-- py2app_tests/test_lsenvironment.py | 1 + py2app_tests/test_package_data.py | 1 + py2app_tests/test_pkg_script.py | 1 + py2app_tests/test_setup.py | 1 + py2app_tests/test_shell_environment.py | 1 + py2app_tests/tools.py | 6 +-- src/py2app/__init__.py | 1 + src/py2app/_builder.py | 3 +- src/py2app/_pkg_meta.py | 6 +-- src/py2app/_recipedefs/stdlib.py | 1 + src/py2app/_recipes.py | 1 + src/py2app/_setuptools_stub.py | 6 +-- src/py2app/_standalone.py | 1 + src/py2app/apptemplate/lib/site.py | 2 +- src/py2app/build_app.py | 48 ++++++++++---------- src/py2app/bundletemplate/lib/site.py | 2 +- src/py2app/converters/coredata.py | 1 + src/py2app/macho_audit.py | 9 ++-- src/py2app/progress.py | 1 + src/py2app/recipes/pyenchant.py | 1 + src/py2app/recipes/sip.py | 1 + src/py2app/recipes/stdlib_refs.py | 1 + src/py2app/recipes/virtualenv.py | 1 + src/py2app/util.py | 3 +- stubs/macholib/MachO.pyi | 1 + stubs/macholib/MachOGraph.pyi | 1 + stubs/macholib/MachOStandalone.pyi | 4 +- stubs/macholib/util.pyi | 1 + stubs/modulegraph/find_modules.pyi | 4 +- stubs/modulegraph/modulegraph.pyi | 1 + stubs/modulegraph/util.pyi | 1 + 47 files changed, 92 insertions(+), 56 deletions(-) diff --git a/examples/PIL/setup.py b/examples/PIL/setup.py index 189f7ff3..049419d6 100644 --- a/examples/PIL/setup.py +++ b/examples/PIL/setup.py @@ -4,6 +4,7 @@ Usage: python setup.py py2app """ + from setuptools import setup setup( diff --git a/examples/PyObjC/ICSharingWatcher/setup.py b/examples/PyObjC/ICSharingWatcher/setup.py index 9c05a918..b45a7232 100644 --- a/examples/PyObjC/ICSharingWatcher/setup.py +++ b/examples/PyObjC/ICSharingWatcher/setup.py @@ -4,6 +4,7 @@ Usage: python setup.py py2app """ + from setuptools import setup setup( diff --git a/examples/PyObjC/TinyTinyEdit/setup.py b/examples/PyObjC/TinyTinyEdit/setup.py index cfa6b5be..847cac52 100644 --- a/examples/PyObjC/TinyTinyEdit/setup.py +++ b/examples/PyObjC/TinyTinyEdit/setup.py @@ -4,6 +4,7 @@ Usage: python setup.py py2app """ + from setuptools import setup plist = { diff --git a/examples/PyQt/hello_app/setup.py b/examples/PyQt/hello_app/setup.py index b8b1ce6e..35711113 100644 --- a/examples/PyQt/hello_app/setup.py +++ b/examples/PyQt/hello_app/setup.py @@ -4,6 +4,7 @@ Usage: python setup.py py2app """ + from distutils.core import setup setup( diff --git a/examples/PySide/setup.py b/examples/PySide/setup.py index 98836f57..0714db13 100644 --- a/examples/PySide/setup.py +++ b/examples/PySide/setup.py @@ -4,6 +4,7 @@ Usage: python setup.py py2app """ + from setuptools import setup OPTIONS = {} diff --git a/examples/PySide6/setup.py b/examples/PySide6/setup.py index 98836f57..0714db13 100644 --- a/examples/PySide6/setup.py +++ b/examples/PySide6/setup.py @@ -4,6 +4,7 @@ Usage: python setup.py py2app """ + from setuptools import setup OPTIONS = {} diff --git a/examples/Tkinter/hello_tk/setup.py b/examples/Tkinter/hello_tk/setup.py index 4a391629..33845a41 100644 --- a/examples/Tkinter/hello_tk/setup.py +++ b/examples/Tkinter/hello_tk/setup.py @@ -4,6 +4,7 @@ Usage: python setup.py py2app """ + from setuptools import setup setup( diff --git a/examples/multiprocessing/setup.py b/examples/multiprocessing/setup.py index 4118ca46..0026e6c1 100644 --- a/examples/multiprocessing/setup.py +++ b/examples/multiprocessing/setup.py @@ -4,6 +4,7 @@ Usage: python setup.py py2app """ + from setuptools import setup setup( diff --git a/examples/pygame/setup.py b/examples/pygame/setup.py index c87f7542..cb1e3839 100644 --- a/examples/pygame/setup.py +++ b/examples/pygame/setup.py @@ -4,6 +4,7 @@ Usage: python setup.py py2app """ + from setuptools import setup NAME = "aliens" diff --git a/py2app_tests/basic_app_with_encoding/main.py b/py2app_tests/basic_app_with_encoding/main.py index 632a3710..e7bdbe61 100644 --- a/py2app_tests/basic_app_with_encoding/main.py +++ b/py2app_tests/basic_app_with_encoding/main.py @@ -4,6 +4,7 @@ German for Lion is Löwe. """ + import sys diff --git a/py2app_tests/test_app_with_ctypes.py b/py2app_tests/test_app_with_ctypes.py index 67e0572a..1954403a 100644 --- a/py2app_tests/test_app_with_ctypes.py +++ b/py2app_tests/test_app_with_ctypes.py @@ -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") @@ -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 diff --git a/py2app_tests/test_app_with_scripts.py b/py2app_tests/test_app_with_scripts.py index beb3f501..e68630ba 100644 --- a/py2app_tests/test_app_with_scripts.py +++ b/py2app_tests/test_app_with_scripts.py @@ -15,6 +15,7 @@ - add another test that does something simular, using virtualenv to manage a python installation """ + import glob import hashlib import os @@ -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") @@ -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")) diff --git a/py2app_tests/test_argv_emulation.py b/py2app_tests/test_argv_emulation.py index e6ebd6cc..ca488a8f 100644 --- a/py2app_tests/test_argv_emulation.py +++ b/py2app_tests/test_argv_emulation.py @@ -1,6 +1,7 @@ """ Testcase for checking argv_emulation """ + import os import shutil import subprocess diff --git a/py2app_tests/test_basic_app.py b/py2app_tests/test_basic_app.py index 62adc786..c8aa5761 100644 --- a/py2app_tests/test_basic_app.py +++ b/py2app_tests/test_basic_app.py @@ -15,6 +15,7 @@ - add another test that does something simular, using virtualenv to manage a python installation """ + import hashlib import os import shutil diff --git a/py2app_tests/test_basic_app_with_encoding.py b/py2app_tests/test_basic_app_with_encoding.py index 44047bc6..5311eb0c 100644 --- a/py2app_tests/test_basic_app_with_encoding.py +++ b/py2app_tests/test_basic_app_with_encoding.py @@ -15,6 +15,7 @@ - add another test that does something simular, using virtualenv to manage a python installation """ + import hashlib import os import shutil diff --git a/py2app_tests/test_basic_plugin.py b/py2app_tests/test_basic_plugin.py index e47e6ee3..1254f733 100644 --- a/py2app_tests/test_basic_plugin.py +++ b/py2app_tests/test_basic_plugin.py @@ -1,6 +1,7 @@ """ Simular to test_basic_app, but for plugin bundles """ + import os import shutil import signal @@ -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") @@ -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") @@ -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 diff --git a/py2app_tests/test_lsenvironment.py b/py2app_tests/test_lsenvironment.py index 33ce70d2..c57e2586 100644 --- a/py2app_tests/test_lsenvironment.py +++ b/py2app_tests/test_lsenvironment.py @@ -1,6 +1,7 @@ """ Testcase for checking argv_emulation """ + import ast # noqa: F401 import os import platform # noqa: F401 diff --git a/py2app_tests/test_package_data.py b/py2app_tests/test_package_data.py index edb8166d..3b7a5edb 100644 --- a/py2app_tests/test_package_data.py +++ b/py2app_tests/test_package_data.py @@ -3,6 +3,7 @@ See also issue #53 on the py2app tracker """ + import hashlib import os import shutil diff --git a/py2app_tests/test_pkg_script.py b/py2app_tests/test_pkg_script.py index 9f949beb..751046e6 100644 --- a/py2app_tests/test_pkg_script.py +++ b/py2app_tests/test_pkg_script.py @@ -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 diff --git a/py2app_tests/test_setup.py b/py2app_tests/test_setup.py index 40256819..4efacad6 100644 --- a/py2app_tests/test_setup.py +++ b/py2app_tests/test_setup.py @@ -1,6 +1,7 @@ """ Tests for typechecking of input arguments """ + import os import unittest diff --git a/py2app_tests/test_shell_environment.py b/py2app_tests/test_shell_environment.py index 5236b49b..7092c297 100644 --- a/py2app_tests/test_shell_environment.py +++ b/py2app_tests/test_shell_environment.py @@ -1,6 +1,7 @@ """ Testcase for checking emulate_shell_environment """ + import os import shutil import subprocess diff --git a/py2app_tests/tools.py b/py2app_tests/tools.py index d4b28bc4..13a6e061 100644 --- a/py2app_tests/tools.py +++ b/py2app_tests/tools.py @@ -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) @@ -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 diff --git a/src/py2app/__init__.py b/src/py2app/__init__.py index a2e65c3d..d5b1dcc6 100644 --- a/src/py2app/__init__.py +++ b/src/py2app/__init__.py @@ -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" diff --git a/src/py2app/_builder.py b/src/py2app/_builder.py index 272f2c39..aa91a3a2 100644 --- a/src/py2app/_builder.py +++ b/src/py2app/_builder.py @@ -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]: diff --git a/src/py2app/_pkg_meta.py b/src/py2app/_pkg_meta.py index eff92e2c..ffffe894 100644 --- a/src/py2app/_pkg_meta.py +++ b/src/py2app/_pkg_meta.py @@ -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): diff --git a/src/py2app/_recipedefs/stdlib.py b/src/py2app/_recipedefs/stdlib.py index 8805817f..45a4e2b2 100644 --- a/src/py2app/_recipedefs/stdlib.py +++ b/src/py2app/_recipedefs/stdlib.py @@ -1,6 +1,7 @@ """ Recipes related to the standard library """ + from modulegraph2 import MissingModule, ModuleGraph from .._config import RecipeOptions diff --git a/src/py2app/_recipes.py b/src/py2app/_recipes.py index adf6d01e..2e726762 100644 --- a/src/py2app/_recipes.py +++ b/src/py2app/_recipes.py @@ -15,6 +15,7 @@ - Non-goal (for now) is making it easy/possible to maintain recipes out of tree. """ + import dataclasses import typing diff --git a/src/py2app/_setuptools_stub.py b/src/py2app/_setuptools_stub.py index d2a1685d..81645d62 100644 --- a/src/py2app/_setuptools_stub.py +++ b/src/py2app/_setuptools_stub.py @@ -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: diff --git a/src/py2app/_standalone.py b/src/py2app/_standalone.py index b95987d7..ba78a21e 100644 --- a/src/py2app/_standalone.py +++ b/src/py2app/_standalone.py @@ -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 diff --git a/src/py2app/apptemplate/lib/site.py b/src/py2app/apptemplate/lib/site.py index 6b894966..67ecefa2 100644 --- a/src/py2app/apptemplate/lib/site.py +++ b/src/py2app/apptemplate/lib/site.py @@ -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: diff --git a/src/py2app/build_app.py b/src/py2app/build_app.py index 10841e5a..4ea4dc5d 100644 --- a/src/py2app/build_app.py +++ b/src/py2app/build_app.py @@ -101,11 +101,9 @@ class Py2appDistribution(Distribution): def __new__(self) -> "Py2appDistribution": raise RuntimeError("Don't instantiate!") - def get_version(self) -> str: - ... + def get_version(self) -> str: ... - def get_name(self) -> str: - ... + def get_name(self) -> str: ... PYTHONFRAMEWORK: str = typing.cast(str, get_config_var("PYTHONFRAMEWORK")) @@ -255,11 +253,13 @@ def copy_framework(self, info: _FrameworkInfo) -> str: return destfn -def iter_recipes() -> typing.Iterator[ - typing.Tuple[ - str, typing.Callable[["py2app", ModuleGraph], typing.Optional[RecipeInfo]] +def iter_recipes() -> ( + typing.Iterator[ + typing.Tuple[ + str, typing.Callable[["py2app", ModuleGraph], typing.Optional[RecipeInfo]] + ] ] -]: +): for name in dir(recipes): if name.startswith("_"): continue @@ -908,9 +908,7 @@ def run(self) -> None: def iter_datamodels( self, resdir: typing.Union[str, os.PathLike[str]] ) -> typing.Iterator[typing.Tuple[str, str]]: - for (path, files) in ( - normalize_data_file(fn) for fn in (self.datamodels or ()) - ): + for path, files in (normalize_data_file(fn) for fn in (self.datamodels or ())): for fn in files: basefn, ext = os.path.splitext(fn) if ext != ".xcdatamodel": @@ -928,7 +926,7 @@ def compile_datamodels(self, resdir: typing.Union[str, os.PathLike[str]]) -> Non def iter_mappingmodels( self, resdir: typing.Union[str, os.PathLike[str]] ) -> typing.Iterator[typing.Tuple[str, str]]: - for (path, files) in ( + for path, files in ( normalize_data_file(fn) for fn in (self.mappingmodels or ()) ): for fn in files: @@ -968,7 +966,7 @@ def iter_extra_plugins(self) -> typing.Iterator[typing.Tuple[str, str]]: def iter_data_files(self) -> typing.Iterator[typing.Tuple[str, str]]: dist = self.distribution allres = chain(getattr(dist, "data_files", ()) or (), self.resources) - for (path, files) in (normalize_data_file(fn) for fn in allres): + for path, files in (normalize_data_file(fn) for fn in allres): for fn in files: assert isinstance(fn, str) yield fn, os.path.join(path, os.path.basename(fn)) @@ -1279,18 +1277,18 @@ def run_normal(self) -> None: invalid_relative_import.append(module) if missing: - missing_unconditional: typing.DefaultDict[ - str, typing.Set[str] - ] = collections.defaultdict(set) - missing_fromimport: typing.DefaultDict[ - str, typing.Set[str] - ] = collections.defaultdict(set) - missing_fromimport_conditional: typing.DefaultDict[ - str, typing.Set[str] - ] = collections.defaultdict(set) - missing_conditional: typing.DefaultDict[ - str, typing.Set[str] - ] = collections.defaultdict(set) + missing_unconditional: typing.DefaultDict[str, typing.Set[str]] = ( + collections.defaultdict(set) + ) + missing_fromimport: typing.DefaultDict[str, typing.Set[str]] = ( + collections.defaultdict(set) + ) + missing_fromimport_conditional: typing.DefaultDict[str, typing.Set[str]] = ( + collections.defaultdict(set) + ) + missing_conditional: typing.DefaultDict[str, typing.Set[str]] = ( + collections.defaultdict(set) + ) self.progress.info("") self.progress.info("checking for any import problems") diff --git a/src/py2app/bundletemplate/lib/site.py b/src/py2app/bundletemplate/lib/site.py index 33480100..ae5cd224 100644 --- a/src/py2app/bundletemplate/lib/site.py +++ b/src/py2app/bundletemplate/lib/site.py @@ -80,7 +80,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: diff --git a/src/py2app/converters/coredata.py b/src/py2app/converters/coredata.py index e1b18553..cf3665b9 100644 --- a/src/py2app/converters/coredata.py +++ b/src/py2app/converters/coredata.py @@ -1,6 +1,7 @@ """ Automatic compilation of CoreData model files """ + import os import typing diff --git a/src/py2app/macho_audit.py b/src/py2app/macho_audit.py index 8533033a..67b75679 100644 --- a/src/py2app/macho_audit.py +++ b/src/py2app/macho_audit.py @@ -3,6 +3,7 @@ of "MachoStandalone" for issues that might affect portability. """ + import os import pathlib import typing @@ -110,9 +111,11 @@ def audit_macho_issues( return ( architecture, - decode_deployment_target(deployment_target) - if deployment_target is not None - else None, + ( + decode_deployment_target(deployment_target) + if deployment_target is not None + else None + ), warnings, ) diff --git a/src/py2app/progress.py b/src/py2app/progress.py index 18104e4f..270334d0 100644 --- a/src/py2app/progress.py +++ b/src/py2app/progress.py @@ -5,6 +5,7 @@ be dropped later in favour of direct usage of rich.progress """ + import rich.progress diff --git a/src/py2app/recipes/pyenchant.py b/src/py2app/recipes/pyenchant.py index 1495cffa..55d57c35 100644 --- a/src/py2app/recipes/pyenchant.py +++ b/src/py2app/recipes/pyenchant.py @@ -5,6 +5,7 @@ using ctypes, hence the usual way to find the library won't work. """ + import os import typing diff --git a/src/py2app/recipes/sip.py b/src/py2app/recipes/sip.py index 116ef1fe..06e9af02 100644 --- a/src/py2app/recipes/sip.py +++ b/src/py2app/recipes/sip.py @@ -9,6 +9,7 @@ PyQt4.Qt to PyQt4.QtCore) are handled in C code and therefore cannot be detected by the python code in py2app). """ + import glob import importlib.resources import io diff --git a/src/py2app/recipes/stdlib_refs.py b/src/py2app/recipes/stdlib_refs.py index e2fe62a4..da785310 100644 --- a/src/py2app/recipes/stdlib_refs.py +++ b/src/py2app/recipes/stdlib_refs.py @@ -1,6 +1,7 @@ """ Recipe to remove unnecessary imports between stdlib modules """ + import typing from modulegraph.modulegraph import ModuleGraph diff --git a/src/py2app/recipes/virtualenv.py b/src/py2app/recipes/virtualenv.py index 0a1f2134..41bdd58a 100644 --- a/src/py2app/recipes/virtualenv.py +++ b/src/py2app/recipes/virtualenv.py @@ -6,6 +6,7 @@ This recipe is rather compilicated and definitely not a good model for other recipes!!! """ + import imp import os import sys diff --git a/src/py2app/util.py b/src/py2app/util.py index 85faa572..14863a7a 100644 --- a/src/py2app/util.py +++ b/src/py2app/util.py @@ -492,7 +492,6 @@ def copy_tree( condition: typing.Optional[typing.Callable[[str], bool]] = None, progress: typing.Optional[Progress] = None, ) -> typing.List[str]: - """ Copy an entire directory tree 'src' to a new location 'dst'. Both 'src' and 'dst' must be directory names. If 'src' is not a @@ -525,7 +524,7 @@ def copy_tree( raise DistutilsFileError("cannot copy tree '%s': not a directory" % src) try: names = zipio.listdir(src) - except os.error as exc: + except OSError as exc: (errno, errstr) = exc.args if dry_run: names = [] diff --git a/stubs/macholib/MachO.pyi b/stubs/macholib/MachO.pyi index 940023f3..1a166357 100644 --- a/stubs/macholib/MachO.pyi +++ b/stubs/macholib/MachO.pyi @@ -1,4 +1,5 @@ """ """ + import typing class MachO: diff --git a/stubs/macholib/MachOGraph.pyi b/stubs/macholib/MachOGraph.pyi index beafba7f..fd986b54 100644 --- a/stubs/macholib/MachOGraph.pyi +++ b/stubs/macholib/MachOGraph.pyi @@ -1,4 +1,5 @@ import typing + from .MachO import MachO class MachOGraph: diff --git a/stubs/macholib/MachOStandalone.pyi b/stubs/macholib/MachOStandalone.pyi index 24c6cf6d..0e8e3cb8 100644 --- a/stubs/macholib/MachOStandalone.pyi +++ b/stubs/macholib/MachOStandalone.pyi @@ -1,6 +1,8 @@ """ """ -import typing + import collections +import typing + from macholib.MachOGraph import MachOGraph class MachOStandalone: diff --git a/stubs/macholib/util.pyi b/stubs/macholib/util.pyi index 6251c4ce..0523043d 100644 --- a/stubs/macholib/util.pyi +++ b/stubs/macholib/util.pyi @@ -1,4 +1,5 @@ """ Minimal stubs """ + import typing NOT_SYSTEM_FILES: typing.List[str] diff --git a/stubs/modulegraph/find_modules.pyi b/stubs/modulegraph/find_modules.pyi index 2a29e469..07f1138f 100644 --- a/stubs/modulegraph/find_modules.pyi +++ b/stubs/modulegraph/find_modules.pyi @@ -1,6 +1,8 @@ """ """ + import typing -from .modulegraph import Node, Extension, ModuleGraph + +from .modulegraph import Extension, ModuleGraph, Node PY_SUFFIXES: list[str] C_SUFFIXES: list[str] diff --git a/stubs/modulegraph/modulegraph.pyi b/stubs/modulegraph/modulegraph.pyi index f54d14d9..75491eef 100644 --- a/stubs/modulegraph/modulegraph.pyi +++ b/stubs/modulegraph/modulegraph.pyi @@ -1,4 +1,5 @@ """ """ + import types import typing diff --git a/stubs/modulegraph/util.pyi b/stubs/modulegraph/util.pyi index 573394d9..b850275e 100644 --- a/stubs/modulegraph/util.pyi +++ b/stubs/modulegraph/util.pyi @@ -1,4 +1,5 @@ """ """ + import typing def imp_find_module(