Compare to None with is/is not
This commit is contained in:
@@ -491,7 +491,7 @@ def get_git_change_year_range(filename):
|
||||
|
||||
def file_already_has_core_copyright(file_lines):
|
||||
index, _ = get_updatable_copyright_line(file_lines)
|
||||
return index != None
|
||||
return index is not None
|
||||
|
||||
################################################################################
|
||||
# insert header execution
|
||||
|
||||
@@ -125,7 +125,7 @@ def escape_cdata(text):
|
||||
return text
|
||||
|
||||
def contains_bitcoin_addr(text, errors):
|
||||
if text != None and ADDRESS_REGEXP.search(text) != None:
|
||||
if text is not None and ADDRESS_REGEXP.search(text) is not None:
|
||||
errors.append('Translation "%s" contains a bitcoin address. This will be removed.' % (text))
|
||||
return True
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user