Skip to content
This repository was archived by the owner on May 16, 2023. It is now read-only.

Ran black, updated to pylint 2.x #15

Merged
merged 1 commit into from
Mar 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
source actions-ci/install.sh
- name: Pip install pylint, black, & Sphinx
run: |
pip install --force-reinstall pylint==1.9.2 black==19.10b0 Sphinx sphinx-rtd-theme
pip install --force-reinstall pylint black==19.10b0 Sphinx sphinx-rtd-theme
- name: Library version
run: git describe --dirty --always --tags
- name: PyLint
Expand Down
3 changes: 2 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ spelling-store-unknown-words=no
[MISCELLANEOUS]

# List of note tags to take in consideration, separated by a comma.
notes=FIXME,XXX,TODO
# notes=FIXME,XXX,TODO
notes=FIXME,XXX


[TYPECHECK]
Expand Down
16 changes: 13 additions & 3 deletions adafruit_thermal_printer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,17 @@
* Author(s): Tony DiCola
"""

from adafruit_thermal_printer.thermal_printer import JUSTIFY_LEFT, \
JUSTIFY_CENTER, JUSTIFY_RIGHT, SIZE_SMALL, SIZE_MEDIUM, SIZE_LARGE, \
UNDERLINE_THIN, UNDERLINE_THICK
from adafruit_thermal_printer.thermal_printer import (
JUSTIFY_LEFT,
JUSTIFY_CENTER,
JUSTIFY_RIGHT,
SIZE_SMALL,
SIZE_MEDIUM,
SIZE_LARGE,
UNDERLINE_THIN,
UNDERLINE_THICK,
)


def get_printer_class(version):
"""Retrieve the class to construct for an instance of the specified
Expand All @@ -20,10 +28,12 @@ def get_printer_class(version):
"""
assert version is not None
assert version >= 0.0
# pylint: disable=import-outside-toplevel
if version < 2.64:
import adafruit_thermal_printer.thermal_printer_legacy as thermal_printer
elif version < 2.68:
import adafruit_thermal_printer.thermal_printer_264 as thermal_printer
else:
import adafruit_thermal_printer.thermal_printer as thermal_printer
# pylint: enable=import-outside-toplevel
return thermal_printer.ThermalPrinter
Loading