mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 00:14:35 +03:00
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:
parent
321cb87688
commit
3431d631c7
@ -170,7 +170,6 @@ from . import (
|
||||
)
|
||||
from . import debugephemeralcommit
|
||||
|
||||
# pyre-fixme[16]: Module `` has no attribute `debugephemeralcommit`.
|
||||
debugephemeralcommit.command # Suppressing "unused import" lint
|
||||
|
||||
cmdtable = cccommands.cmdtable
|
||||
|
@ -228,8 +228,6 @@ def buildpackmeta(metadict):
|
||||
newmeta = {}
|
||||
for k, v in pycompat.iteritems((metadict or {})):
|
||||
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):
|
||||
raise error.ProgrammingError("packmeta: wrong type of key %s" % k)
|
||||
# normalize int to binary buffer
|
||||
|
@ -14,10 +14,6 @@ from ..node import bin, hex, short
|
||||
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"))])
|
||||
def debugmetalog(ui, repo, **opts):
|
||||
# type: (...) -> None
|
||||
|
@ -1043,23 +1043,6 @@ def runedenimporthelper(repo, **opts):
|
||||
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(
|
||||
"debugedenimporthelper",
|
||||
[
|
||||
@ -1175,9 +1158,6 @@ def eden_import_helper(ui, repo, *repo_args, **opts):
|
||||
repo.close()
|
||||
|
||||
|
||||
# pyre-fixme[56]: Argument `[]` to decorator factory
|
||||
# `edenscm.mercurial.commands.cmdtable.command` could not be resolved in a global
|
||||
# scope.
|
||||
@command("debugedenrunpostupdatehook", [])
|
||||
def edenrunpostupdatehook(ui, repo):
|
||||
# type: (ui.ui, localrepo.localrepository) -> None
|
||||
|
@ -1269,6 +1269,7 @@ class dirstate(object):
|
||||
)
|
||||
|
||||
except error.LockError as ex:
|
||||
# pyre-fixme[61]: `waitforlock` may not be initialized here.
|
||||
if waitforlock:
|
||||
ui.write_err(
|
||||
_(
|
||||
|
Loading…
Reference in New Issue
Block a user