PY3.R0133
Comparison of Constants
When two literals are compared with each other the result is a constant. Using the constant directly is both easier to read and more performant. Initializing 'True' and 'False' this way is not required since Python 2.3.
Noncompliant Code:
Copy
def is_the_answer() -> bool:
return 42 == 42
Compliant Code:
Copy
def is_the_answer(meaning_of_life: int) -> bool:
return meaning_of_life == 42