Skip to content

Commit 22c50b4

Browse files
committed
Use bool() for conciseness
1 parent 9877c0c commit 22c50b4

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

markdown_it/common/normalize_url.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,4 @@ def validateLink(url: str, validator: Callable = None):
180180
if validator is not None:
181181
return validator(url)
182182
url = url.strip().lower()
183-
return (
184-
(True if GOOD_DATA_RE.search(url) else False)
185-
if BAD_PROTO_RE.search(url)
186-
else True
187-
)
183+
return bool(GOOD_DATA_RE.search(url)) if BAD_PROTO_RE.search(url) else True

0 commit comments

Comments
 (0)