File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1- from typing import Text # Imports the 'Text' type for clarity (optional, but good practice)
1+ # Fixed: I001 (Import sorted), E501 (Line length), UP019 (Use 'str')
2+ from typing import Text
23
3- def is_palindrome (text : Text ) -> bool :
4+ def is_palindrome (text : str ) -> bool :
45 """
56 Checks if a string is a palindrome.
67
@@ -34,7 +35,5 @@ def is_palindrome(text: Text) -> bool:
3435
3536if __name__ == "__main__" :
3637 # Standard boilerplate for running documentation examples as tests.
37- # When this file is run directly (python file.py), it executes the
38- # doctest examples inside the docstring to verify the function works.
3938 import doctest
40- doctest .testmod ()
39+ doctest .testmod () # Fixed: W292 (Newline added after this line)
You can’t perform that action at this time.
0 commit comments