-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Bug 🪲Needs PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementation
Description
Bug description
var == '\n'
I confirmed this happens in magic-value
, but I don't know if there are other errors that this can apply to.
Maybe it should use repr
instead of str
for representing values?
This also happens with other characters:
'\r'
:'. (magic-value-comparison) R2004: Consider using a named constant or an enum instead of '
- Any color code (for example
'\033[92m'
): Everything afterinstead of '
is colored green
Configuration
[MAIN]
load-plugins=pylint.extensions.magic_value
Command used
pylint a.py
Pylint output
R2004: Consider using a named constant or an enum instead of '
'. (magic-value-comparison)
Expected behavior
R2004: Consider using a named constant or an enum instead of '\n'. (magic-value-comparison)
Pylint version
pylint 2.16.0-dev
astroid 2.12.13
Python 3.9.15 (main, Nov 11 2022, 13:33:56)
[GCC 9.4.0]
OS / Environment
No response
Additional dependencies
No response
Metadata
Metadata
Assignees
Labels
Bug 🪲Needs PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementation