File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change 1- # flake8-non -english
1+ # flake8-only -english
22
3- [ ![ PyPI version] ( https://img.shields.io/pypi/v/flake8-non-english.svg?logo=pypi&logoColor=white )] ( https://pypi.org/project/flake8-non -english/ )
3+ [ ![ PyPI version] ( https://img.shields.io/pypi/v/flake8-non-english.svg?logo=pypi&logoColor=white )] ( https://pypi.org/project/flake8-only -english/ )
44Install from ** PyPI** by clicking the badge above
55
6- [ ![ GitHub] ( https://img.shields.io/badge/GitHub-Repository-black?logo=github&logoColor=white )] ( https://github.com/AlgorithmAlchemy/flake8-non -english-comments )
6+ [ ![ GitHub] ( https://img.shields.io/badge/GitHub-Repository-black?logo=github&logoColor=white )] ( https://github.com/AlgorithmAlchemy/flake8-only -english )
77View the ** source code on GitHub**
88
9- ![ Downloads] ( https://pepy.tech/badge/flake8-non -english )
9+ ![ Downloads] ( https://pepy.tech/badge/flake8-only -english )
1010![ License] ( https://img.shields.io/pypi/l/flake8-non-english.svg )
1111
1212** Flake8 plugin that enforces corporate code style by detecting and reporting any non-English text in Python source code.**
Original file line number Diff line number Diff line change @@ -21,25 +21,25 @@ def add_options(cls, parser):
2121 "--nle-comments" ,
2222 action = "store_true" ,
2323 default = None ,
24- help = "Enable non-English detection in comments (NLE001)."
24+ help = "Enable only-english detection in comments (NLE001)."
2525 )
2626 parser .add_option (
2727 "--no-nle-comments" ,
2828 action = "store_false" ,
2929 dest = "nle_comments" ,
30- help = "Disable non-English detection in comments (NLE001)."
30+ help = "Disable only-english detection in comments (NLE001)."
3131 )
3232 parser .add_option (
3333 "--nle-strings" ,
3434 action = "store_true" ,
3535 default = None ,
36- help = "Enable non-English detection in string literals (NLE002)."
36+ help = "Enable only-english detection in string literals (NLE002)."
3737 )
3838 parser .add_option (
3939 "--no-nle-strings" ,
4040 action = "store_false" ,
4141 dest = "nle_strings" ,
42- help = "Disable non-English detection in string literals (NLE002)."
42+ help = "Disable only-english detection in string literals (NLE002)."
4343 )
4444
4545 @classmethod
@@ -98,8 +98,7 @@ def _is_docstring_node(self, node):
9898 return False
9999
100100 def _contains_non_english (self , text ):
101- # Реализуй логику проверки на non-English символы
102101 for ch in text :
103- if ord (ch ) > 127 : # пример: любые не-ASCII символы
102+ if ord (ch ) > 127 :
104103 return True
105104 return False
You can’t perform that action at this time.
0 commit comments