Skip to content

Commit 1979a75

Browse files
committed
Format code with black
1 parent 9f7077c commit 1979a75

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

can/interfaces/__init__.py

+15-3
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,24 @@
2929

3030
try:
3131
from importlib.metadata import entry_points
32+
3233
entry = entry_points()
33-
if 'can.interface' in entry:
34-
BACKENDS.update({interface.name: tuple(interface.value.split(':')) for interface in entry['can.interface']})
34+
if "can.interface" in entry:
35+
BACKENDS.update(
36+
{
37+
interface.name: tuple(interface.value.split(":"))
38+
for interface in entry["can.interface"]
39+
}
40+
)
3541
except ImportError:
3642
from pkg_resources import iter_entry_points
43+
3744
entry = iter_entry_points("can.interface")
38-
BACKENDS.update({interface.name: (interface.module_name, interface.attrs[0]) for interface in entry})
45+
BACKENDS.update(
46+
{
47+
interface.name: (interface.module_name, interface.attrs[0])
48+
for interface in entry
49+
}
50+
)
3951

4052
VALID_INTERFACES = frozenset(list(BACKENDS.keys()))

0 commit comments

Comments
 (0)