Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit012d710

Browse files
committed
Move our PathLike below even TYPE_CHECKING imports
The benefits are that putting imports before newly introducednames (other than names like __all__) is recommended by PEP-8, andthat git.types.PathLike is not equivalent to os.PathLike andintroducing it after all imports may help avoid obscuring this.
1 parent2e02b09 commit012d710

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎git/types.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@
3838
# else:
3939
# from typing_extensions import TypeGuard # noqa: F401
4040

41-
PathLike=Union[str,"os.PathLike[str]"]
42-
"""A :class:`str` (Unicode) based file or directory path."""
43-
4441
ifTYPE_CHECKING:
4542
fromgit.repoimportRepo
4643
fromgit.objectsimportCommit,Tree,TagObject,Blob
4744

45+
PathLike=Union[str,"os.PathLike[str]"]
46+
"""A :class:`str` (Unicode) based file or directory path."""
47+
4848
TBD=Any
4949
"""Alias of :class:`~typing.Any`, when a type hint is meant to become more specific."""
5050

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp