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

Commit8e8b87a

Browse files
committed
Fix RootModule.updateignore[override] suppression
It was on the `previous_commit` parameter, and ineffective. It maybe that the original intent of the suppression was to suppress onlyincompatible override type errors due to the addition of thatparameter, but there are other paramters that also mismatch byhaving a different name or by being absent even though present inthe overridden base-class method. Furthermore, even corespondingparameters mismatch in position due to the insertion of the`previous_commit` parameter, so even if there is some way to do amore fine-grained suppression than applying `ignore[override]` tothe entire method signature, that would be insufficient here.This fixes one mypy error. It does so by causing it to be suppressedeffectively, not by fixing the underlying issue, which may not befixable since it would entail a breaking change to fix. However,this does not introduce any new suppressions, just fixes an existingsuppression so it is effective (and probably so it operates asintended, though maybe it is slightly stronger than intended asdiscussed above).
1 parent94344b4 commit8e8b87a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎git/objects/submodule/root.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ def _clear_cache(self) -> None:
7575

7676
# { Interface
7777

78-
defupdate(
78+
defupdate(# type: ignore[override]
7979
self,
80-
previous_commit:Union[Commit_ish,None]=None,# type: ignore[override]
80+
previous_commit:Union[Commit_ish,None]=None,
8181
recursive:bool=True,
8282
force_remove:bool=False,
8383
init:bool=True,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp