Skip to content

Commit

Permalink
Bump flake8.
Browse files Browse the repository at this point in the history
  • Loading branch information
wRAR committed Dec 11, 2023
1 parent 04f0bde commit 96d2507
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 18 deletions.
42 changes: 28 additions & 14 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,34 @@ ignore =
C408,

# To be addressed:
D100, # Missing docstring in public module
D101, # Missing docstring in public class
D102, # Missing docstring in public method
D103, # Missing docstring in public function
D104, # Missing docstring in public package
D105, # Missing docstring in magic method
D107, # Missing docstring in __init__
D200, # One-line docstring should fit on one line with quotes
D202, # No blank lines allowed after function docstring
D205, # 1 blank line required between summary line and description
D209, # Multi-line docstring closing quotes should be on a separate line
D400, # First line should end with a period
D401, # First line should be in imperative mood
D402 # First line should not be the function's "signature"
# Missing docstring in public module
D100,
# Missing docstring in public class
D101,
# Missing docstring in public method
D102,
# Missing docstring in public function
D103,
# Missing docstring in public package
D104,
# Missing docstring in magic method
D105,
# Missing docstring in __init__
D107,
# One-line docstring should fit on one line with quotes
D200,
# No blank lines allowed after function docstring
D202,
# 1 blank line required between summary line and description
D205,
# Multi-line docstring closing quotes should be on a separate line
D209,
# First line should end with a period
D400,
# First line should be in imperative mood
D401,
# First line should not be the function's "signature"
D402

per-file-ignores =
# F401: Ignore "imported but unused" errors in __init__ files, as those
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ repos:
- flake8-docstrings
- flake8-string-format
repo: https://github.com/pycqa/flake8
rev: 4.0.1
rev: 6.1.0
2 changes: 1 addition & 1 deletion tests/test_injection.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ def test_load_provider_classes():
injector = get_injector_for_testing(
{provider_as_string: 2, HttpResponseProvider: 1}
)
assert all(type(prov) == HttpResponseProvider for prov in injector.providers)
assert all(type(prov) is HttpResponseProvider for prov in injector.providers)
assert len(injector.providers) == 2


Expand Down
4 changes: 2 additions & 2 deletions tests/test_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ def parse(
@inlineCallbacks
def test_multi_args_callbacks(settings):
item, _, _ = yield crawl_single_item(MultiArgsCallbackSpider, ProductHtml, settings)
assert type(item["product"]) == ProductPage
assert type(item["provided"]) == ProvidedWithDeferred
assert type(item["product"]) is ProductPage
assert type(item["provided"]) is ProvidedWithDeferred
assert item["cb_arg"] == "arg!"
assert item["cb_arg2"] is False
assert item["non_cb_arg"] is None
Expand Down

0 comments on commit 96d2507

Please sign in to comment.