def _post_visit(self) -> None:
     for string, usage_count in self._string_constants.items():
         if usage_count > self.options.max_string_usages:
             self.add_violation(
                 complexity.OverusedStringViolation(
                     text=source.render_string(string) or "''",
                     baseline=self.options.max_string_usages,
                 ), )
예제 #2
0
 def _post_visit(self) -> None:
     for string, usage_count in self._string_constants.items():
         if usage_count > self.options.max_string_usages:
             self.add_violation(
                 complexity.OverusedStringViolation(text=string or "''"),
             )