Skip to content

Commit fba55b4

Browse files
committed
txt.lower() == txt -> txt.islower()
1 parent 0256d58 commit fba55b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chess/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ def from_symbol(cls, symbol):
663663
664664
Raises :exc:`ValueError` if the symbol is invalid.
665665
"""
666-
if symbol.lower() == symbol:
666+
if symbol.islower():
667667
return cls(PIECE_SYMBOLS.index(symbol), BLACK)
668668
else:
669669
return cls(PIECE_SYMBOLS.index(symbol.lower()), WHITE)

0 commit comments

Comments
 (0)