Mercurial > hg-stable
view .editorconfig @ 46692:9306a16ca964
debugcommands: prevent using `is False`
I was touching this code in a future patch and marmoute warned about usage of
`is False` here.
Quoting marmoute:
```
"is False" is going to check if the object you have the very same object in
memory than the one Python allocated for False (in practice 0)
This will "mostly work" on cpython because of implementation details, but
is semantically wrong and can start breaking unexpectedly
```
Differential Revision: https://phab.mercurial-scm.org/D10014
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Tue, 16 Feb 2021 20:38:14 +0530 |
parents | c25efc468a49 |
children |
line wrap: on
line source
# See http://EditorConfig.org for the specification root = true [*.py] indent_size = 4 indent_style = space trim_trailing_whitespace = true end_of_line = lf [*.{c,h}] indent_size = 8 indent_style = tab trim_trailing_whitespace = true end_of_line = lf [*.t] indent_size = 2 indent_style = space trim_trailing_whitespace = false end_of_line = lf