source actions-ci/install.sh
- name: Pip install pylint, black, & Sphinx
run: |
- pip install --force-reinstall pylint black==19.10b0 Sphinx sphinx-rtd-theme
+ pip install --force-reinstall pylint black Sphinx sphinx-rtd-theme
- name: Library version
run: git describe --dirty --always --tags
- name: Check formatting
class Enum:
"""
- Object supporting CircuitPython-style of static symbols
- as seen with Direction.OUTPUT, Pull.UP
+ Object supporting CircuitPython-style of static symbols
+ as seen with Direction.OUTPUT, Pull.UP
"""
def __repr__(self):
@classmethod
def iteritems(cls):
"""
- Inspects attributes of the class for instances of the class
- and returns as key,value pairs mirroring dict#iteritems
+ Inspects attributes of the class for instances of the class
+ and returns as key,value pairs mirroring dict#iteritems
"""
for key in dir(cls):
val = getattr(cls, key)
in_end=None,
stop=False
):
- """"Write to a device at specified address from a buffer then read
+ """ "Write to a device at specified address from a buffer then read
from a device at specified address into a buffer
"""
return self._i2c.writeto_then_readfrom(
class TestEnum(unittest.TestCase):
"""
- Verifies the repl() and str() behaviour of an example Enum
- Enums represent configuration values such as digitalio.Direction, digitalio.Pull etc.
+ Verifies the repl() and str() behaviour of an example Enum
+ Enums represent configuration values such as digitalio.Direction, digitalio.Pull etc.
"""
def setUp(self):
def test_iteritems(self):
"""A subtype of Enum can list all attributes of its own type"""
items = list(self.Cls.iteritems())
- self.assertEqual(items, [("one", self.Cls.one), ("two", self.Cls.two),])
+ self.assertEqual(
+ items,
+ [
+ ("one", self.Cls.one),
+ ("two", self.Cls.two),
+ ],
+ )
def test_repr(self):
"""A repr() call on an Enum gives its fully-qualified name"""