##// END OF EJS Templates
typing: (mostly) align the signatures of `imanifestrevisionstored` overrides...
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.

File last commit:

r38469:b45c353e default
r53371:048c1199 default
Show More
map-cmdline.show
25 lines | 1.1 KiB | text/plain | TextLexer
# TODO there are a few deficiencies in this file:
# * The "namespace" of the labels needs to be worked out. We currently
# piggyback on existing values so color works.
%include map-cmdline.default
[templates]
showbookmarks = '{if(active, "*", " ")} {pad(bookmark, longestbookmarklen + 4)}{shortest(node, nodelen)}\n'
showwork = '{cset_shortnode}{namespaces % cset_namespace} {cset_shortdesc}'
showstack = '{showwork}'
cset_shortnode = '{labelcset(shortest(node, nodelen))}'
# Treat branch and tags specially so we don't display "default" or "tip"
cset_namespace = '{ifeq(namespace, "branches", names_branches, ifeq(namespace, "tags", names_tags, names_others))}'
names_branches = '{ifeq(branch, "default", "", " ({label('log.{colorname}', branch)})")}'
names_tags = '{if(filter_tags(names),
" ({label('log.{colorname}', join(filter_tags(names), ' '))})")}'
names_others = '{if(names, " ({label('log.{colorname}', join(names, ' '))})")}'
cset_shortdesc = '{label("log.description", desc|firstline)}'
[templatealias]
filter_tags(names) = filter(names, ifeq(name, 'tip', '', name))