Skip to content

Commit

Permalink
Use ==/!= to compare constant literals (str, bytes, int, float, tuple)
Browse files Browse the repository at this point in the history
Avoid [SyntaxWarnings on Python >= 3.8](https://docs.python.org/3/whatsnew/3.8.html#porting-to-python-3-8).

% `python3.8`
```
>>> 0 is 0
<stdin>:1: SyntaxWarning: "is" with a literal. Did you mean "=="?
```
  • Loading branch information
cclauss committed Jul 12, 2020
1 parent 676881e commit caf5001
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions h8mail/utils/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def get_intelx(self, api_keys):
for record in search["records"]:
filename = record["systemid"].strip() + ".txt"
intel_files.append(filename)
if record["media"] is not 24:
if record["media"] != 24:
c.info_news(
"Skipping {name}, not text ({type})".format(
type=record["mediah"], name=record["name"]
Expand Down Expand Up @@ -419,7 +419,7 @@ def get_scylla(self, user_query="email"):
self.data.append(("SCYLLA_USERNAME", k))
self.pwned += 1
elif (
"Email" in field and k is not None and user_query is not "email"
"Email" in field and k is not None and user_query != "email"
):
self.data.append(("SCYLLA_EMAIL", k))
self.pwned += 1
Expand Down

0 comments on commit caf5001

Please sign in to comment.