Skip to content

Avoid SyntaxWarning: "is not" with a literal#39

Closed
Flimm wants to merge 1 commit into
e1ven:masterfrom
Flimm:patch-2
Closed

Avoid SyntaxWarning: "is not" with a literal#39
Flimm wants to merge 1 commit into
e1ven:masterfrom
Flimm:patch-2

Conversation

@Flimm

@Flimm Flimm commented Apr 21, 2020

Copy link
Copy Markdown
Contributor

The full text of the warning was:

SyntaxWarning: "is not" with a literal. Did you mean "!="?

The full text of the warning was:

SyntaxWarning: "is not" with a literal. Did you mean "!="?
Comment thread robohash/robohash.py
directories = []
for root, dirs, files in natsort.natsorted(os.walk(path, topdown=False)):
for name in dirs:
if name[:1] is not '.':

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

whiteboard code boss ;)

@royhodge830 royhodge830 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

looks better. lets push forward with the improvements.

Comment thread robohash/robohash.py
for root, dirs, files in natsort.natsorted(os.walk(path, topdown=False)):
for name in dirs:
if name[:1] is not '.':
if name[:1] != '.':

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nice catch @Flimm ;

@e1ven e1ven closed this May 30, 2025
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.

3 participants