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

Fix Python 3.8 SyntaxWarning: "is not" with a literal #762

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion manuskript/exporter/pandoc/abstractPlainText.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def isValid(self, format):
"""Return whether the specific setting is active with the given format."""

# Empty formats means all
if self.formats is "":
if self.formats == "":
return True

# "html" in "html markdown latex"
Expand Down
2 changes: 1 addition & 1 deletion manuskript/importer/opmlImporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,4 @@ def isWhitespaceOnly(cls, inString):
s = cls.restoreNewLines(inString)
s = ''.join(s.split())

return len(s) is 0
return len(s) == 0
2 changes: 1 addition & 1 deletion manuskript/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def activateTranslation(translation, source):

def respectSystemDarkThemeSetting():
"""Adjusts the Qt theme to match the OS 'dark theme' setting configured by the user."""
if platform.system() is not 'Windows':
if platform.system() != 'Windows':
return

# Basic Windows 10 Dark Theme support.
Expand Down