Skip to content

Commit

Permalink
created url_parser and removed duplication
Browse files Browse the repository at this point in the history
Signed-off-by: ahmedsobeh <[email protected]>
  • Loading branch information
ahmedsobeh committed Jun 28, 2024
1 parent 2cde990 commit 40989c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion valkey/_parsers/url_parser.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from valkey.asyncio.connection import ConnectKwargs, UnixDomainSocketConnection, SSLConnection
from urllib.parse import ParseResult, parse_qs, unquote, urlparse
from types import MappingProxyType
from typing import (
Expand Down Expand Up @@ -34,6 +33,8 @@ def to_bool(value) -> Optional[bool]:


def parse_url(url: str) -> ConnectKwargs:
from valkey.asyncio.connection import ConnectKwargs, UnixDomainSocketConnection, SSLConnection

parsed: ParseResult = urlparse(url)
kwargs: ConnectKwargs = {}

Expand Down

0 comments on commit 40989c2

Please sign in to comment.