Commit message Age Author Refs
r53388:c855943e
git: fix `repository.imanifestdict` implementation flaws detected by pytype The next logical step is to align the signatures on `repository.imanifestdict` and the logical subclasses. But that requires this small detour, as doing that caused these errors: File "/mnt/c/Users/Matt/hg/hgext/git/manifest.py", line 247, in items: bad return type [bad-return-type] Expected: Tuple[bytes, bytes] Actually returned: bytes File "/mnt/c/Users/Matt/hg/hgext/git/manifest.py", line 255, in iterentries: bad return type [bad-return-type] Expected: Tuple[bytes, bytes, bytes] Actually returned: Tuple[Any, bytes] The type annotation added to `_resolve_entry()` here to help clarify things then caused PyCharm to flag `gittreemanifestctx.find()` for a bad return type, also fixed here.
Matt Harbison
0
r53387:ef119f91
localrepo: subclass the new `ilocalrepositoryfilestorage` Protocol class This is the same transformation as 3a90a6fd710d did for dirstate, but the CamelCase naming was already cleaned up here. See 4ef6dbc27a99 for the benefits of explicit subclassing. Since there's only one method in this Protocol class and it needs to be abstract because of the direct subclassing (see cdd4bc69bfc1), do that here.
Matt Harbison
0
r53386:ba8f03ad
filelog: subclass the new `repository.ifilestorage` Protocol class This is the same transformation as 3a90a6fd710d did for dirstate, but the CamelCase naming was already cleaned up here. See 4ef6dbc27a99 for the benefits of explicit subclassing. One thing to mention is that pytype gets confused if Protocol classes preceed a regular class in the superclass list, so the interface goes last in the git extension. (I didn't bother to verify that it would have been an issue here, rather it was something I noticed when making `repository.ipeerbase` a Protocol class locally before dropping it entirely earlier in this series.) One other thing is that PyCharm starts flagging `__len__()` and `hasnode()` on `hgext.git.gitlog.baselog` with: "Type of 'hasnode' is incompatible with 'ifilestorage'" No clue why; it's happy with the other 3 implementations (at least with these methods- simplestorerepo.py looks badly broken otherwise).
Matt Harbison
0
r53385:8c89e978
interfaces: convert `repository.ifilestorage` to a Protocol class Same as cdd4bc69bfc1 for `imanifestrevisionstored`, but also make the methods in the super classes abstract as well.
Matt Harbison
0
r53384:3daaa519
typing: align the signatures of `repository.ifilestorage` overrides This is the same as 048c11993d6a for `imanifestrevisionstored`, with the same belated realization about missing the Protocol marker. Since I've been jumping around to the various subclasses and copying extant hints to places where they're missing, do that here too. This also covers the 3 interfaces subclassed by `repository.ifilestorage` (`repository.ifileindex`, `repository.ifiledata`, and `repository.ifilemutation`). Obviously the whole base class needs hints, but I don't want to get side tracked here- it doesn't look like any of the implementing classes have any additional hints.
Matt Harbison
0
r53383:c0d9fda9
interfaces: make `repository.ilocalrepositorymain` methods abstract Same as cdd4bc69bfc1 for `imanifestrevisionstored`, but this was already a Protocol class.
Matt Harbison
0
r53382:dfb60fb1
interfaces: convert `ilocalrepositorymain` from zope `Attribute` attrs This is the same transformation as b455dfddfed0 did for dirstate. This is also the last of the `interfaceutil.Attribute` style attributes.
Matt Harbison
0
r53381:d371efa7
manifest: subclass the new `repository.imanifestlog` Protocol class This is the same transformation as 3a90a6fd710d did for dirstate, but the CamelCase naming was already cleaned up here. See 4ef6dbc27a99 for the benefits of explicit subclassing.
Matt Harbison
0
r53380:196f441f
interfaces: make `repository.imanifestlog` methods abstract Same as cdd4bc69bfc1 for `imanifestrevisionstored`, but this was already a Protocol class.
Matt Harbison
0
r53379:ed70604d
interfaces: convert `repository.imanifestlog` from zope `Attribute` attrs This is the same transformation as b455dfddfed0 did for dirstate.
Matt Harbison
0
< 1 .. 4 5 6 7 8 .. 5341 >