mirror of
https://github.com/facebook/sapling.git
synced 2024-12-25 22:11:52 +03:00
pyre: add stub for "bindings"
Summary: Add a partial stub so pyre stops complaining about "bindings" being unknown. Pyre's "search_path" was adjusted to read the new "pystubs" directory. Reviewed By: DurhamG Differential Revision: D19669131 fbshipit-source-id: a592ed411d1689058405689eb657e543b7172774
This commit is contained in:
parent
e985d51e02
commit
e124dfebc6
@ -17,7 +17,6 @@ import code
|
||||
import os
|
||||
import sys
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
import bindings
|
||||
import edenscm
|
||||
|
||||
|
@ -784,7 +784,6 @@ def poststatustreestate(wctx, status):
|
||||
else:
|
||||
# Remove ignored files from treestate
|
||||
ignore = dirstate._ignore
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import treestate
|
||||
|
||||
repo.ui.debug("stop tracking ignored files\n")
|
||||
|
@ -42,7 +42,6 @@ import errno
|
||||
import json
|
||||
from typing import Optional
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
import bindings
|
||||
from edenscm.mercurial import (
|
||||
bundle2,
|
||||
|
@ -54,7 +54,6 @@ from __future__ import absolute_import
|
||||
|
||||
import struct
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import nodemap as nodemapmod
|
||||
from edenscm.mercurial import (
|
||||
error,
|
||||
|
@ -23,7 +23,6 @@ import shutil
|
||||
import warnings
|
||||
from bisect import insort
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import nodemap as nodemapmod
|
||||
from edenscm.mercurial import (
|
||||
bundlerepo,
|
||||
|
@ -4,7 +4,6 @@ import os
|
||||
import re
|
||||
import shutil
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import nodemap
|
||||
from dulwich import client, config as dul_config, diff_tree
|
||||
from dulwich.errors import GitProtocolError, HangupException
|
||||
|
@ -29,7 +29,6 @@ this extension.
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import lz4
|
||||
from edenscm.mercurial import error, extensions, localrepo, revlog, util
|
||||
from edenscm.mercurial.i18n import _
|
||||
|
@ -1116,7 +1116,6 @@ def _getmanifest(op, rev):
|
||||
m = rev.manifest()
|
||||
else:
|
||||
store = repo.manifestlog.datastore
|
||||
# pyre-fixme[21]: Could not find `edenscmnative`.
|
||||
from bindings import manifest
|
||||
|
||||
m = manifest.treemanifest(store, rev.manifestnode())
|
||||
|
@ -8,7 +8,6 @@ from __future__ import absolute_import
|
||||
import os
|
||||
import struct
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import revisionstore
|
||||
from edenscm.mercurial.i18n import _
|
||||
from edenscm.mercurial.node import hex, nullid
|
||||
|
@ -10,7 +10,6 @@ import hashlib
|
||||
import os
|
||||
import sys
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import revisionstore
|
||||
from edenscm.hgext import extutil
|
||||
from edenscm.mercurial import error, filelog, progress, pycompat, revlog, util
|
||||
|
@ -8,7 +8,6 @@ from __future__ import absolute_import
|
||||
import threading
|
||||
import traceback
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import edenapi
|
||||
from edenscm.mercurial import error, httpconnection
|
||||
from edenscm.mercurial.i18n import _
|
||||
|
@ -8,7 +8,6 @@ from __future__ import absolute_import
|
||||
import hashlib
|
||||
import struct
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import revisionstore
|
||||
from edenscm.mercurial.node import hex, nullid
|
||||
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import lz4
|
||||
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
# This software may be used and distributed according to the terms of the
|
||||
# GNU General Public License version 2.
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import revisionstore
|
||||
from edenscm.mercurial.node import hex
|
||||
|
||||
|
@ -10,7 +10,6 @@ from __future__ import absolute_import
|
||||
import collections
|
||||
import os
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import revisionstore
|
||||
from edenscm.mercurial import ancestor, error, filelog, mdiff, pycompat, revlog, util
|
||||
from edenscm.mercurial.i18n import _
|
||||
|
@ -11,7 +11,6 @@ import time
|
||||
import traceback
|
||||
from contextlib import contextmanager
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import revisionstore
|
||||
from edenscm.mercurial import encoding, error, progress, util, vfs
|
||||
from edenscm.mercurial.i18n import _
|
||||
|
@ -156,7 +156,6 @@ import shutil
|
||||
import struct
|
||||
import time
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import manifest as rustmanifest, revisionstore
|
||||
from edenscm.mercurial import (
|
||||
bundle2,
|
||||
|
@ -3,7 +3,6 @@
|
||||
# This software may be used and distributed according to the terms of the
|
||||
# GNU General Public License version 2.
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import blackbox as _blackbox
|
||||
|
||||
|
||||
|
@ -54,7 +54,6 @@ import struct
|
||||
import time
|
||||
from typing import BinaryIO, Callable, Dict, List, Optional
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import commands, hgtime
|
||||
|
||||
from . import commandserver, encoding, error, extensions, pycompat, ui as uimod, util
|
||||
|
@ -20,7 +20,6 @@ import stat
|
||||
import tempfile
|
||||
from typing import Dict
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import renderdag
|
||||
|
||||
from . import (
|
||||
|
@ -21,7 +21,6 @@ import subprocess
|
||||
import sys
|
||||
import time
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
import bindings
|
||||
|
||||
from ... import hgdemandimport
|
||||
|
@ -10,7 +10,6 @@
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
import bindings
|
||||
|
||||
from .. import registrar
|
||||
|
@ -9,7 +9,6 @@ import contextlib
|
||||
import os
|
||||
import typing
|
||||
|
||||
# pyre-fixme[21]
|
||||
from bindings import metalog, mutationstore, nodemap, revisionstore, tracing
|
||||
|
||||
from .. import error, hg, progress, util, vfs as vfsmod
|
||||
|
@ -15,7 +15,6 @@ from __future__ import absolute_import
|
||||
import re
|
||||
import string
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import vlq
|
||||
|
||||
from . import error, pycompat, util
|
||||
|
@ -24,7 +24,6 @@ import sys
|
||||
import time
|
||||
import traceback
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
import bindings
|
||||
|
||||
from . import (
|
||||
|
@ -18,7 +18,6 @@ imports.
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
import bindings
|
||||
|
||||
# Do not import anything but pycompat here, please
|
||||
|
@ -14,7 +14,6 @@ import errno
|
||||
import os
|
||||
import stat
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import workingcopy
|
||||
from edenscm.mercurial import registrar
|
||||
|
||||
|
@ -16,7 +16,6 @@ import itertools
|
||||
import os
|
||||
import textwrap
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import cliparser
|
||||
|
||||
from . import (
|
||||
|
@ -21,7 +21,6 @@ import time
|
||||
import weakref
|
||||
from contextlib import contextmanager
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
import bindings
|
||||
from edenscm.hgext.extlib.phabricator import diffprops
|
||||
|
||||
|
@ -16,7 +16,6 @@ import copy
|
||||
import os
|
||||
import re
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import pathmatcher
|
||||
|
||||
from . import error, pathutil, pycompat, util
|
||||
|
@ -9,7 +9,6 @@ from __future__ import absolute_import
|
||||
|
||||
from collections import defaultdict
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import mutationstore
|
||||
|
||||
from . import error, node as nodemod, perftrace, phases, repoview, util
|
||||
|
@ -8,7 +8,6 @@
|
||||
import inspect
|
||||
from contextlib import contextmanager
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import tracing
|
||||
|
||||
from . import util
|
||||
|
@ -110,7 +110,6 @@ from __future__ import absolute_import
|
||||
import errno
|
||||
import struct
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
import bindings
|
||||
|
||||
from . import error, perftrace, pycompat, smartset, txnutil, util, visibility
|
||||
|
@ -17,7 +17,6 @@ import errno
|
||||
import threading
|
||||
import time
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import threading as rustthreading, tracing
|
||||
|
||||
from . import encoding, util
|
||||
|
@ -27,14 +27,13 @@ import os
|
||||
import struct
|
||||
import zlib
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
import bindings
|
||||
|
||||
from . import ancestor, error, mdiff, policy, pycompat, templatefilters, util
|
||||
from .i18n import _
|
||||
|
||||
# import stuff from node for others to import from revlog
|
||||
from .node import bin, hex, bbin, bhex, nullid, nullrev, wdirhex, wdirid, wdirrev
|
||||
from .node import bbin, bhex, bin, hex, nullid, nullrev, wdirhex, wdirid, wdirrev
|
||||
from .pycompat import range
|
||||
|
||||
|
||||
|
@ -12,7 +12,6 @@
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
import bindings
|
||||
|
||||
from . import error, util
|
||||
|
@ -17,7 +17,6 @@ import hashlib
|
||||
import os
|
||||
import stat
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
import bindings
|
||||
|
||||
from . import error, policy, pycompat, util, vfs as vfsmod
|
||||
|
@ -16,7 +16,6 @@ import string
|
||||
import struct
|
||||
import time
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import treestate as rusttreestate
|
||||
|
||||
from . import error, node, pycompat, treestate, txnutil, util
|
||||
|
@ -10,7 +10,6 @@ from __future__ import absolute_import
|
||||
import errno
|
||||
import uuid
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import treestate
|
||||
|
||||
from . import error, node, pycompat, txnutil, util
|
||||
|
@ -29,7 +29,6 @@ import traceback
|
||||
from enum import Enum
|
||||
from typing import List, Optional, Union
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import configparser
|
||||
|
||||
from . import (
|
||||
|
@ -13,7 +13,6 @@ from __future__ import absolute_import
|
||||
import contextlib
|
||||
import os
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
from bindings import configparser
|
||||
|
||||
from . import configitems, error, pycompat, util
|
||||
|
@ -53,7 +53,6 @@ import types
|
||||
import warnings
|
||||
import zlib
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
import bindings
|
||||
|
||||
from . import blackbox, encoding, error, fscap, i18n, policy, pycompat, urllibcompat
|
||||
|
@ -9,7 +9,6 @@ from __future__ import absolute_import
|
||||
|
||||
import errno
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
import bindings
|
||||
from edenscm.mercurial import error, node, util
|
||||
from edenscm.mercurial.i18n import _
|
||||
|
@ -9,7 +9,6 @@ from __future__ import absolute_import
|
||||
import sys
|
||||
import types
|
||||
|
||||
# pyre-fixme[21]: Could not find `bindings`.
|
||||
import bindings
|
||||
|
||||
|
||||
|
3
eden/scm/pystubs/bindings.pyi
Normal file
3
eden/scm/pystubs/bindings.pyi
Normal file
@ -0,0 +1,3 @@
|
||||
from typing import Any
|
||||
|
||||
def __getattr__(name) -> Any: ...
|
Loading…
Reference in New Issue
Block a user