Skip to content

Commit

Permalink
Use elif
Browse files Browse the repository at this point in the history
Co-authored-by: Petter Friberg <petter@5monkeys.se>
  • Loading branch information
lundberg and flaeppe committed Nov 11, 2021
1 parent ccddc21 commit eee050f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion respx/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def request(
pattern_keys = {p.split("__", 1)[0] for p in lookups.keys()}
if "method" in pattern_keys:
raise TypeError("Got multiple values for pattern 'method'")
if url and "url" in pattern_keys:
elif url and "url" in pattern_keys:
raise TypeError("Got multiple values for pattern 'url'")

return self.route(method=method, url=url, name=name, **lookups)
Expand Down

0 comments on commit eee050f

Please sign in to comment.