Browse Source

code cleanup after running flake8

pyinstaller
Holger Frey 7 years ago
parent
commit
337c7af90c
  1. 4
      arduino_timetable/timetable.py
  2. 6
      setup.py

4
arduino_timetable/timetable.py

@ -175,6 +175,7 @@ def time_as_timedelta(time_object): @@ -175,6 +175,7 @@ def time_as_timedelta(time_object):
microseconds=time_object.microsecond
)
def parse_command(command, available_commands=None):
''' parses a string and checks if it is a valid command
@ -306,7 +307,6 @@ class TimedCommands(object): @@ -306,7 +307,6 @@ class TimedCommands(object):
port = port or find_arduino_port()
self.serial = serial.Serial(port, baudrate, **serial_kwargs)
def _ensure_command_dict(self, iterable):
''' ensures, that the available commands are a dictionary
@ -333,12 +333,10 @@ class TimedCommands(object): @@ -333,12 +333,10 @@ class TimedCommands(object):
msg = 'available commands should be a list or dict of strings'
raise TypeError(msg)
def run(self):
''' run the scheduled commands '''
run(self.commands, self.serial)
def close(self):
''' closes an open serial connection '''
self.serial.close()

6
setup.py

@ -6,13 +6,8 @@ derived from https://github.com/pypa/sampleproject @@ -6,13 +6,8 @@ derived from https://github.com/pypa/sampleproject
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
import codecs
import os
# regular expressions for version string parsing from __init___.py
import re
import io
# the current directory of this file
@ -29,6 +24,7 @@ def read(*names, **kwargs): @@ -29,6 +24,7 @@ def read(*names, **kwargs):
with open(path, 'r', encoding=encoding) as file_handle:
return file_handle.read()
def find_version(*file_paths):
''' # version string parsing from __init___.py

Loading…
Cancel
Save