Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Flimm
Copy link
Contributor

@Flimm Flimm commented Apr 21, 2020

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 "!="?
@@ -93,7 +93,7 @@ def _get_list_of_files(self,path):
directories = []
for root, dirs, files in natsort.natsorted(os.walk(path, topdown=False)):
for name in dirs:
if name[:1] is not '.':

Choose a reason for hiding this comment

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

whiteboard code boss ;)

Copy link

@royhodge830 royhodge830 left a comment

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.

@@ -93,7 +93,7 @@ def _get_list_of_files(self,path):
directories = []
for root, dirs, files in natsort.natsorted(os.walk(path, topdown=False)):
for name in dirs:
if name[:1] is not '.':
if name[:1] != '.':

Choose a reason for hiding this comment

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

nice catch @Flimm ;

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.

2 participants