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

Commitbf7af69

Browse files
committed
Upgrade flake8 in pre-commit and fix new warnings
Upgrading flake8 from 6.0.0 to 6.1.0 causes its pycodestyledependency to be upgraded from 2.10.* to 2.11.*, which is desirablebecause:- Spurious "E231 missing whitespace after ':'" warnings on 3.12 due to the lack of full compatibility with Python 3.12 are gone.- New warnings appear, at least one of which, "E721 do not compare types, for exact checks use `is` / `is not`, for instance checks use `isinstance()`", does identify something we can improve.This upgrades flake8 in pre-commit and fixes the new warnings.
1 parenta5a6464 commitbf7af69

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

‎.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
-repo:https://github.com/PyCQA/flake8
3-
rev:6.0.0
3+
rev:6.1.0
44
hooks:
55
-id:flake8
66
additional_dependencies:

‎git/objects/submodule/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1403,7 +1403,7 @@ def iter_items(
14031403
# END handle critical error
14041404

14051405
# Make sure we are looking at a submodule object
1406-
iftype(sm)!=git.objects.submodule.base.Submodule:
1406+
iftype(sm)isnotgit.objects.submodule.base.Submodule:
14071407
continue
14081408

14091409
# fill in remaining info - saves time as it doesn't have to be parsed again

‎git/refs/log.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def entry_at(cls, filepath: PathLike, index: int) -> "RefLogEntry":
244244
foriinrange(index+1):
245245
line=fp.readline()
246246
ifnotline:
247-
raiseIndexError(f"Index file ended at line{i+1}, before given index was reached")
247+
raiseIndexError(f"Index file ended at line{i+1}, before given index was reached")
248248
# END abort on eof
249249
# END handle runup
250250

‎git/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ class IterableClassWatcher(type):
11361136

11371137
def__init__(cls,name:str,bases:Tuple,clsdict:Dict)->None:
11381138
forbaseinbases:
1139-
iftype(base)==IterableClassWatcher:
1139+
iftype(base)isIterableClassWatcher:
11401140
warnings.warn(
11411141
f"GitPython Iterable subclassed by{name}. "
11421142
"Iterable is deprecated due to naming clash since v3.1.18"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp