@@ -68,7 +68,6 @@ def _check_comments(self):
6868 yield token .start [0 ], token .start [1 ], "NLE001 Non-English text in comment" , type (self )
6969
7070 elif token .type == tokenize .STRING :
71- # Это docstring, считаем как комментарий
7271 if self ._is_docstring (token ):
7372 if self ._contains_non_english (token .string ):
7473 yield token .start [0 ], token .start [1 ], "NLE001 Non-English text in docstring" , type (self )
@@ -81,16 +80,9 @@ def _check_strings(self):
8180 yield node .lineno , node .col_offset , "NLE002 Non-English text in string literal" , type (self )
8281
8382 def _is_docstring (self , token ):
84- """
85- Определяет, является ли строка docstring.
86- """
87- # Проверяем, если это тройные кавычки
8883 return token .string .startswith ('"""' ) or token .string .startswith ("'''" )
8984
9085 def _is_docstring_node (self , node ):
91- """
92- Проверяет, является ли ast.Str узел docstring.
93- """
9486 parent = getattr (node , "parent" , None )
9587 if parent and isinstance (parent , (ast .FunctionDef , ast .AsyncFunctionDef , ast .ClassDef , ast .Module )):
9688 if parent .body and isinstance (parent .body [0 ], ast .Expr ):
0 commit comments