Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor SpiderMiddlewareManager.scrape_response. #4982

Merged
merged 1 commit into from Feb 8, 2021

Conversation

wRAR
Copy link
Member

@wRAR wRAR commented Feb 8, 2021

I decided to extract nested functions from the method because after adding more code there in #4978 pylint was raising "Too many statements". Looks like they were nested to be able to access several vars from the outside scope so now they are passed explicitly. I don't know if this is the best way to resolve this, so suggestions are welcome.

@wRAR wRAR requested a review from kmike February 8, 2021 17:39
@codecov
Copy link

codecov bot commented Feb 8, 2021

Codecov Report

Merging #4982 (1e9b52c) into master (904a501) will increase coverage by 0.21%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4982      +/-   ##
==========================================
+ Coverage   87.81%   88.02%   +0.21%     
==========================================
  Files         158      158              
  Lines        9719     9723       +4     
  Branches     1433     1433              
==========================================
+ Hits         8535     8559      +24     
+ Misses        929      910      -19     
+ Partials      255      254       -1     
Impacted Files Coverage Δ
scrapy/core/spidermw.py 100.00% <100.00%> (ø)
scrapy/core/downloader/__init__.py 92.48% <0.00%> (+1.50%) ⬆️
scrapy/robotstxt.py 97.53% <0.00%> (+22.22%) ⬆️

@Gallaecio Gallaecio merged commit de82ca8 into scrapy:master Feb 8, 2021
@wRAR wRAR deleted the refactor-spidermiddlewaremanager branch May 8, 2023 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants