Skip to content

Commit a4776a6

Browse files
authored
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 ```
1 parent a83349d commit a4776a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

irrelevant/generate_contributions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
issue_string = ', '.join([issue_format.format(i, i) for i in issues])
4040
resp = requests.get(github_rest_api.format(handle))
4141
name = handle
42-
if resp.status_code is 200:
42+
if resp.status_code == 200:
4343
pprint.pprint(resp.json()['name'])
4444
else:
4545
print(handle, resp.content)
@@ -48,4 +48,4 @@
4848
handle,
4949
issue_string))
5050

51-
print(table_header + "\n".join(rows_so_far))
51+
print(table_header + "\n".join(rows_so_far))

0 commit comments

Comments
 (0)