mirror of
https://github.com/satwikkansal/wtfpython
synced 2024-11-22 19:14:24 +01:00
Use ==/!= to compare str, bytes, and int literals
Identity is not the same thing as equality in Python. $ __[flake8](http://flake8.pycqa.org) . --count --select=E9,F63,F7,F82 --show-source --statistics__ ``` if resp.status_code is 200: ^ 1 F632 use ==/!= to compare str, bytes, and int literals 1 ```
This commit is contained in:
parent
a83349d0cc
commit
a4776a6b67
@ -39,7 +39,7 @@ for handle, issues in contribs.items():
|
|||||||
issue_string = ', '.join([issue_format.format(i, i) for i in issues])
|
issue_string = ', '.join([issue_format.format(i, i) for i in issues])
|
||||||
resp = requests.get(github_rest_api.format(handle))
|
resp = requests.get(github_rest_api.format(handle))
|
||||||
name = handle
|
name = handle
|
||||||
if resp.status_code is 200:
|
if resp.status_code == 200:
|
||||||
pprint.pprint(resp.json()['name'])
|
pprint.pprint(resp.json()['name'])
|
||||||
else:
|
else:
|
||||||
print(handle, resp.content)
|
print(handle, resp.content)
|
||||||
|
Loading…
Reference in New Issue
Block a user