Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Bump flake8 from 3.7.9 to 3.8.1 #318

Merged
merged 3 commits into from
May 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ show-source = True

select = E,F,W,C,I,B,S,T,Q,N400
ignore = S101,S608
extend-ignore = F821,E721
per-file-ignores =
tests/test_init_import.py:F401
tests/conftest.py:S311
axion/handler/__init__.py:F811
builtins =
_,

import-order-style=appnexus
application-package-names=axion
Expand All @@ -18,7 +21,6 @@ hang-closing = false
max-line-length = 90
inline-quotes = single

disable-noqa = True
exclude =
.git,
__pycache__,
Expand Down
4 changes: 2 additions & 2 deletions axion/handler/analysis/return_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def _analyze_headers(
elif not types.is_dict_like(headers):
return {
exceptions.Error(
param_name=f'return.headers',
param_name='return.headers',
reason=exceptions.IncorrectTypeReason(
expected=model.COOKIES_HEADERS_TYPE,
actual=headers,
Expand All @@ -115,7 +115,7 @@ def _analyze_cookies(
elif not types.is_dict_like(cookies):
return {
exceptions.Error(
param_name=f'return.cookies',
param_name='return.cookies',
reason=exceptions.IncorrectTypeReason(
expected=model.COOKIES_HEADERS_TYPE,
actual=cookies,
Expand Down
2 changes: 1 addition & 1 deletion axion/oas/parser/type.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ def _resolve_oas_string(
if min_length is not None and max_length is not None:
if min_length > max_length:
raise exceptions.OASInvalidConstraints(
f'type=string cannot have max_length < min_length. ',
'type=string cannot have max_length < min_length. ',
f'min_length={min_length} '
f'max_length={max_length}.',
)
Expand Down
2 changes: 1 addition & 1 deletion axion/utils/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def is_new_type(tt: t.Type[t.Any]) -> bool:

@functools.lru_cache(maxsize=30, typed=True)
def is_none_type(tt: t.Type[t.Any]) -> bool:
return tt is type(None) # noqa
return tt is type(None)


@functools.lru_cache(maxsize=30, typed=True)
Expand Down
2 changes: 1 addition & 1 deletion requirements/flake8.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
flake8==3.7.9
flake8==3.8.1
flake8-import-order==0.18.1
flake8-bugbear==20.1.4
flake8-commas==2.0.0
Expand Down
16 changes: 8 additions & 8 deletions tests/test_oas_mixed_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,17 +768,17 @@ def _do() -> t.Any:
raise AssertionError('This should not happen')
elif isinstance(ap_1, bool) and isinstance(ap_2, dict):
assert (
f'additionalProperties value differs between mixed schemas. '
f'a=bool != b=dict. When using "anyOf,oneOf,allOf" values in '
f'same location must be equal. '
f'Either make it so or remove one of the duplicating properties.'
'additionalProperties value differs between mixed schemas. '
'a=bool != b=dict. When using "anyOf,oneOf,allOf" values in '
'same location must be equal. '
'Either make it so or remove one of the duplicating properties.'
) == str(err.value)
elif isinstance(ap_1, dict) and isinstance(ap_2, bool):
assert (
f'additionalProperties value differs between mixed schemas. '
f'a=dict != b=bool. When using "anyOf,oneOf,allOf" values in '
f'same location must be equal. '
f'Either make it so or remove one of the duplicating properties.'
'additionalProperties value differs between mixed schemas. '
'a=dict != b=bool. When using "anyOf,oneOf,allOf" values in '
'same location must be equal. '
'Either make it so or remove one of the duplicating properties.'
) == str(err.value)
else:
raise AssertionError('This should not happen')
Expand Down