Changes to reflect recent changes to pylint rules

This commit is contained in:
Dave Astels 2018-07-16 23:36:39 -04:00
parent becde39c98
commit c03c82963d
5 changed files with 7 additions and 7 deletions

View file

@ -28,7 +28,7 @@ Debounce an input pin.
import time
import digitalio
class Debouncer(object):
class Debouncer:
"""Debounce an input pin"""
DEBOUNCED_STATE = 0x01
@ -45,7 +45,7 @@ class Debouncer(object):
self.state = 0x00
self.pin = digitalio.DigitalInOut(pin)
self.pin.direction = digitalio.Direction.INPUT
if mode != None:
if mode is not None:
self.pin.pull = mode
if self.pin.value:
self.__set_state(Debouncer.DEBOUNCED_STATE | Debouncer.UNSTABLE_STATE)

View file

@ -30,7 +30,7 @@ import time
import digitalio
class Debouncer(object):
class Debouncer:
"""Debounce an input pin"""
DEBOUNCED_STATE = 0x01

View file

@ -29,7 +29,7 @@ Manage a directory in the file system.
import os
class DirectoryNode(object):
class DirectoryNode:
"""Display and navigate the SD card contents"""
def __init__(self, display, parent=None, name="/"):

View file

@ -52,7 +52,7 @@ ENABLE_HOST_ACCESS = False
DISABLE_HOST_ACCESS = True
class Emulator(object):
class Emulator:
"""Handle all interaction with the emulator circuit."""
def __init__(self, i2c):

View file

@ -28,7 +28,7 @@ Debounce an input pin.
import time
import digitalio
class Debouncer(object):
class Debouncer:
"""Debounce an input pin"""
DEBOUNCED_STATE = 0x01
@ -45,7 +45,7 @@ class Debouncer(object):
self.state = 0x00
self.pin = digitalio.DigitalInOut(pin)
self.pin.direction = digitalio.Direction.INPUT
if mode != None:
if mode is not None:
self.pin.pull = mode
if self.pin.value:
self.__set_state(Debouncer.DEBOUNCED_STATE | Debouncer.UNSTABLE_STATE)