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

Commit31bc8a4

Browse files
committed
Remove unneeded F401 "Unused import" suppressions
In git.types.It appears Ruff, unlike flake8, recognizes "import X as X" to meanthat "X" should not be considered unused, even when it appearsoutside a .pyi type stub file where that notation is more commonlyused.Those imports in git.types may benefit from being changed in someway that uses a syntax whose intent is clearer in context, anddepending on how that is done it may even be necessary to bringback suppressions. If so, they can be written more specifically.(For now, changing them would express more than is known about whatnames that are only present in git.types becuase it imports themshould continue to be imported, should be considered conceptuallypublic, or should be condered suitable for use within GitPython.)
1 parent6318eea commit31bc8a4

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
@@ -3,7 +3,7 @@
33

44
importos
55
importsys
6-
fromtypingimport (# noqa: F401
6+
fromtypingimport (
77
Any,
88
Callable,
99
Dict,
@@ -17,15 +17,15 @@
1717
)
1818

1919
ifsys.version_info>= (3,8):
20-
fromtypingimport (# noqa: F401
20+
fromtypingimport (
2121
Literal,
2222
Protocol,
2323
SupportsIndexasSupportsIndex,
2424
TypedDict,
2525
runtime_checkable,
2626
)
2727
else:
28-
fromtyping_extensionsimport (# noqa: F401
28+
fromtyping_extensionsimport (
2929
Literal,
3030
Protocol,
3131
SupportsIndexasSupportsIndex,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp