# Path: shopify_python/google_styleguide.py
# def register_checkers(linter):  # type: (lint.PyLinter) -> None
#     def __init__(self, linter):
#     def visit_assign(self, node):  # type: (astroid.Assign) -> None
#     def visit_excepthandler(self, node):  # type: (astroid.ExceptHandler) -> None
#     def visit_lambda(self, node):  # type: (astroid.Lambda) -> None
#     def visit_listcomp(self, node):  # type: (astroid.ListComp) -> None
#     def visit_tryexcept(self, node):  # type: (astroid.TryExcept) -> None
#     def visit_tryfinally(self, node):  # type: (astroid.TryFinally) -> None
#     def visit_importfrom(self, node):  # type: (astroid.ImportFrom) -> None
#     def visit_raise(self, node):  # type: (astroid.Raise) -> None
#     def visit_if(self, node):
#     def visit_classdef(self, node):  # type: (astroid.ClassDef) -> None
#     def __get_module_names(node):  # type: (astroid.ImportFrom) -> typing.Generator[str, None, None]
#     def __import_modules_only(self, node):  # type: (astroid.ImportFrom) -> None
#     def __import_full_path_only(self, node):  # type: (astroid.ImportFrom) -> None
#     def __limit_one_import(self, node):  # type: (astroid.ImportFrom) -> None
#     def __avoid_global_variables(self, node):  # type: (astroid.Assign) -> None
#         def check_assignment(node):
#     def __dont_use_archaic_raise_syntax(self, node):  # type: (astroid.Raise) -> None
#     def __dont_catch_standard_error(self, node):  # type: (astroid.ExceptHandler) -> None
#     def __minimize_code_in_try_except(self, node):  # type: (astroid.TryExcept) -> None
#     def __minimize_code_in_finally(self, node):  # type: (astroid.TryFinally) -> None
#     def __use_simple_lambdas(self, node):  # type: (astroid.Lambda) -> None
#     def __use_simple_list_comp(self, node):  # type: (astroid.ListComp) -> None
#     def __use_cond_expr(self, node):  # type: (astroid.If) -> None
#     def __lambda_func(self, node):  # type: (astroid.Lambda) -> None
#     def __class_def_check(self, node):  # type: (astroid.ClassDef) -> None
# class GoogleStyleGuideChecker(checkers.BaseChecker):
#     UNARY_OPERATORS = {
#         "~": "invert",
#         "-": "neg",
#         "not": "not_",
#         "+": "pos"
#     }
#     BINARY_OPERATORS = {
#         "+": "add",
#         "in": "contains",
#         "/": "truediv",
#         "//": "floordiv",
#         "&": "and_",
#         "^": "xor",
#         "|": "or_",
#         "**": "pow",
#         "is": "is",
#         "is not": "is_not",
#         "<<": "lshift",
#         "%": "modulo",
#         "*": "mul",
#         ">>": "rshift",
#         "-": "sub",
#         "<": "lt",
#         "<=": "le",
#         "==": "eq",
#         "!=": "ne",
#         ">=": "ge",
#         ">": "gt"
#     }
# 
# Path: shopify_python/shopify_styleguide.py
# def register_checkers(linter):  # type: (lint.PyLinter) -> None
#     def process_tokens(self, tokens):
#     def __validate_comment(self, string, start):
#     def __validate_name(self, string, start, line):
#     def __disable_name_only(self, string, start):
#         def get_name(code):
#     def __sequence_str(self, string, start):
# class ShopifyStyleGuideChecker(checkers.BaseTokenChecker):
#     RE_PYLINT_DISABLE = re.compile(r'^#[ \t]*pylint:[ \t]*(disable|enable)[ \t]*=(?P<messages>[a-zA-Z0-9\-_, \t]+)$')
#     RE_PYLINT_MESSAGE_CODE = re.compile(r'^[A-Z]{1,2}[0-9]{4}$')
#     RE_COMMENT_TYPE_ANNOTATION = re.compile(r'^# type.*:.*$')
#     RE_SEQUENCE_STRING = re.compile(r'^.*Sequence\[str\].*$')


import csv
import collections
import io
import operator
import os
import re
import sys
import platform
import six
import pytest
from six.moves import configparser
from pylint import checkers
from pylint import interfaces
from pylint import lint
from pylint import reporters
from tests.shopify_python import google_styleguide
from tests.shopify_python import shopify_styleguide
    def _check_output_text(self, expected_messages, expected_lines,
                           received_lines):
        if not expected_messages:
            return
        emitted, remaining = self._split_lines(expected_messages, expected_lines)
        if emitted != received_lines:
            remaining.extend(received_lines)
            remaining.sort(key=lambda m: (m[1], m[0], m[3]))
            with open(self._test_file.expected_output, 'w') as fobj:
                writer = csv.writer(fobj, dialect='test')
                for line in remaining:
                    writer.writerow(line.to_csv())


def get_tests():
    input_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)),
                             'functional')
    suite = []
    for fname in os.listdir(input_dir):
        if fname != '__init__.py' and fname.endswith('.py'):
            suite.append(FunctionalTestFile(input_dir, fname))
    return suite


TESTS = get_tests()
TESTS_NAMES = [t.base for t in TESTS]


def test_a_functional_test_exists_for_all_rule_names():
    tests = set(TESTS_NAMES)

# Path: shopify_python/google_styleguide.py
# def register_checkers(linter):  # type: (lint.PyLinter) -> None
#     def __init__(self, linter):
#     def visit_assign(self, node):  # type: (astroid.Assign) -> None
#     def visit_excepthandler(self, node):  # type: (astroid.ExceptHandler) -> None
#     def visit_lambda(self, node):  # type: (astroid.Lambda) -> None
#     def visit_listcomp(self, node):  # type: (astroid.ListComp) -> None
#     def visit_tryexcept(self, node):  # type: (astroid.TryExcept) -> None
#     def visit_tryfinally(self, node):  # type: (astroid.TryFinally) -> None
#     def visit_importfrom(self, node):  # type: (astroid.ImportFrom) -> None
#     def visit_raise(self, node):  # type: (astroid.Raise) -> None
#     def visit_if(self, node):
#     def visit_classdef(self, node):  # type: (astroid.ClassDef) -> None
#     def __get_module_names(node):  # type: (astroid.ImportFrom) -> typing.Generator[str, None, None]
#     def __import_modules_only(self, node):  # type: (astroid.ImportFrom) -> None
#     def __import_full_path_only(self, node):  # type: (astroid.ImportFrom) -> None
#     def __limit_one_import(self, node):  # type: (astroid.ImportFrom) -> None
#     def __avoid_global_variables(self, node):  # type: (astroid.Assign) -> None
#         def check_assignment(node):
#     def __dont_use_archaic_raise_syntax(self, node):  # type: (astroid.Raise) -> None
#     def __dont_catch_standard_error(self, node):  # type: (astroid.ExceptHandler) -> None
#     def __minimize_code_in_try_except(self, node):  # type: (astroid.TryExcept) -> None
#     def __minimize_code_in_finally(self, node):  # type: (astroid.TryFinally) -> None
#     def __use_simple_lambdas(self, node):  # type: (astroid.Lambda) -> None
#     def __use_simple_list_comp(self, node):  # type: (astroid.ListComp) -> None
#     def __use_cond_expr(self, node):  # type: (astroid.If) -> None
#     def __lambda_func(self, node):  # type: (astroid.Lambda) -> None
#     def __class_def_check(self, node):  # type: (astroid.ClassDef) -> None
# class GoogleStyleGuideChecker(checkers.BaseChecker):
#     UNARY_OPERATORS = {
#         "~": "invert",
#         "-": "neg",
#         "not": "not_",
#         "+": "pos"
#     }
#     BINARY_OPERATORS = {
#         "+": "add",
#         "in": "contains",
#         "/": "truediv",
#         "//": "floordiv",
#         "&": "and_",
#         "^": "xor",
#         "|": "or_",
#         "**": "pow",
#         "is": "is",
#         "is not": "is_not",
#         "<<": "lshift",
#         "%": "modulo",
#         "*": "mul",
#         ">>": "rshift",
#         "-": "sub",
#         "<": "lt",
#         "<=": "le",
#         "==": "eq",
#         "!=": "ne",
#         ">=": "ge",
#         ">": "gt"
#     }
# 
# Path: shopify_python/shopify_styleguide.py
# def register_checkers(linter):  # type: (lint.PyLinter) -> None
#     def process_tokens(self, tokens):
#     def __validate_comment(self, string, start):
#     def __validate_name(self, string, start, line):
#     def __disable_name_only(self, string, start):
#         def get_name(code):
#     def __sequence_str(self, string, start):
# class ShopifyStyleGuideChecker(checkers.BaseTokenChecker):
#     RE_PYLINT_DISABLE = re.compile(r'^#[ \t]*pylint:[ \t]*(disable|enable)[ \t]*=(?P<messages>[a-zA-Z0-9\-_, \t]+)$')
#     RE_PYLINT_MESSAGE_CODE = re.compile(r'^[A-Z]{1,2}[0-9]{4}$')
#     RE_COMMENT_TYPE_ANNOTATION = re.compile(r'^# type.*:.*$')
#     RE_SEQUENCE_STRING = re.compile(r'^.*Sequence\[str\].*$')


# Path: tests/test_functional.py
import csv
import collections
import io
import operator
import os
import re
import sys
import platform
import six
import pytest
from six.moves import configparser
from pylint import checkers
from pylint import interfaces
from pylint import lint
from pylint import reporters
from tests.shopify_python import google_styleguide
from tests.shopify_python import shopify_styleguide

    def _check_output_text(self, expected_messages, expected_lines,
                           received_lines):
        if not expected_messages:
            return
        emitted, remaining = self._split_lines(expected_messages, expected_lines)
        if emitted != received_lines:
            remaining.extend(received_lines)
            remaining.sort(key=lambda m: (m[1], m[0], m[3]))
            with open(self._test_file.expected_output, 'w') as fobj:
                writer = csv.writer(fobj, dialect='test')
                for line in remaining:
                    writer.writerow(line.to_csv())


def get_tests():
    input_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)),
                             'functional')
    suite = []
    for fname in os.listdir(input_dir):
        if fname != '__init__.py' and fname.endswith('.py'):
            suite.append(FunctionalTestFile(input_dir, fname))
    return suite


TESTS = get_tests()
TESTS_NAMES = [t.base for t in TESTS]


def test_a_functional_test_exists_for_all_rule_names():
    tests = set(TESTS_NAMES)

    for rule_name in google_styleguide.GoogleStyleGuideChecker.msgs.values():