MCPcopy Index your code
hub / github.com/python/mypy / redundant_expr

Method redundant_expr

mypy/messages.py:2166–2171  ·  view source on GitHub ↗
(self, description: str, truthiness: bool, context: Context)

Source from the content-addressed store, hash-verified

2164 self.redundant_expr("If condition", truthiness, context)
2165
2166 def redundant_expr(self, description: str, truthiness: bool, context: Context) -> None:
2167 self.fail(
2168 f"{description} is always {str(truthiness).lower()}",
2169 context,
2170 code=codes.REDUNDANT_EXPR,
2171 )
2172
2173 def impossible_intersection(
2174 self, formatted_base_class_list: str, reason: str, context: Context

Calls 3

failMethod · 0.95
strClass · 0.85
lowerMethod · 0.80

Tested by

no test coverage detected