Skip to content

Commit 2627122

Browse files
authored
Minor tweak for cleaner logic
1 parent 2c6f4f0 commit 2627122

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/rfc3986/normalizers.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@ def encode_component(uri_component, encoding):
135135
compat.to_str(uri_component, encoding)))
136136

137137
uri_bytes = compat.to_bytes(uri_component, encoding)
138-
is_percent_encoded = (percent_encodings > 0
139-
and percent_encodings == uri_bytes.count(b'%'))
138+
is_percent_encoded = percent_encodings == uri_bytes.count(b'%')
140139

141140
encoded_uri = bytearray()
142141

0 commit comments

Comments
 (0)