Skip to content

Commit

Permalink
swapped "is" for "==" in literal comparison
Browse files Browse the repository at this point in the history
update lint-python.sh to include check F632
  • Loading branch information
Tyler Chambers committed Nov 9, 2020
1 parent 7e37329 commit b6121ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/devtools/security-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def get_ELF_program_headers(executable):
splitline = [x.strip() for x in line.split()]
flags = splitline[ofs_flags]
# check for 'R', ' E'
if splitline[ofs_flags + 1] is 'E':
if splitline[ofs_flags + 1] == 'E':
flags += ' E'
headers.append((typ, flags, []))
count += 1
Expand Down
1 change: 1 addition & 0 deletions test/lint/lint-python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ enabled=(
F621 # too many expressions in an assignment with star-unpacking
F622 # two or more starred expressions in an assignment (a, *b, *c = d)
F631 # assertion test is a tuple, which are always True
F632 # use ==/!= to compare str, bytes, and int literals
F701 # a break statement outside of a while or for loop
F702 # a continue statement outside of a while or for loop
F703 # a continue statement in a finally block in a loop
Expand Down

0 comments on commit b6121ed

Please sign in to comment.