Remove target-based type checking in eden

Summary: Ensure checking is covered with the pyre config. unblocks deprecation of pyre targets based checking.

Reviewed By: pradeep90

Differential Revision: D29878832

fbshipit-source-id: 1bbeca3b61ae5b0362b768bbbe53057a1d72ee7f
This commit is contained in:
Shannon Zhu 2021-07-23 12:33:18 -07:00 committed by Facebook GitHub Bot
parent 321cb87688
commit 3431d631c7
5 changed files with 1 additions and 27 deletions

View File

@ -170,7 +170,6 @@ from . import (
) )
from . import debugephemeralcommit from . import debugephemeralcommit
# pyre-fixme[16]: Module `` has no attribute `debugephemeralcommit`.
debugephemeralcommit.command # Suppressing "unused import" lint debugephemeralcommit.command # Suppressing "unused import" lint
cmdtable = cccommands.cmdtable cmdtable = cccommands.cmdtable

View File

@ -228,8 +228,6 @@ def buildpackmeta(metadict):
newmeta = {} newmeta = {}
for k, v in pycompat.iteritems((metadict or {})): for k, v in pycompat.iteritems((metadict or {})):
expectedtype = _metaitemtypes.get(k, (bytes,)) expectedtype = _metaitemtypes.get(k, (bytes,))
# pyre-fixme[6]: Expected `Union[typing.Type[typing.Any],
# typing.Tuple[typing.Type[typing.Any], ...]]` for 2nd param but got `Any`.
if not isinstance(v, expectedtype): if not isinstance(v, expectedtype):
raise error.ProgrammingError("packmeta: wrong type of key %s" % k) raise error.ProgrammingError("packmeta: wrong type of key %s" % k)
# normalize int to binary buffer # normalize int to binary buffer

View File

@ -14,10 +14,6 @@ from ..node import bin, hex, short
from .cmdtable import command from .cmdtable import command
# pyre-fixme[56]: Argument `[("t", "time-range", [],
# edenscm.mercurial.i18n._("select time range"), edenscm.mercurial.i18n._("TIME"))]`
# to decorator factory `edenscm.mercurial.commands.cmdtable.command` could not be
# resolved in a global scope.
@command("debugmetalog", [("t", "time-range", [], _("select time range"), _("TIME"))]) @command("debugmetalog", [("t", "time-range", [], _("select time range"), _("TIME"))])
def debugmetalog(ui, repo, **opts): def debugmetalog(ui, repo, **opts):
# type: (...) -> None # type: (...) -> None

View File

@ -1043,23 +1043,6 @@ def runedenimporthelper(repo, **opts):
return 0 return 0
# pyre-fixme[56]: Argument `[("", "in-fd", "", edenscm.mercurial.i18n._("Use the
# specified file descriptor to receive commands, rather than reading on stdin"),
# edenscm.mercurial.i18n._("FILENO")), ("", "out-fd", "",
# edenscm.mercurial.i18n._("Use the specified file descriptor to send command output,
# rather than writing to stdout"), edenscm.mercurial.i18n._("FILENO")), ("",
# "manifest", "", edenscm.mercurial.i18n._("Dump the binary manifest data for the
# specified revision."), edenscm.mercurial.i18n._("REVISION")), ("",
# "get-manifest-node", "", edenscm.mercurial.i18n._("Print the manifest node ID for
# the specified revision."), edenscm.mercurial.i18n._("REVISION")), ("", "cat-file",
# "", edenscm.mercurial.i18n._("Dump the file contents for the specified file at the
# given file revision"), edenscm.mercurial.i18n._("PATH:REV")), ("", "get-file-size",
# "", edenscm.mercurial.i18n._("Get the file size for the specified file at the given
# file revision"), edenscm.mercurial.i18n._("PATH:REV")), ("", "fetch-tree", "",
# edenscm.mercurial.i18n._("Fetch treemanifest data for the specified path at the
# given manifest node"), edenscm.mercurial.i18n._("PATH:REV"))]` to decorator factory
# `edenscm.mercurial.commands.cmdtable.command` could not be resolved in a global
# scope.
@command( @command(
"debugedenimporthelper", "debugedenimporthelper",
[ [
@ -1175,9 +1158,6 @@ def eden_import_helper(ui, repo, *repo_args, **opts):
repo.close() repo.close()
# pyre-fixme[56]: Argument `[]` to decorator factory
# `edenscm.mercurial.commands.cmdtable.command` could not be resolved in a global
# scope.
@command("debugedenrunpostupdatehook", []) @command("debugedenrunpostupdatehook", [])
def edenrunpostupdatehook(ui, repo): def edenrunpostupdatehook(ui, repo):
# type: (ui.ui, localrepo.localrepository) -> None # type: (ui.ui, localrepo.localrepository) -> None

View File

@ -1269,6 +1269,7 @@ class dirstate(object):
) )
except error.LockError as ex: except error.LockError as ex:
# pyre-fixme[61]: `waitforlock` may not be initialized here.
if waitforlock: if waitforlock:
ui.write_err( ui.write_err(
_( _(