Skip to content

Commit e6efa6d

Browse files
committed
Linter fix for constants.py
1 parent dfa2be4 commit e6efa6d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scc/constants.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@
2626
#from importlib.metadata import version, packages_distributions
2727
#distribution_name = packages_distributions()[__package__][0]
2828
# python < 3.10 (Focal, Bullseye)
29-
from importlib.metadata import version, distributions
30-
distribution_name = [dist.metadata["Name"] for dist in distributions() if __package__ in (dist.read_text("top_level.txt") or "").split()][0]
29+
from importlib.metadata import distributions, version
30+
31+
distribution_name = next(dist.metadata["Name"] for dist in distributions() if __package__ in (dist.read_text("top_level.txt") or "").split())
3132

3233
"""
33-
If SC-Controller is updated while daemon is running, DAEMON_VERSION send by
34+
If SC Controller is updated while daemon is running, DAEMON_VERSION send by
3435
daemon will differ one one expected by UI and daemon will be forcefully restarted.
3536
"""
3637
DAEMON_VERSION = version(distribution_name)

0 commit comments

Comments
 (0)