Commit message Age Author Refs
r53378:22f97aa5
manifest: subclass the new `imanifestrevisionwritable` 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
r53377:01818a59
interfaces: convert `imanifestrevisionwritable` to a Protocol class Same as cdd4bc69bfc1 for `imanifestrevisionstored`.
Matt Harbison
0
r53376:99ca58c7
interfaces: make `repository.imanifeststorage` methods abstract Same as cdd4bc69bfc1 for `imanifestrevisionstored`, but this was already a Protocol class.
Matt Harbison
0
r53375:d01af74e
interfaces: convert `repository.imanifeststorage` from zope `Attribute` attrs This is the same transformation as b455dfddfed0 did for dirstate.
Matt Harbison
0
r53374:d37d8dfe
manifest: subclass the new `repository.imanifestrevisionstored` 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
r53373:0c60be5e
interfaces: fix a doc comment in `repository.imanifestrevisionstored.find()`
Matt Harbison
0
r53372:cdd4bc69
interfaces: convert `imanifestrevisionstored` to a Protocol class This is similar to 1df97507c6b8 for `ipeer`, because the Protocol nature needs to be explicit on each class, as it isn't inherited. While we're here, make the methods abstract. There's some background info on this in f5d134e57f51 and fd200f5bcaea, but in short, the plan is to explicitly subclass this instead of relying on structured typing, and explicit inheritence will see this as a method implementation that returns None at runtime (regardless of how it is typed), instead of a mandatory function for the subclass to supply. The `Protocol` class has `abc.ABCMeta` as the metaclass, so there's nothing more to do with the inheritence list.
Matt Harbison
0
r53371:048c1199
typing: (mostly) align the signatures of `imanifestrevisionstored` overrides When we change the implementations to subclass this explicitly, pytype complains that the signatures mismatch for various methods. It seems hung up on ones in `mercurial.manifest` that have type hints on the return value, but lacked it in the Protocol class (which it thinks returns `None` if there's no annotation). The tricky part is that a lot of the return types in the `mercurial.manifest` module are custom types specific to that module (e.g. `'manifestctx' | 'treemanifestctx'`). Those should probably be replaced with Protocol classes. I was going to avoid making a long series longer by disabling that check for now by putting `Any` as the return type on the Protocol class methods, and then realized the problem is the class isn't marked as a Protocol (that property isn't inherited). For now, lock in the synchronized signatures.
Matt Harbison
0
r53370:a1dd484b
interfaces: convert `imanifestrevisionstored` from zope `Attribute` attrs This is the same transformation as b455dfddfed0 did for dirstate.
Matt Harbison
0
r53369:0d4ead4d
interfaces: convert `repository.ifileindex` from zope `Attribute` attrs This is the same transformation as b455dfddfed0 did for dirstate.
Matt Harbison
0
< 1 .. 5 6 7 8 9 .. 5341 >