Skip to content

Commit d7f1a26

Browse files
committed
Rollup merge of #45120 - johnthagen:none-identity-test, r=sfackler
Use identity operator `is` when comparing to None This is very minor, but idiomatic Python code uses `is` for comparisons to `None`. This is because semantically we want to compare to the "identity" of `None`, not its value. See [PEP8 for details](https://www.python.org/dev/peps/pep-0008/#programming-recommendations).
2 parents 380b795 + d9e6703 commit d7f1a26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bootstrap/bootstrap.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ def get_toml(self, key):
498498
499499
If the key does not exists, the result is None:
500500
501-
>>> rb.get_toml("key3") == None
501+
>>> rb.get_toml("key3") is None
502502
True
503503
"""
504504
for line in self.config_toml.splitlines():

0 commit comments

Comments
 (0)