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

Fix argument type (int -> bool) #4950

Merged
merged 5 commits into from Apr 1, 2021
Merged

Fix argument type (int -> bool) #4950

merged 5 commits into from Apr 1, 2021

Conversation

azenkwed
Copy link
Contributor

@azenkwed azenkwed commented Jan 8, 2021

Fix warning: Expected type 'bool', got 'int' instead.

Changing value from 1 to True for parameter doseq as per the documenation of urllib.parse.urlencode()

@codecov
Copy link

codecov bot commented Jan 8, 2021

Codecov Report

Merging #4950 (11eb0ce) into master (0a1e2fe) will decrease coverage by 0.18%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4950      +/-   ##
==========================================
- Coverage   88.02%   87.83%   -0.19%     
==========================================
  Files         158      158              
  Lines        9719     9719              
  Branches     1433     1433              
==========================================
- Hits         8555     8537      -18     
- Misses        910      928      +18     
  Partials      254      254              
Impacted Files Coverage Δ
scrapy/http/request/form.py 95.34% <100.00%> (ø)
scrapy/robotstxt.py 75.30% <0.00%> (-22.23%) ⬇️

@elacuesta
Copy link
Member

Looks good, thanks. FYI, I merged the master branch because the diff was showing some changes that were already merged in #4940.

@elacuesta elacuesta changed the title Azenkwed fix type warning Fix argument type (int -> bool) Jan 8, 2021
Copy link
Member

@elacuesta elacuesta left a comment

Choose a reason for hiding this comment

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

Actually, I just found a few more occurrences, could you update them as well?

$ grep -rni "doseq=1" .
./tests/spiders.py:48:        url = self.mockserver.url(f"/follow?{urlencode(qargs, doseq=1)}")
./tests/spiders.py:248:            url = self.mockserver.url(f"/follow?{urlencode(qargs, doseq=1)}")
./scrapy/commands/bench.py:53:        url = f'{self.baseurl}?{urlencode(qargs, doseq=1)}'

@azenkwed
Copy link
Contributor Author

azenkwed commented Jan 9, 2021

Looks good, thanks. FYI, I merged the master branch because the diff was showing some changes that were already merged in #4940.

Yes sorry about that, I saw that, but I am not sure why that happened.

@kmike
Copy link
Member

kmike commented Apr 1, 2021

Hey! I'm merging this PR, as it is an improvement over what we have now, but @elacuesta's comment is valid.

@kmike kmike merged commit ad74567 into scrapy:master Apr 1, 2021
@azenkwed azenkwed deleted the azenkwed-Fix_type_warning branch April 3, 2021 10:49
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

3 participants