mirror of
https://github.com/satwikkansal/wtfpython
synced 2024-12-22 21:00:09 +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])
|
||||
resp = requests.get(github_rest_api.format(handle))
|
||||
name = handle
|
||||
if resp.status_code is 200:
|
||||
if resp.status_code == 200:
|
||||
pprint.pprint(resp.json()['name'])
|
||||
else:
|
||||
print(handle, resp.content)
|
||||
@ -48,4 +48,4 @@ for handle, issues in contribs.items():
|
||||
handle,
|
||||
issue_string))
|
||||
|
||||
print(table_header + "\n".join(rows_so_far))
|
||||
print(table_header + "\n".join(rows_so_far))
|
||||
|
Loading…
x
Reference in New Issue
Block a user