# HG changeset patch # User Matt Harbison # Date 2024-09-26 22:51:03 # Node ID 51be8bf8c98650709691f36aeafd644badcd9e50 # Parent b455dfddfed07c3e14a472bba3319ea77d27e0e4 git: correct some signature mismatches between dirstate and the Protocol class These were flagged by PyCharm when subclassing the Protocol class. Note that both `is_changing_xxx` were only flagged when the Protocol class used a plain field, as mentioned in the previous commit. After converting those attrs in the Protocol class to @property to match the regular dirstate class, it stopped flagging these. But I don't think that makes sense- `@property` should look like an attribute to the outside world, not a callable. diff --git a/hgext/git/dirstate.py b/hgext/git/dirstate.py --- a/hgext/git/dirstate.py +++ b/hgext/git/dirstate.py @@ -243,7 +243,7 @@ class gitdirstate: return DirstateItem() return entry - def normalize(self, path): + def normalize(self, path, isknown=False, ignoremissing=False): normed = util.normcase(path) assert normed == path, b"TODO handling of case folding: %s != %s" % ( normed, @@ -262,11 +262,13 @@ class gitdirstate: # # TODO what the heck is this _filecache = set() + @property def is_changing_parents(self): # TODO: we need to implement the context manager bits and # correctly stage/revert index edits. return False + @property def is_changing_any(self): # TODO: we need to implement the context manager bits and # correctly stage/revert index edits.