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:
Jun Wu 2020-01-31 13:17:14 -08:00 committed by Facebook Github Bot
parent e985d51e02
commit e124dfebc6
45 changed files with 4 additions and 45 deletions

View File

@ -17,7 +17,6 @@ import code
import os
import sys
# pyre-fixme[21]: Could not find `bindings`.
import bindings
import edenscm

View File

@ -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")

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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

View File

@ -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 _

View File

@ -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())

View File

@ -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

View File

@ -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

View File

@ -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 _

View File

@ -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

View File

@ -5,7 +5,6 @@
from __future__ import absolute_import
# pyre-fixme[21]: Could not find `bindings`.
from bindings import lz4

View File

@ -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

View File

@ -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 _

View File

@ -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 _

View File

@ -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,

View File

@ -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

View File

@ -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

View File

@ -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 (

View File

@ -21,7 +21,6 @@ import subprocess
import sys
import time
# pyre-fixme[21]: Could not find `bindings`.
import bindings
from ... import hgdemandimport

View File

@ -10,7 +10,6 @@
from __future__ import absolute_import
# pyre-fixme[21]: Could not find `bindings`.
import bindings
from .. import registrar

View File

@ -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

View File

@ -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

View File

@ -24,7 +24,6 @@ import sys
import time
import traceback
# pyre-fixme[21]: Could not find `bindings`.
import bindings
from . import (

View File

@ -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

View File

@ -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

View File

@ -16,7 +16,6 @@ import itertools
import os
import textwrap
# pyre-fixme[21]: Could not find `bindings`.
from bindings import cliparser
from . import (

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -8,7 +8,6 @@
import inspect
from contextlib import contextmanager
# pyre-fixme[21]: Could not find `bindings`.
from bindings import tracing
from . import util

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -12,7 +12,6 @@
from __future__ import absolute_import
# pyre-fixme[21]: Could not find `bindings`.
import bindings
from . import error, util

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 (

View File

@ -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

View File

@ -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

View File

@ -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 _

View File

@ -9,7 +9,6 @@ from __future__ import absolute_import
import sys
import types
# pyre-fixme[21]: Could not find `bindings`.
import bindings

View File

@ -0,0 +1,3 @@
from typing import Any
def __getattr__(name) -> Any: ...