Skip to content

Commit

Permalink
Appease linter
Browse files Browse the repository at this point in the history
  • Loading branch information
awnawab committed Jul 13, 2023
1 parent 1143498 commit 16f022a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions tests/test_lint/test_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class TestRule(GenericRule):
config = {'key': 'default_value'}

@classmethod
def check(cls, ast, rule_report, config):
def check(cls, ast, rule_report, config, **kwargs):
assert len(config) == 1
assert 'key' in config
assert config['key'] == 'default_value'
Expand All @@ -58,7 +58,7 @@ class TestRule2(GenericRule):
config = {'key': 'default_value'}

@classmethod
def check(cls, ast, rule_report, config):
def check(cls, ast, rule_report, config, **kwargs):
assert len(config) == 2
assert 'key' in config
assert config['key'] == 'non_default_value'
Expand Down Expand Up @@ -215,15 +215,15 @@ class AssignmentComplainRule(GenericRule):
docs = {'id': '13.37'}

@classmethod
def check_subroutine(cls, subroutine, rule_report, config): # pylint: disable=unused-argument
def check_subroutine(cls, subroutine, rule_report, config, **kwargs): # pylint: disable=unused-argument
for node in FindNodes(Assignment).visit(subroutine.ir):
rule_report.add(cls.__name__ + '_' + str(node.source.lines[0]), node)

class VariableComplainRule(GenericRule):
docs = {'id': '23.42'}

@classmethod
def check_subroutine(cls, subroutine, rule_report, config): # pylint: disable=unused-argument
def check_subroutine(cls, subroutine, rule_report, config, **kwargs): # pylint: disable=unused-argument
for node, variables in FindVariables(with_ir_node=True).visit(subroutine.body):
for var in variables:
rule_report.add(cls.__name__ + '_' + str(var), node)
Expand Down Expand Up @@ -278,15 +278,15 @@ class AssignmentComplainRule(GenericRule):
docs = {'id': '13.37'}

@classmethod
def check_subroutine(cls, subroutine, rule_report, config): # pylint: disable=unused-argument
def check_subroutine(cls, subroutine, rule_report, config, **kwargs): # pylint: disable=unused-argument
for node in FindNodes(Assignment).visit(subroutine.ir):
rule_report.add(cls.__name__ + '_' + str(node.source.lines[0]), node)

class VariableComplainRule(GenericRule):
docs = {'id': '23.42'}

@classmethod
def check_subroutine(cls, subroutine, rule_report, config): # pylint: disable=unused-argument
def check_subroutine(cls, subroutine, rule_report, config, **kwargs): # pylint: disable=unused-argument
for node, variables in FindVariables(with_ir_node=True).visit(subroutine.body):
for var in variables:
rule_report.add(cls.__name__ + '_' + str(var), node)
Expand Down Expand Up @@ -511,7 +511,7 @@ class TestRule(GenericRule):
fixable = True

@classmethod
def check_subroutine(cls, subroutine, rule_report, config):
def check_subroutine(cls, subroutine, rule_report, config, **kwargs):
if not subroutine.name.isupper():
rule_report.add(f'Subroutine name "{subroutine.name}" is not upper case', subroutine)

Expand Down
4 changes: 2 additions & 2 deletions tests/test_lint/test_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class RandomFailingRule(GenericRule):
config = {'dummy_key': 'dummy value'}

@classmethod
def check_subroutine(cls, subroutine, rule_report, config):
def check_subroutine(cls, subroutine, rule_report, config, **kwargs):
if fail_on and fail_on in subroutine.name:
rule_report.add(cls.__name__, subroutine)

Expand Down Expand Up @@ -191,7 +191,7 @@ class RandomFailingRule(GenericRule):
config = {'dummy_key': 'dummy value'}

@classmethod
def check_subroutine(cls, subroutine, rule_report, config):
def check_subroutine(cls, subroutine, rule_report, config, **kwargs):
if fail_on and fail_on in subroutine.name:
rule_report.add(cls.__name__, subroutine)

Expand Down

0 comments on commit 16f022a

Please sign in to comment.