Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
39d37d5
replace some TBDs wiht runtime types
Yobmod Jul 31, 2021
c878771
replace more TBDs wiht runtime types
Yobmod Jul 31, 2021
009017e
Merge branch 'gitpython-developers:main' into main
Yobmod Aug 2, 2021
2163322
increase mypy strictness (warn unused ignored)
Yobmod Aug 2, 2021
0525c17
Merge branch 'main' of https://github.com/Yobmod/GitPython
Yobmod Aug 2, 2021
91fce33
increase mypy strictness (warn unused ignored and warn unreachable)
Yobmod Aug 2, 2021
15ace87
rmv 3.6 from CI matrix
Yobmod Aug 2, 2021
bef2182
rmv 3.6 from setup.py
Yobmod Aug 2, 2021
270c3d7
rmv 3.6 README
Yobmod Aug 2, 2021
c3f3501
Add __future__.annotations to cmd.py
Yobmod Aug 2, 2021
829142d
Add __future__.annotations to cmd.py2
Yobmod Aug 2, 2021
13e0730
Fix parse_date typing
Yobmod Aug 2, 2021
730f119
Fix parse_date typing 2
Yobmod Aug 2, 2021
2fe13ca
Fix parse_date typing 3
Yobmod Aug 2, 2021
024b696
Fix parse_date typing 4
Yobmod Aug 2, 2021
e2f8367
Fix parse_date typing 5
Yobmod Aug 2, 2021
d30bc07
Fix parse_date typing 6
Yobmod Aug 2, 2021
6470ad4
Fix parse_date typing 7
Yobmod Aug 2, 2021
481f672
Add __future__.annotations to repo/base.py
Yobmod Aug 2, 2021
9de7310
Minor type fixes
Yobmod Aug 2, 2021
5647d58
Merge branch 'gitpython-developers:main' into main
Yobmod Aug 2, 2021
f34a39f
Test new union syntax (Pep604)
Yobmod Aug 2, 2021
3b53d28
Merge branch 'main' of https://github.com/Yobmod/GitPython
Yobmod Aug 2, 2021
4dd06c3
Test trailing comma in args (>py3.6?)
Yobmod Aug 2, 2021
94ae0c5
Test Dataclass in repo.base.blame()
Yobmod Aug 2, 2021
a3f5b13
Test Dataclass in repo.base.blame() 2
Yobmod Aug 2, 2021
a2a36e0
Test Dataclass in repo.base.blame() 3
Yobmod Aug 2, 2021
ed137cb
Test TypedDict in repo.base.blame() 2
Yobmod Aug 2, 2021
e4761ff
Test TypedDict in repo.base.blame() 1
Yobmod Aug 2, 2021
1aaa704
Test Dataclass in repo.base.blame() 4
Yobmod Aug 2, 2021
bc9bcf5
Test Dataclass in repo.base.blame() 5
Yobmod Aug 2, 2021
ad417ba
Test Dataclass in repo.base.blame() 6
Yobmod Aug 2, 2021
ecb1f79
Choose TypedDict!
Yobmod Aug 2, 2021
5aa8c34
Improve type of repo.blame_incremental()
Yobmod Aug 2, 2021
8b8aa16
Improve type of repo.currently_rebasing_on()
Yobmod Aug 2, 2021
84232f7
Add Typing :: Typed to setup.py
Yobmod Aug 3, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rmv 3.6 from setup.py
  • Loading branch information
Yobmod committed Aug 2, 2021
commit bef218246c9935f0c31b23a17d1a02ac3810301d
3 changes: 2 additions & 1 deletion git/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ def dict_to_slots_and__excluded_are_none(self: object, d: Mapping[str, Any], exc

## 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):
Expand Down
4 changes: 2 additions & 2 deletions git/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
13 changes: 7 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -18,7 +19,7 @@

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)
Expand All @@ -29,7 +30,7 @@ def run(self):

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
Expand All @@ -40,7 +41,7 @@ def make_release_tree(self, base_dir, files):
_stamp_version(dest)


def _stamp_version(filename):
def _stamp_version(filename: str) -> None:
found, out = False, []
try:
with open(filename, 'r') as f:
Expand All @@ -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)
Expand Down Expand Up @@ -90,7 +91,7 @@ def build_py_modules(basedir, excludes=()):
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,
Expand All @@ -114,9 +115,9 @@ def build_py_modules(basedir, excludes=()):
"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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also add "Typing :: Typed"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, added it, and fixed intro

]
)