3 ms·
Any way to lint this pattern away? Say what you will about the language and lexer complexity, backwards compatibility. This is a code smell if I have ever seen
by CameronNemo 6y ago
Any way to lint this pattern away? Say what you will about the language and lexer complexity, backwards compatibility. This is a code smell if I have ever seen one.
- tsbinz 6y agoEnforce consistent formatting, e.g. with black (https://github.com/psf/black https://github.com/psf/black) this gets formatted to [0xF or x in (1, 2, 3)].
- mywittyname 6y agoThis issue is caught by a linter and reports, "PEP 8: E225 missing whitespace around operator".
- sco1 6y agoSome cases are, but there are still plenty of patterns that (currently) are not. e.g. `1if 1else 2` See also: https://github.com/PyCQA/pycodestyle/issues/371 https://github.com/PyCQA/pycodestyle/issues/371