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

Commit f8d1a91

Browse files
committed
Ran black, updated to pylint 2.x
1 parent 723cf08 commit f8d1a91

File tree

9 files changed

+266
-206
lines changed

9 files changed

+266
-206
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
source actions-ci/install.sh
4141
- name: Pip install pylint, black, & Sphinx
4242
run: |
43-
pip install --force-reinstall pylint==1.9.2 black==19.10b0 Sphinx sphinx-rtd-theme
43+
pip install --force-reinstall pylint black==19.10b0 Sphinx sphinx-rtd-theme
4444
- name: Library version
4545
run: git describe --dirty --always --tags
4646
- name: PyLint

.pylintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ spelling-store-unknown-words=no
119119
[MISCELLANEOUS]
120120

121121
# List of note tags to take in consideration, separated by a comma.
122-
notes=FIXME,XXX,TODO
122+
# notes=FIXME,XXX,TODO
123+
notes=FIXME,XXX
123124

124125

125126
[TYPECHECK]

adafruit_thermal_printer/__init__.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,17 @@
77
* Author(s): Tony DiCola
88
"""
99

10-
from adafruit_thermal_printer.thermal_printer import JUSTIFY_LEFT, \
11-
JUSTIFY_CENTER, JUSTIFY_RIGHT, SIZE_SMALL, SIZE_MEDIUM, SIZE_LARGE, \
12-
UNDERLINE_THIN, UNDERLINE_THICK
10+
from adafruit_thermal_printer.thermal_printer import (
11+
JUSTIFY_LEFT,
12+
JUSTIFY_CENTER,
13+
JUSTIFY_RIGHT,
14+
SIZE_SMALL,
15+
SIZE_MEDIUM,
16+
SIZE_LARGE,
17+
UNDERLINE_THIN,
18+
UNDERLINE_THICK,
19+
)
20+
1321

1422
def get_printer_class(version):
1523
"""Retrieve the class to construct for an instance of the specified
@@ -20,10 +28,12 @@ def get_printer_class(version):
2028
"""
2129
assert version is not None
2230
assert version >= 0.0
31+
# pylint: disable=import-outside-toplevel
2332
if version < 2.64:
2433
import adafruit_thermal_printer.thermal_printer_legacy as thermal_printer
2534
elif version < 2.68:
2635
import adafruit_thermal_printer.thermal_printer_264 as thermal_printer
2736
else:
2837
import adafruit_thermal_printer.thermal_printer as thermal_printer
38+
# pylint: enable=import-outside-toplevel
2939
return thermal_printer.ThermalPrinter

0 commit comments

Comments
 (0)