Skip to content

Commit cebc9bf

Browse files
committed
black'd
1 parent 49e8090 commit cebc9bf

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

asyncgpio/gpio.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class Chip:
1818
Defaults to the program name.
1919
2020
"""
21+
2122
_chip = None
2223

2324
def __init__(self, num=None, label=None, consumer=sys.argv[0]):
@@ -71,6 +72,7 @@ class Line:
7172
7273
Create this object by calling :meth:`Chip.line`.
7374
"""
75+
7476
_line = None
7577
_direction = None
7678
_flags = None
@@ -85,7 +87,11 @@ def __init__(self, chip, offset, consumer=sys.argv[0][:-3]):
8587

8688
def __repr__(self):
8789
return "<%s %s:%d %s=%d>" % (
88-
self.__class__.__name__, self._chip, self._offset, self._line, self._state
90+
self.__class__.__name__,
91+
self._chip,
92+
self._offset,
93+
self._line,
94+
self._state,
8995
)
9096

9197
def open(self, direction=gpio.DIRECTION_INPUT, default=False, flags=0):

asyncgpio/test.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
)
2020
_r_pin = re.compile("^gpio-(?P<pin>[0-9]+) \\(.*\\) (?P<dir>in|out) +(?P<val>hi|lo)")
2121

22-
Pin = namedtuple("Pin",["out","level"])
22+
Pin = namedtuple("Pin", ["out", "level"])
23+
2324

2425
class _GpioPin:
2526
"""
@@ -76,7 +77,9 @@ async def see(self, write: bool, level: bool):
7677
def set(self, value: bool):
7778
logger.debug("SET %s %d %s", self.chip, self.pin, value)
7879
if self.fd is None:
79-
raise RuntimeError("Pin %s/%d is not controlled via the 'gpio_mockup' module" % (self.chip,self.pin))
80+
raise RuntimeError(
81+
"Pin %s/%d is not controlled via the 'gpio_mockup' module" % (self.chip, self.pin)
82+
)
8083
os.write(self.fd, b"1" if value else b"0")
8184
# os.lseek(self.fd, 0, os.SEEK_SET)
8285

@@ -194,4 +197,3 @@ async def run(self):
194197
finally:
195198
self.tg = None
196199
await tg.cancel_scope.cancel()
197-

setup.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,8 @@
1313
license="MIT -or- Apache License 2.0",
1414
packages=find_packages(),
1515
setup_requires=["setuptools_scm"],
16-
install_requires=[
17-
"trio >= 0.15",
18-
"cffi",
19-
"async-generator",
20-
],
21-
keywords=[
22-
"gpio",
23-
],
16+
install_requires=["trio >= 0.15", "cffi", "async-generator",],
17+
keywords=["gpio",],
2418
python_requires=">=3.6",
2519
classifiers=[
2620
"License :: OSI Approved :: MIT License",

0 commit comments

Comments
 (0)