Use ==/!= to compare str, bytes, and int literals

This commit is contained in:
cclauss
2019-03-19 21:40:06 +01:00
parent 581a6a725a
commit bb31716c97
6 changed files with 7 additions and 7 deletions

View File

@@ -7,7 +7,7 @@ from django.db import migrations, models
def add_default_enable(apps, schema_editor):
ForumsConfig = apps.get_model("django_comment_common", "ForumsConfig")
settings_count = ForumsConfig.objects.count()
if settings_count is 0:
if settings_count == 0:
# By default we want the comment client enabled, but this is *not* enabling
# discussions themselves by default, as in showing the Disucussions tab, or
# inline discussions, etc. It just allows the underlying service client to work.

View File

@@ -634,12 +634,12 @@ def click_tools():
@world.absorb
def is_mac():
return platform.mac_ver()[0] is not ''
return platform.mac_ver()[0] != ''
@world.absorb
def is_firefox():
return world.browser.driver_name is 'Firefox'
return world.browser.driver_name == 'Firefox'
@world.absorb