Skip to content

Commit

Permalink
Fix flake8 errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaak-Malers committed Feb 22, 2024
1 parent 220aa00 commit e228ad3
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions test/test_abbreviations.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from ..CliFunction import DefaultArgumentParser


class TestAbbreviations:

parser = DefaultArgumentParser()
Expand Down
1 change: 0 additions & 1 deletion test/test_canary.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ class TestCanary:

@pytest.mark.skip(reason="This test is a canary for verifying CI works as intended.")
def test_python_version(self):
version = sys.version
if sys.version.startswith("3.8"):
assert True is False

Expand Down
2 changes: 1 addition & 1 deletion test/test_collect_method_kwargs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ..CliFunction import DefaultArgumentParser, Targets
from ..CliFunction import Targets


class TestCollectMethodKwargs:
Expand Down
2 changes: 0 additions & 2 deletions test/test_execute.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import pytest

from ..CliFunction import Targets


Expand Down
5 changes: 2 additions & 3 deletions test/test_generate_method_kwargs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import pytest

from ..CliFunction import DefaultArgumentParser


Expand All @@ -15,7 +13,7 @@ def some_args(*, arg: str = "hi"):
return arg

@staticmethod
def bool_args(*, arg: bool=False):
def bool_args(*, arg: bool = False):
return arg

@staticmethod
Expand Down Expand Up @@ -49,6 +47,7 @@ def test_failed_type_coercion(self):
assert self.t.generate_method_kwargs(args=['d.py', 'types2', '--retries=5.4'], function=self.types2) is None
assert self.t.generate_method_kwargs(args=['d.py', 'types2', '--retries=True'], function=self.types2) is None
assert self.t.generate_method_kwargs(args=['d.py', 'types2', '--retries=5'], function=self.types2) == {'retries': 5}

def test_shorthands(self):
assert self.t.generate_method_kwargs(args=['CliFunction', 'bool_args', '-a'], function=self.bool_args) == {"arg": True}
assert self.t.generate_method_kwargs(args=['CliFunction', 'some_args', '-a=hello'], function=self.some_args) == {"arg": 'hello'}
Expand Down
1 change: 1 addition & 0 deletions test/test_invalidTargets.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def noKwargs(myarg, myarg2):
"""But it does have docstrings"""
pass


def camelCase():
"""camel Case"""
pass
Expand Down

0 comments on commit e228ad3

Please sign in to comment.