changeset 51924:51be8bf8c986

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.
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 26 Sep 2024 18:51:03 -0400
parents b455dfddfed0
children 3a90a6fd710d
files hgext/git/dirstate.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/git/dirstate.py	Thu Sep 26 18:15:36 2024 -0400
+++ b/hgext/git/dirstate.py	Thu Sep 26 18:51:03 2024 -0400
@@ -243,7 +243,7 @@
             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 @@
     # # 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.