diff --git a/hgext/fastannotate/commands.py b/hgext/fastannotate/commands.py --- a/hgext/fastannotate/commands.py +++ b/hgext/fastannotate/commands.py @@ -7,6 +7,9 @@ import os +from typing import ( + Set, +) from mercurial.i18n import _ from mercurial import ( @@ -254,7 +257,7 @@ def fastannotate(ui, repo, *pats, **opts _newopts = set() -_knownopts = { +_knownopts: Set[bytes] = { opt[1].replace(b'-', b'_') for opt in (fastannotatecommandargs['options'] + commands.globalopts) } diff --git a/hgext/fastannotate/context.py b/hgext/fastannotate/context.py --- a/hgext/fastannotate/context.py +++ b/hgext/fastannotate/context.py @@ -174,12 +174,16 @@ class annotateopts: 'followmerge': True, } + diffopts: mdiff.diffopts + followrename: bool + followmerge: bool + def __init__(self, **opts): for k, v in self.defaults.items(): setattr(self, k, opts.get(k, v)) @util.propertycache - def shortstr(self): + def shortstr(self) -> bytes: """represent opts in a short string, suitable for a directory name""" result = b'' if not self.followrename: