Skip to content

Commit 2d0e2c1

Browse files
committed
Fix PLC1901 compare-to-empty-string
1 parent eb05198 commit 2d0e2c1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ircstream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def from_message(cls, message: str) -> IRCMessage:
162162

163163
while original_params:
164164
# skip multiple spaces in middle of message, as per RFC 1459
165-
if original_params[0] == "" and len(original_params) > 1:
165+
if not original_params[0] and len(original_params) > 1:
166166
original_params.pop(0)
167167
continue
168168
elif original_params[0].startswith(":"):

tests/test_ircmessage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def test_msg_split(data_msg_split: Mapping[str, Any]) -> None:
5050
if "verb" in atoms:
5151
assert parsed.command.lower() == atoms["verb"].lower()
5252
else:
53-
assert parsed.command == ""
53+
assert not parsed.command
5454

5555
if "params" in atoms:
5656
atom_params = list(atoms["params"])

0 commit comments

Comments
 (0)