From 74f2821e88aebaba95a1ad493c71049ef0e694bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Gr=C3=A4tz?= Date: Tue, 13 Aug 2019 16:03:27 +0200 Subject: [PATCH 1/4] fix flake8 warning W504, disable W503 --- tests/data/fixtures/tree_fixtures.py | 264 +++++++++++++-------------- tox.ini | 2 +- 2 files changed, 133 insertions(+), 133 deletions(-) diff --git a/tests/data/fixtures/tree_fixtures.py b/tests/data/fixtures/tree_fixtures.py index d71e880..d72ec2d 100644 --- a/tests/data/fixtures/tree_fixtures.py +++ b/tests/data/fixtures/tree_fixtures.py @@ -25,148 +25,148 @@ # call `colored()` around the pipe separately. tree_light = ( - colored("==================================", "white") + "\n" + - colored("Spotify Web API Demo - Simple Tree", "yellow") + "\n" + - colored("==================================", "white") + "\n" + - colored("Base URI: https://api.spotify.com/v1", "yellow") + "\n" + - colored("|", "green", attrs=["bold"]) + - colored("- /tracks", "green", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" - /tracks/{id}", "green", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored("- /users/{user_id}/playlists", "green", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" - /users/{user_id}/playlists/{playlist_id}", "green", - attrs=["bold"]) + "\n" + colored("==================================", "white") + "\n" + + colored("Spotify Web API Demo - Simple Tree", "yellow") + "\n" + + colored("==================================", "white") + "\n" + + colored("Base URI: https://api.spotify.com/v1", "yellow") + "\n" + + colored("|", "green", attrs=["bold"]) + + colored("- /tracks", "green", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" - /tracks/{id}", "green", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored("- /users/{user_id}/playlists", "green", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" - /users/{user_id}/playlists/{playlist_id}", "green", + attrs=["bold"]) + "\n" ) tree_dark = ( - colored("==================================", "grey") + "\n" + - colored("Spotify Web API Demo - Simple Tree", "grey", - attrs=["bold"]) + "\n" + - colored("==================================", "grey") + "\n" + - colored("Base URI: https://api.spotify.com/v1", - "grey", attrs=["bold"]) + "\n" + - colored("|", "grey", attrs=["bold"]) + - colored("- /tracks", "grey", attrs=["bold"]) + "\n" + - colored("|", "grey", attrs=["bold"]) + - colored(" - /tracks/{id}", "grey", attrs=["bold"]) + "\n" + - colored("|", "grey", attrs=["bold"]) + - colored("- /users/{user_id}/playlists", "grey", attrs=["bold"]) + "\n" + - colored("|", "grey", attrs=["bold"]) + - colored(" - /users/{user_id}/playlists/{playlist_id}", "grey", - attrs=["bold"]) + "\n" + colored("==================================", "grey") + "\n" + + colored("Spotify Web API Demo - Simple Tree", "grey", + attrs=["bold"]) + "\n" + + + colored("==================================", "grey") + "\n" + + colored("Base URI: https://api.spotify.com/v1", + "grey", attrs=["bold"]) + "\n" + + colored("|", "grey", attrs=["bold"]) + + colored("- /tracks", "grey", attrs=["bold"]) + "\n" + + colored("|", "grey", attrs=["bold"]) + + colored(" - /tracks/{id}", "grey", attrs=["bold"]) + "\n" + + colored("|", "grey", attrs=["bold"]) + + colored("- /users/{user_id}/playlists", "grey", attrs=["bold"]) + "\n" + + colored("|", "grey", attrs=["bold"]) + + colored(" - /users/{user_id}/playlists/{playlist_id}", "grey", + attrs=["bold"]) + "\n" ) tree_light_v = ( - colored("==================================", "white") + "\n" + - colored("Spotify Web API Demo - Simple Tree", "yellow") + "\n" + - colored("==================================", "white") + "\n" + - colored("Base URI: https://api.spotify.com/v1", "yellow") + "\n" + - colored("|", "green", attrs=["bold"]) + - colored("- /tracks", "green", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" ⌙ GET", "blue", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" - /tracks/{id}", "green", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" ⌙ GET", "blue", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored("- /users/{user_id}/playlists", "green", - attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" ⌙ GET", "blue", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" - /users/{user_id}/playlists/{playlist_id}", "green", - attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" ⌙ PUT", "blue", attrs=["bold"]) + "\n" + colored("==================================", "white") + "\n" + + colored("Spotify Web API Demo - Simple Tree", "yellow") + "\n" + + colored("==================================", "white") + "\n" + + colored("Base URI: https://api.spotify.com/v1", "yellow") + "\n" + + colored("|", "green", attrs=["bold"]) + + colored("- /tracks", "green", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" ⌙ GET", "blue", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" - /tracks/{id}", "green", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" ⌙ GET", "blue", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored("- /users/{user_id}/playlists", "green", + attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" ⌙ GET", "blue", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" - /users/{user_id}/playlists/{playlist_id}", "green", + attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" ⌙ PUT", "blue", attrs=["bold"]) + "\n" ) tree_light_vv = ( - colored("==================================", "white") + "\n" + - colored("Spotify Web API Demo - Simple Tree", "yellow") + "\n" + - colored("==================================", "white") + "\n" + - colored("Base URI: https://api.spotify.com/v1", "yellow") + "\n" + - colored("|", "green", attrs=["bold"]) + - colored("- /tracks", "green", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" ⌙ GET", "blue", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" Query Params", "cyan", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" ⌙ ids", "cyan", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" - /tracks/{id}", "green", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" ⌙ GET", "blue", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" URI Params", "cyan", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" ⌙ id", "cyan", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored("- /users/{user_id}/playlists", "green", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" ⌙ GET", "blue", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" URI Params", "cyan", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" ⌙ user_id", "cyan", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" - /users/{user_id}/playlists/{playlist_id}", "green", - attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" ⌙ PUT", "blue", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" URI Params", "cyan", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" ⌙ user_id", "cyan", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" Form Params", "cyan", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" ⌙ name", "cyan", attrs=["bold"]) + "\n" + colored("==================================", "white") + "\n" + + colored("Spotify Web API Demo - Simple Tree", "yellow") + "\n" + + colored("==================================", "white") + "\n" + + colored("Base URI: https://api.spotify.com/v1", "yellow") + "\n" + + colored("|", "green", attrs=["bold"]) + + colored("- /tracks", "green", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" ⌙ GET", "blue", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" Query Params", "cyan", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" ⌙ ids", "cyan", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" - /tracks/{id}", "green", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" ⌙ GET", "blue", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" URI Params", "cyan", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" ⌙ id", "cyan", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored("- /users/{user_id}/playlists", "green", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" ⌙ GET", "blue", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" URI Params", "cyan", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" ⌙ user_id", "cyan", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" - /users/{user_id}/playlists/{playlist_id}", "green", + attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" ⌙ PUT", "blue", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" URI Params", "cyan", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" ⌙ user_id", "cyan", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" Form Params", "cyan", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" ⌙ name", "cyan", attrs=["bold"]) + "\n" ) tree_light_vvv = ( - colored("==================================", "white") + "\n" + - colored("Spotify Web API Demo - Simple Tree", "yellow") + "\n" + - colored("==================================", "white") + "\n" + - colored("Base URI: https://api.spotify.com/v1", "yellow") + "\n" + - colored("|", "green", attrs=["bold"]) + - colored("- /tracks", "green", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" ⌙ GET", "blue", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" Query Params", "cyan", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" ⌙ ids: Spotify Track IDs", "cyan", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" - /tracks/{id}", "green", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" ⌙ GET", "blue", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" URI Params", "cyan", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" ⌙ id: Spotify Track ID", "cyan", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored("- /users/{user_id}/playlists", "green", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" ⌙ GET", "blue", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" URI Params", "cyan", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" ⌙ user_id: User ID", "cyan", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" - /users/{user_id}/playlists/{playlist_id}", "green", - attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" ⌙ PUT", "blue", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" URI Params", "cyan", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" ⌙ user_id: User ID", "cyan", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" Form Params", "cyan", attrs=["bold"]) + "\n" + - colored("|", "green", attrs=["bold"]) + - colored(" ⌙ name: Playlist Name", "cyan", attrs=["bold"]) + "\n" + colored("==================================", "white") + "\n" + + colored("Spotify Web API Demo - Simple Tree", "yellow") + "\n" + + colored("==================================", "white") + "\n" + + colored("Base URI: https://api.spotify.com/v1", "yellow") + "\n" + + colored("|", "green", attrs=["bold"]) + + colored("- /tracks", "green", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" ⌙ GET", "blue", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" Query Params", "cyan", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" ⌙ ids: Spotify Track IDs", "cyan", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" - /tracks/{id}", "green", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" ⌙ GET", "blue", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" URI Params", "cyan", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" ⌙ id: Spotify Track ID", "cyan", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored("- /users/{user_id}/playlists", "green", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" ⌙ GET", "blue", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" URI Params", "cyan", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" ⌙ user_id: User ID", "cyan", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" - /users/{user_id}/playlists/{playlist_id}", "green", + attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" ⌙ PUT", "blue", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" URI Params", "cyan", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" ⌙ user_id: User ID", "cyan", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" Form Params", "cyan", attrs=["bold"]) + "\n" + + colored("|", "green", attrs=["bold"]) + + colored(" ⌙ name: Playlist Name", "cyan", attrs=["bold"]) + "\n" ) diff --git a/tox.ini b/tox.ini index 1ea15a7..ad2293a 100644 --- a/tox.ini +++ b/tox.ini @@ -24,7 +24,7 @@ basepython = python3 deps = flake8 commands = - flake8 ramlfications tests --exclude=docs/ --ignore=E221,F405 + flake8 ramlfications tests --exclude=docs/ --ignore=E221,F405,W503 [testenv:manifest] From ea38b030c8ef697921d8c22ea7b80271b02ff7a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Gr=C3=A4tz?= Date: Tue, 13 Aug 2019 16:18:51 +0200 Subject: [PATCH 2/4] fix flake8 warnings --- ramlfications/__init__.py | 2 +- ramlfications/parser/base.py | 4 ++-- ramlfications/utils/__init__.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ramlfications/__init__.py b/ramlfications/__init__.py index c7d9ad2..0806497 100644 --- a/ramlfications/__init__.py +++ b/ramlfications/__init__.py @@ -76,7 +76,7 @@ def validate(raml, config_file=None): with :py:class:`.loader.RAMLLoader` then validates with \ :py:func:`.validate.validate_raml`. - :param str raml: Either string path to the RAML file, a file object, \or + :param str raml: Either string path to the RAML file, a file object, or \ a string representation of RAML. :param str config_file: String path to desired config file, if any. :return: No return value if successful diff --git a/ramlfications/parser/base.py b/ramlfications/parser/base.py index 7a8e468..fe08c63 100644 --- a/ramlfications/parser/base.py +++ b/ramlfications/parser/base.py @@ -22,10 +22,10 @@ def __init__(self, data, config): self.resolve_from = [] def create_node(self): - raise NotImplemented() + raise NotImplementedError() def create_node_dict(self): - raise NotImplemented() + raise NotImplementedError() def create_param_objects(self, param): """ diff --git a/ramlfications/utils/__init__.py b/ramlfications/utils/__init__.py index 6bc1e79..29ccfa7 100644 --- a/ramlfications/utils/__init__.py +++ b/ramlfications/utils/__init__.py @@ -149,7 +149,7 @@ def _parse_xml_data(xml_data): if not registries: msg = "No registries found to parse." raise MediaTypeError(msg) - if len(registries) is not 9: + if len(registries) != 9: msg = ("Expected 9 registries but parsed " "{0}".format(len(registries))) raise MediaTypeError(msg) From 46e9d7576659b9056449a012f8f3bde58dab873a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Gr=C3=A4tz?= Date: Tue, 13 Aug 2019 16:19:54 +0200 Subject: [PATCH 3/4] update flake8 version --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index aa6c087..acb9e21 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -2,7 +2,7 @@ Sphinx==1.2.3 check-manifest==0.21 coverage==3.7.1 -flake8==2.2.3 +flake8==3.7.8 sphinx-rtd-theme==0.1.6 tox==1.9.0 pytest==2.6.4 From d0a749a20de62bbce69b00c4fab1dd49a127d712 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Gr=C3=A4tz?= Date: Tue, 13 Aug 2019 16:36:29 +0200 Subject: [PATCH 4/4] use noqa --- ramlfications/models/resource_types.py | 20 ++++++++++---------- ramlfications/models/resources.py | 26 +++++++++++++------------- tests/unit/utils/test_nodelist.py | 4 ++-- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/ramlfications/models/resource_types.py b/ramlfications/models/resource_types.py index a026839..8bd3ec5 100644 --- a/ramlfications/models/resource_types.py +++ b/ramlfications/models/resource_types.py @@ -22,7 +22,7 @@ class ResourceTypeNode(BaseNode): method. Else, resource must implement the method. :param str usage: Usage of resource type, or ``None`` :param bool optional: Inherited if resource defines method. - :param list is\_: List of assigned trait names, or ``None`` + :param list is\_: List of assigned trait names, or ``None`` # noqa: W605 :param list traits: List of assigned :py:class:`TraitNode` objects, \ or ``None`` :param str secured_by: List of ``str`` s or ``dict`` s of assigned \ @@ -35,15 +35,15 @@ class ResourceTypeNode(BaseNode): defaults to ``name`` """ - name = attr.ib() + name = attr.ib() # TODO: abstract validator in BaseNode # raw = attr.ib(repr=False, validator=defined_resource_type) - type = attr.ib(repr=False, validator=assigned_res_type) - method = attr.ib(repr=False) - usage = attr.ib(repr=False) - optional = attr.ib(repr=False) - is_ = attr.ib(repr=False, validator=assigned_traits) - traits = attr.ib(repr=False) - secured_by = attr.ib(repr=False) + type = attr.ib(repr=False, validator=assigned_res_type) + method = attr.ib(repr=False) + usage = attr.ib(repr=False) + optional = attr.ib(repr=False) + is_ = attr.ib(repr=False, validator=assigned_traits) + traits = attr.ib(repr=False) + secured_by = attr.ib(repr=False) security_schemes = attr.ib(repr=False) - display_name = attr.ib(repr=False) + display_name = attr.ib(repr=False) diff --git a/ramlfications/models/resources.py b/ramlfications/models/resources.py index 71def3e..e05f327 100644 --- a/ramlfications/models/resources.py +++ b/ramlfications/models/resources.py @@ -22,8 +22,8 @@ class ResourceNode(BaseNode): :param str path: relative path of resource :param str absolute_uri: Absolute URI of resource: \ :py:class:`RootNodeAPI08`'s ``base_uri`` + ``path`` - :param list is\_: A list of ``str`` s or ``dict`` s of resource-assigned \ - traits, or ``None`` + :param list is\_: A list of ``str`` s or ``dict`` s of \ # noqa: W605 + resource-assigned traits, or ``None`` :param list traits: A list of assigned :py:class:`TraitNode` objects, \ or ``None`` :param str type: The name of the assigned resource type, or ``None`` @@ -36,15 +36,15 @@ class ResourceNode(BaseNode): :param list security_schemes: A list of assigned \ :py:class:`parameters.SecurityScheme` objects, or ``None``. """ - name = attr.ib(repr=False) - parent = attr.ib(repr=False) - method = attr.ib() - display_name = attr.ib(repr=False) - path = attr.ib() - absolute_uri = attr.ib(repr=False) - is_ = attr.ib(repr=False, validator=assigned_traits) - traits = attr.ib(repr=False) - type = attr.ib(repr=False, validator=assigned_res_type) - resource_type = attr.ib(repr=False) - secured_by = attr.ib(repr=False) + name = attr.ib(repr=False) + parent = attr.ib(repr=False) + method = attr.ib() + display_name = attr.ib(repr=False) + path = attr.ib() + absolute_uri = attr.ib(repr=False) + is_ = attr.ib(repr=False, validator=assigned_traits) + traits = attr.ib(repr=False) + type = attr.ib(repr=False, validator=assigned_res_type) + resource_type = attr.ib(repr=False) + secured_by = attr.ib(repr=False) security_schemes = attr.ib(repr=False) diff --git a/tests/unit/utils/test_nodelist.py b/tests/unit/utils/test_nodelist.py index eb04eab..fa6b993 100644 --- a/tests/unit/utils/test_nodelist.py +++ b/tests/unit/utils/test_nodelist.py @@ -30,7 +30,7 @@ def test_nodelist(): assert linuses.first() == torvalds assert ( linuses.filter_by(first_name='Linus').filter_by(last_name='Torvalds') - .one() == + .one() == # noqa: W504 linuses.filter_by(first_name='Linus', last_name='Torvalds').one() ) @@ -59,7 +59,7 @@ def test_nodelist_dicts(): assert linuses.first() == torvalds assert ( linuses.filter_by(first_name='Linus').filter_by(last_name='Torvalds') - .one() == + .one() == # noqa: W504 linuses.filter_by(first_name='Linus', last_name='Torvalds').one() )