In Python 3.8+ literal comparisons using "is" instead of "==" produce a SyntaxWarning source.
I checked the entire devtools directory, this seems to be the only occurrence.
This is a small fix, but removes the SyntaxWarning. Fixes: #20338
Concept ACK
Very nice first-time contribution @tylerchambers! Warm welcome as a contributor! ❤️
To guard against this type of error entering our code base: consider enabling the flake8 check F632 in our lint-python.sh linter. That check would have caught this issue, but we're currently not opt-ing in to it :)
$ flake8 --select F632 contrib/devtools/security-check.py
contrib/devtools/security-check.py:65:24: F632 use ==/!= to compare str, bytes, and int literals
thanks @practicalswift ! done.
ACK 5eea822eb37596c7f9ea73c62f8019414cfa281b: patch looks correct
update lint-python.sh to include check F632
commits have been squashed
re-ACK b6121edf70a8d50fd16ddbba0c3168e5e49bfc2e: patch still looks correct
utACK b6121edf70a8d50fd16ddbba0c3168e5e49bfc2e