# 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"
#     }


import contextlib
import sys
import astroid
import pylint.testutils
import pytest
from shopify_python import google_styleguide

    def test_unary_lambda_func_with_complex_operand_allowed(self):
        unary_root = astroid.builder.parse("""
        def unaryfnc():
            unary_pass = map(lambda x: not (x+3), [1, 2, 3, 4])
        """)
        with self.assertNoMessages():
            self.walk(unary_root)

    def test_unary_lambda_func_without_operand_name_allowed(self):
        unary_root = astroid.builder.parse("""
        def unaryfnc():
            unary_pass = map(lambda x: not x.attribute, [1, 2, 3, 4])
        """)
        with self.assertNoMessages():
            self.walk(unary_root)

    def test_unary_lambda_func_with_unknown_operator_allowed(self, monkeypatch):
        monkeypatch.setattr(google_styleguide.GoogleStyleGuideChecker, 'UNARY_OPERATORS', dict())
        unary_root = astroid.builder.parse("""
        def unaryfnc():
            unary_pass = map(lambda x: not x, [1, 2, 3, 4])
        """)
        with self.assertNoMessages():
            self.walk(unary_root)

    @pytest.mark.parametrize('operator', [
        '+', '<'
    ])
    def test_binary_lambda_func_with_unknown_operator_allowed(self, operator, monkeypatch):

# 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: tests/shopify_python/test_google_styleguide.py
import contextlib
import sys
import astroid
import pylint.testutils
import pytest
from shopify_python import google_styleguide


    def test_unary_lambda_func_with_complex_operand_allowed(self):
        unary_root = astroid.builder.parse("""
        def unaryfnc():
            unary_pass = map(lambda x: not (x+3), [1, 2, 3, 4])
        """)
        with self.assertNoMessages():
            self.walk(unary_root)

    def test_unary_lambda_func_without_operand_name_allowed(self):
        unary_root = astroid.builder.parse("""
        def unaryfnc():
            unary_pass = map(lambda x: not x.attribute, [1, 2, 3, 4])
        """)
        with self.assertNoMessages():
            self.walk(unary_root)

    def test_unary_lambda_func_with_unknown_operator_allowed(self, monkeypatch):
        monkeypatch.setattr(google_styleguide.GoogleStyleGuideChecker, 'UNARY_OPERATORS', dict())
        unary_root = astroid.builder.parse("""
        def unaryfnc():
            unary_pass = map(lambda x: not x, [1, 2, 3, 4])
        """)
        with self.assertNoMessages():
            self.walk(unary_root)

    @pytest.mark.parametrize('operator', [
        '+', '<'
    ])
    def test_binary_lambda_func_with_unknown_operator_allowed(self, operator, monkeypatch):

        monkeypatch.setattr(google_styleguide.GoogleStyleGuideChecker, 'BINARY_OPERATORS', dict())