Skip to content

Commit

Permalink
[OpenMP] Fix comparison to None in openmp/**.py (llvm#94020)
Browse files Browse the repository at this point in the history
from PEP8
(https://peps.python.org/pep-0008/#programming-recommendations):

> Comparisons to singletons like None should always be done with is or
is not, never the equality operators.

Co-authored-by: Eisuke Kawashima <[email protected]>
  • Loading branch information
e-kwsm and e-kwsm authored Jul 16, 2024
1 parent 11a9ab1 commit cf00bb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openmp/libompd/gdb-plugin/ompd/ompd_callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def _thread_context(*args):
m = re.search(r"(0x[a-fA-F0-9]+)", line)
elif lwp:
m = re.search(r"\([^)]*?(\d+)[^)]*?\)", line)
if m == None:
if m is None:
continue
pid = int(m.group(1), 0)
if pid == thread_id:
Expand Down

0 comments on commit cf00bb0

Please sign in to comment.