dirstate: remove the interface decorator to help pytype
authorMatt Harbison <matt_harbison@yahoo.com>
Fri, 16 Aug 2024 18:02:32 -0400
changeset 51808 c1d7ac70980b
parent 51807 0b2c978f595f
child 51809 45270e286bdc
dirstate: remove the interface decorator to help pytype This is the same change that was made for some of the manifest classes in 3e9a660b074a. Note that `dirstate` is still inferred as `Any`, but at least we have `DirState` with all of the expected attributes.
mercurial/dirstate.py
--- a/mercurial/dirstate.py	Fri Aug 16 17:58:17 2024 -0400
+++ b/mercurial/dirstate.py	Fri Aug 16 18:02:32 2024 -0400
@@ -134,8 +134,7 @@
 CHANGE_TYPE_FILES = "files"
 
 
-@interfaceutil.implementer(intdirstate.idirstate)
-class dirstate:
+class DirState:
     # used by largefile to avoid overwritting transaction callback
     _tr_key_suffix = b''
 
@@ -1807,3 +1806,6 @@
             entry = self.get_entry(f)
             if not entry.p1_tracked:
                 yield missing_from_ds % (f, node.short(p1))
+
+
+dirstate = interfaceutil.implementer(intdirstate.idirstate)(DirState)