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

replace set constructor with set literals #4573

Merged

Conversation

noviluni
Copy link
Member

@noviluni noviluni commented May 13, 2020

I replaced the uses of the set constructor with set literals as the performance is slightly better.

@elacuesta
Copy link
Member

elacuesta commented May 13, 2020

Interesting, I had no idea. Reading this post, it seems like it might be possible to convert other occurrences as well, using unpacking: {*<iterable>}.
Are there any occurrences outside of the tests?

wRAR
wRAR approved these changes May 14, 2020
@noviluni noviluni closed this May 14, 2020
@noviluni noviluni reopened this May 14, 2020
@codecov
Copy link

codecov bot commented May 14, 2020

Codecov Report

Merging #4573 into master will decrease coverage by 0.08%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4573      +/-   ##
==========================================
- Coverage   84.55%   84.47%   -0.09%     
==========================================
  Files         164      164              
  Lines        9923     9923              
  Branches     1475     1475              
==========================================
- Hits         8390     8382       -8     
- Misses       1266     1273       +7     
- Partials      267      268       +1     
Impacted Files Coverage Δ
scrapy/utils/py36.py 20.00% <0.00%> (-80.00%) ⬇️
scrapy/utils/spider.py 62.50% <0.00%> (-12.50%) ⬇️

@Gallaecio Gallaecio merged commit fffb0a5 into scrapy:master May 15, 2020
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants