diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2023-02-25 21:39:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-25 21:39:37 +0100 |
commit | c785e3edb82683e50d5d370c1c4e992ebda036a0 (patch) | |
tree | 826f9ca9fb19957af3e34dee42a7ba27a56c6050 /pylint | |
parent | 8bf11209780a93833a3da7f7345313271e1553f5 (diff) | |
download | pylint-git-c785e3edb82683e50d5d370c1c4e992ebda036a0.tar.gz |
[doc] Add an example for 'non-ascii-file-name' (#8340)
And move links to related.rst
Co-authored-by: Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com>
Diffstat (limited to 'pylint')
-rw-r--r-- | pylint/checkers/non_ascii_names.py | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/pylint/checkers/non_ascii_names.py b/pylint/checkers/non_ascii_names.py index 6e3628063..455e575ad 100644 --- a/pylint/checkers/non_ascii_names.py +++ b/pylint/checkers/non_ascii_names.py @@ -43,22 +43,14 @@ class NonAsciiNameChecker(base_checker.BaseChecker): ), # First %s will always be "file" "W2402": ( - ( - '%s name "%s" contains a non-ASCII character. PEP 3131 only allows ' - "non-ascii identifiers, not file names." - ), + '%s name "%s" contains a non-ASCII character.', "non-ascii-file-name", ( # Some = PyCharm at the time of writing didn't display the non_ascii_name_loł - # files and had big troubles with git. - # Probably only a bug shows the problem quite good. - # That's also why this is a warning and not only a convention! - "Some editors don't support non-ASCII file names properly. " - "Even though Python supports UTF-8 files since Python 3.5 this isn't " - "recommended for interoperability. Further reading:\n" - "- https://peps.python.org/pep-0489/#export-hook-name\n" - "- https://peps.python.org/pep-0672/#confusing-features\n" - "- https://bugs.python.org/issue20485" + # files. That's also why this is a warning and not only a convention! + "Under python 3.5, PEP 3131 allows non-ascii identifiers, but not non-ascii file names." + "Since Python 3.5, even though Python supports UTF-8 files, some editors or tools " + "don't." ), ), # First %s will always be "module" |