ruff
9361e22f - Avoid `ANN2xx` autofix for abstract methods with empty body (#9034)

Commit
2 years ago
Avoid `ANN2xx` autofix for abstract methods with empty body (#9034) ## Summary This PR updates the `ANN201`, `ANN202`, `ANN205`, and `ANN206` rules to not create a fix for the return type when it's an abstract method and the function body is empty i.e., it only contains either a pass statement, docstring or an ellipsis literal. fixes: #9004 ## Test Plan Add the following test cases: - Abstract method with pass statement - Abstract method with docstring - Abstract method with ellipsis literal - Abstract method with possible return type
Author
Parents
Loading