diff options
-rw-r--r-- | git/cmd.py | 3 | ||||
-rw-r--r-- | git/util.py | 4 | ||||
-rw-r--r-- | pyproject.toml | 2 | ||||
-rwxr-xr-x | setup.py | 13 |
4 files changed, 12 insertions, 10 deletions
@@ -164,7 +164,8 @@ CREATE_NO_WINDOW = 0x08000000 ## CREATE_NEW_PROCESS_GROUP is needed to allow killing it afterwards, # see https://docs.python.org/3/library/subprocess.html#subprocess.Popen.send_signal -PROC_CREATIONFLAGS = (CREATE_NO_WINDOW | subprocess.CREATE_NEW_PROCESS_GROUP if is_win else 0) +PROC_CREATIONFLAGS = (CREATE_NO_WINDOW | subprocess.CREATE_NEW_PROCESS_GROUP # type: ignore[attr-defined] + if is_win else 0) # mypy error if not windows class Git(LazyMixin): diff --git a/git/util.py b/git/util.py index 63060530..c20be6eb 100644 --- a/git/util.py +++ b/git/util.py @@ -403,8 +403,8 @@ def expand_path(p: Union[None, PathLike], expand_vars: bool = True) -> Optional[ try: p = osp.expanduser(p) # type: ignore if expand_vars: - p = osp.expandvars(p) - return osp.normpath(osp.abspath(p)) + p = osp.expandvars(p) # type: ignore + return osp.normpath(osp.abspath(p)) # type: ignore except Exception: return None diff --git a/pyproject.toml b/pyproject.toml index daf45f16..434880c7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ disallow_untyped_defs = true no_implicit_optional = true warn_redundant_casts = true implicit_reexport = true -warn_unused_ignores = true +# warn_unused_ignores = true warn_unreachable = true show_error_codes = true @@ -1,3 +1,4 @@ +from typing import Sequence from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py from setuptools.command.sdist import sdist as _sdist @@ -18,7 +19,7 @@ with open('test-requirements.txt') as reqs_file: class build_py(_build_py): - def run(self): + def run(self) -> None: init = path.join(self.build_lib, 'git', '__init__.py') if path.exists(init): os.unlink(init) @@ -29,7 +30,7 @@ class build_py(_build_py): class sdist(_sdist): - def make_release_tree(self, base_dir, files): + def make_release_tree(self, base_dir: str, files: Sequence) -> None: _sdist.make_release_tree(self, base_dir, files) orig = path.join('git', '__init__.py') assert path.exists(orig), orig @@ -40,7 +41,7 @@ class sdist(_sdist): _stamp_version(dest) -def _stamp_version(filename): +def _stamp_version(filename: str) -> None: found, out = False, [] try: with open(filename, 'r') as f: @@ -59,7 +60,7 @@ def _stamp_version(filename): print("WARNING: Couldn't find version line in file %s" % filename, file=sys.stderr) -def build_py_modules(basedir, excludes=()): +def build_py_modules(basedir: str, excludes: Sequence = ()) -> Sequence: # create list of py_modules from tree res = set() _prefix = os.path.basename(basedir) @@ -90,7 +91,7 @@ setup( include_package_data=True, py_modules=build_py_modules("./git", excludes=["git.ext.*"]), package_dir={'git': 'git'}, - python_requires='>=3.6', + python_requires='>=3.7', install_requires=requirements, tests_require=requirements + test_requirements, zip_safe=False, @@ -114,9 +115,9 @@ setup( "Operating System :: MacOS :: MacOS X", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9" + "Programming Language :: Python :: 3.10" ] ) |