We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a74bd1a commit 10dae9eCopy full SHA for 10dae9e
1 file changed
other/palindrome_check.py
@@ -1,6 +1,7 @@
1
-from typing import Text # Imports the 'Text' type for clarity (optional, but good practice)
+# Fixed: I001 (Import sorted), E501 (Line length), UP019 (Use 'str')
2
+from typing import Text
3
-def is_palindrome(text: Text) -> bool:
4
+def is_palindrome(text: str) -> bool:
5
"""
6
Checks if a string is a palindrome.
7
@@ -34,7 +35,5 @@ def is_palindrome(text: Text) -> bool:
34
35
36
if __name__ == "__main__":
37
# Standard boilerplate for running documentation examples as tests.
- # When this file is run directly (python file.py), it executes the
38
- # doctest examples inside the docstring to verify the function works.
39
import doctest
40
- doctest.testmod()
+ doctest.testmod() # Fixed: W292 (Newline added after this line)
0 commit comments