How to use the pycodestyle._checks.values function in pycodestyle

To help you get started, we’ve selected a few pycodestyle examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Parallels / githooks / hooks.d / pycheck / pycodestyle / testsuite / test_api.py View on Github external
def test_register_invalid_check(self):
        class InvalidChecker(DummyChecker):
            def __init__(self, filename):
                pass

        def check_dummy(logical, tokens):
            if False:
                yield
        pycodestyle.register_check(InvalidChecker, ['Z741'])
        pycodestyle.register_check(check_dummy, ['Z441'])

        for checkers in pycodestyle._checks.values():
            self.assertTrue(DummyChecker not in checkers)
            self.assertTrue(check_dummy not in checkers)

        self.assertRaises(TypeError, pycodestyle.register_check)
github mozilla / version-control-tools / pylib / pycodestyle / testsuite / test_api.py View on Github external
def test_register_invalid_check(self):
        class InvalidChecker(DummyChecker):
            def __init__(self, filename):
                pass

        def check_dummy(logical, tokens):
            if False:
                yield
        pycodestyle.register_check(InvalidChecker, ['Z741'])
        pycodestyle.register_check(check_dummy, ['Z441'])

        for checkers in pycodestyle._checks.values():
            self.assertTrue(DummyChecker not in checkers)
            self.assertTrue(check_dummy not in checkers)

        self.assertRaises(TypeError, pycodestyle.register_check)
github PyCQA / pycodestyle / testsuite / test_api.py View on Github external
def test_register_invalid_check(self):
        class InvalidChecker(DummyChecker):
            def __init__(self, filename):
                pass

        def check_dummy(logical, tokens):
            if False:
                yield
        pycodestyle.register_check(InvalidChecker, ['Z741'])
        pycodestyle.register_check(check_dummy, ['Z441'])

        for checkers in pycodestyle._checks.values():
            self.assertTrue(DummyChecker not in checkers)
            self.assertTrue(check_dummy not in checkers)

        self.assertRaises(TypeError, pycodestyle.register_check)