diff options
| author | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2022-06-20 07:24:24 +0100 |
|---|---|---|
| committer | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2022-06-20 07:24:24 +0100 |
| commit | d019f498ecd5ad45e58e95df64afd9730090df6a (patch) | |
| tree | 5f7a67a63da2ac61f65fdd550a72e68565ae16ff /setuptools/command | |
| parent | 64fdf11c6b62ec8da3f3fe9e13f348813f1144d6 (diff) | |
| download | python-setuptools-git-d019f498ecd5ad45e58e95df64afd9730090df6a.tar.gz | |
Fix linting errors
Diffstat (limited to 'setuptools/command')
| -rw-r--r-- | setuptools/command/build_ext.py | 8 | ||||
| -rw-r--r-- | setuptools/command/build_py.py | 7 |
2 files changed, 4 insertions, 11 deletions
diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index 42e67dcd..31ef47bf 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -3,8 +3,7 @@ import sys import itertools from importlib.machinery import EXTENSION_SUFFIXES from importlib.util import cache_from_source as _compiled_file_name -from pathlib import Path -from typing import Dict, Iterator, List, Tuple, Union +from typing import Dict, Iterator, List, Tuple from distutils.command.build_ext import build_ext as _du_build_ext from distutils.ccompiler import new_compiler @@ -259,7 +258,7 @@ class build_ext(_build_ext): pkg = '.'.join(ext._full_name.split('.')[:-1] + ['']) return any(pkg + libname in libnames for libname in ext.libraries) - def get_outputs(self): + def get_outputs(self) -> List[str]: if self.inplace: return list(self.get_output_mapping().keys()) return sorted(_build_ext.get_outputs(self) + self.__get_stubs_outputs()) @@ -341,9 +340,6 @@ class build_ext(_build_ext): os.unlink(stub_file) -def _file_with_suffix(directory: str, name: str, suffix: str) -> str: - return f"{os.path.join(directory, name)}.{suffix}" - if use_stubs or os.name == 'nt': # Build shared libraries # diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 3163752f..a2a6fe2c 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -33,11 +33,6 @@ class build_py(orig.build_py): editable_mode: bool = False existing_egg_info_dir: Optional[str] = None #: Private API, internal use only. - def initialize_options(self): - super().initialize_options() - self.editable_mode = False - self.existing_egg_info_dir = None - def finalize_options(self): orig.build_py.finalize_options(self) self.package_data = self.distribution.package_data @@ -244,6 +239,8 @@ class build_py(orig.build_py): def initialize_options(self): self.packages_checked = {} orig.build_py.initialize_options(self) + self.editable_mode = False + self.existing_egg_info_dir = None def get_package_dir(self, package): res = orig.build_py.get_package_dir(self, package) |
