Ejemplo n.º 1
0
 def _check_keyword(self, node: ast.AST) -> None:
     if isinstance(node, self._forbidden_keywords):
         if isinstance(node, ast.Delete):
             message = 'del'
         else:
             message = node.__class__.__qualname__.lower()
         self.add_violation(WrongKeywordViolation(node, text=message))
 def _check_keyword(self, node: ast.AST) -> None:
     if isinstance(node, self._forbidden_keywords):
         self.add_violation(
             WrongKeywordViolation(
                 node, text=node.__class__.__qualname__.lower(),
             ),
         )
Ejemplo n.º 3
0
 def _check_keyword(self, node: ast.AST) -> None:
     if isinstance(node, self.forbidden_keywords):
         self.add_violation(WrongKeywordViolation(node))