Skip to content

Commit

Permalink
Remove redundant set
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Gerbik committed Jun 1, 2022
1 parent 9546d6f commit a5ec6a4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions dj_database_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def __str__(self):


ENGINE_SCHEMES = {}
_seen_schemes = set()


def default_postprocess(parsed_config):
Expand All @@ -52,9 +51,8 @@ def register(backend, schemes=None):
schemes = schemes or [backend.rsplit(".")[-1]]
schemes = [schemes] if isinstance(schemes, str) else schemes
for scheme in schemes:
if scheme not in _seen_schemes:
if scheme not in ENGINE_SCHEMES:
urlparse.uses_netloc.append(scheme)
_seen_schemes.add(scheme)
ENGINE_SCHEMES[scheme] = engine

def inner(func):
Expand Down

0 comments on commit a5ec6a4

Please sign in to comment.