Skip to content

Commit cec2076

Browse files
committed
refactor
1 parent f77a633 commit cec2076

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

django_mongodb/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ def parse(uri, **kwargs):
3838
else:
3939
# If the fqdn is not present, this is a standard URI and the host and
4040
# port are in the nodelist.
41-
host, port = [f"{node[0]}:{node[1]}" for node in uri["nodelist"]][0].split(":") # noqa: RUF015
41+
nodelist = [f"{node[0]}:{node[1]}" for node in uri["nodelist"]]
42+
host, port = nodelist[0].split(":")
4243

4344
settings_dict = {
4445
"ENGINE": "django_mongodb",

0 commit comments

Comments
 (0)