예제 #1
0
    def test_baseline_benchmark_j1_all_checks_lots_of_files(self, benchmark):
        """Runs lots of files, with -j1, against all plug-ins

        ... that's the intent at least.
        """
        if benchmark.disabled:
            benchmark(print, "skipping, only benchmark large file counts")
            return  # _only_ run this test is profiling
        linter = PyLinter()

        # Register all checkers/extensions and enable them
        with patch("os.listdir", return_value=["pylint", "tests"]):
            register_plugins(
                linter,
                os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")),
            )
        linter.load_default_plugins()
        linter.enable("all")

        # Just 1 file, but all Checkers/Extensions
        fileinfos = [self.empty_filepath for _ in range(self.lot_of_files)]

        assert linter.config.jobs == 1
        print("len(linter._checkers)", len(linter._checkers))
        assert len(linter._checkers) > 1, "Should have more than 'master'"
        benchmark(linter.check, fileinfos)
def initialize(linter):
    """initialize linter with checkers in this package """
    register_plugins(linter, __path__[0])
예제 #3
0
def initialize(linter):
    """initialize linter with reporters in this package """
    from pylint import utils
    utils.register_plugins(linter, __path__[0])
예제 #4
0
파일: __init__.py 프로젝트: Mariatta/pylint
def initialize(linter):
    """initialize linter with checkers in this package """
    register_plugins(linter, __path__[0])
예제 #5
0
def initialize(linter):
    """initialize linter with reporters in this package """
    from pylint import utils
    utils.register_plugins(linter, __path__[0])
예제 #6
0
파일: __init__.py 프로젝트: craig-sh/pylint
def initialize(linter: "PyLinter") -> None:
    """initialize linter with reporters in this package"""
    utils.register_plugins(
        linter, __path__[0]
    )  # type: ignore # Fixed in https://github.com/python/mypy/pull/9454
예제 #7
0
def initialize(linter: PyLinter) -> None:
    """Initialize linter with checkers in the extensions' directory."""
    register_plugins(linter, __path__[0])
예제 #8
0
def initialize(linter: PyLinter) -> None:
    """Initialize linter with reporters in this package."""
    utils.register_plugins(linter, __path__[0])
예제 #9
0
파일: __init__.py 프로젝트: Doringber/blog
def initialize(linter: "PyLinter") -> None:
    """Initialize linter with checkers in the extensions directory"""
    register_plugins(
        linter, __path__[0]
    )  # type: ignore[name-defined] # Fixed in https://github.com/python/mypy/pull/9454
예제 #10
0
def initialize(linter):
    """
	Initialize linter with checkers in this package.
	"""

    register_plugins(linter, __path__[0])  # type: ignore
예제 #11
0
def initialize(linter: PyLinter) -> None:
    """Initialize linter with checkers in this package."""
    register_plugins(linter, __path__[0])