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

Typing: annotate a few Spider attributes #4691

Merged
merged 1 commit into from
Aug 27, 2020

Conversation

elacuesta
Copy link
Member

@elacuesta elacuesta commented Jul 22, 2020

Not really a comprehensive annotation, just a few attributes to remove several files from the ignore list.

@@ -255,7 +255,7 @@ class CrawlSpiderWithParseMethod(MockServerSpider, CrawlSpider):
A CrawlSpider which overrides the 'parse' method
"""
name = 'crawl_spider_with_parse_method'
custom_settings = {
custom_settings: dict = {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really know why this is necessary, since custom_settings is annotated in the base class 🤷

@Gallaecio Gallaecio modified the milestones: Python 3.6+, 2.4 Aug 17, 2020
scrapy/spiders/crawl.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Aug 23, 2020

Codecov Report

Merging #4691 into master will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4691      +/-   ##
==========================================
+ Coverage   87.16%   87.18%   +0.02%     
==========================================
  Files         160      160              
  Lines        9814     9816       +2     
  Branches     1448     1448              
==========================================
+ Hits         8554     8558       +4     
+ Misses        997      996       -1     
+ Partials      263      262       -1     
Impacted Files Coverage Δ
scrapy/spiders/__init__.py 100.00% <100.00%> (ø)
scrapy/spiders/crawl.py 94.62% <100.00%> (+0.05%) ⬆️
scrapy/core/downloader/__init__.py 90.97% <0.00%> (+1.50%) ⬆️

@elacuesta elacuesta marked this pull request as ready for review August 26, 2020 11:58
@kmike kmike merged commit 64905e3 into scrapy:master Aug 27, 2020
@kmike
Copy link
Member

kmike commented Aug 27, 2020

Thanks @elacuesta and @Gallaecio!

@elacuesta elacuesta deleted the typing-spider-attributes branch August 27, 2020 19:25
@elacuesta elacuesta restored the typing-spider-attributes branch October 1, 2021 14:33
@elacuesta elacuesta deleted the typing-spider-attributes branch October 1, 2021 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants