Skip to content

Commit

Permalink
style: update flake8 version
Browse files Browse the repository at this point in the history
  • Loading branch information
vytas7 committed Oct 15, 2023
1 parent 2591055 commit f4ebc1c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 12 deletions.
6 changes: 3 additions & 3 deletions falcon/inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
"""Inspect utilities for falcon applications."""
from functools import partial
import inspect
from typing import Callable
from typing import Dict
from typing import Callable # NOQA: F401
from typing import Dict # NOQA: F401
from typing import List
from typing import Optional
from typing import Type
from typing import Type # NOQA: F401

from falcon import app_helpers
from falcon.app import App
Expand Down
2 changes: 1 addition & 1 deletion falcon/routing/compiled.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from falcon.util.sync import wrap_sync_to_async

if TYPE_CHECKING:
from typing import Any
from typing import Any # NOQA: F401

_TAB_STR = ' ' * 4
_FIELD_PATTERN = re.compile(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_request_attrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def test_subdomain(self, asgi):
# NOTE(kgriffs): Behavior for IP addresses is undefined,
# so just make sure it doesn't blow up.
req = create_req(asgi, host='127.0.0.1', path='/hello', headers=self.headers)
assert type(req.subdomain) == str
assert type(req.subdomain) is str

# NOTE(kgriffs): Test fallback to SERVER_NAME by using
# HTTP 1.0, which will cause .create_environ to not set
Expand Down
4 changes: 2 additions & 2 deletions tests/test_request_media.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def test_invalid_json(asgi):
try:
json.loads(expected_body)
except Exception as e:
assert type(client.resource.captured_error.value.__cause__) == type(e)
assert type(client.resource.captured_error.value.__cause__) is type(e)
assert str(client.resource.captured_error.value.__cause__) == str(e)


Expand All @@ -210,7 +210,7 @@ def test_invalid_msgpack(asgi):
try:
msgpack.unpackb(expected_body.encode('utf-8'))
except Exception as e:
assert type(client.resource.captured_error.value.__cause__) == type(e)
assert type(client.resource.captured_error.value.__cause__) is type(e)
assert str(client.resource.captured_error.value.__cause__) == str(e)


Expand Down
2 changes: 1 addition & 1 deletion tests/test_validators.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import typing
import typing # NOQA: F401

try:
import jsonschema as _jsonschema # NOQA
Expand Down
6 changes: 2 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,7 @@ commands = {[smoke-test]commands}
# --------------------------------------------------------------------

[testenv:pep8]
# TODO(vytas): Unpin flake8 when the below plugins have caught up.
deps = flake8<6.0
deps = flake8
flake8-quotes
flake8-import-order
commands = flake8 []
Expand All @@ -298,8 +297,7 @@ commands = flake8 \
[]

[testenv:pep8-examples]
# TODO(vytas): Unpin flake8 when the below plugins have caught up.
deps = flake8<6.0
deps = flake8
flake8-quotes
flake8-import-order

Expand Down

0 comments on commit f4ebc1c

Please sign in to comment.