From 709d90809cf778667ec6fb51cad2acf1facd005a Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Wed, 19 Apr 2023 22:23:23 +0200 Subject: [PATCH 1/2] fixed formatting with black --- .github/workflows/black.yml | 7 +++++-- src/escpos/escpos.py | 1 - test/test_function_set.py | 1 - 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml index 9065b5e..e33c5be 100644 --- a/.github/workflows/black.yml +++ b/.github/workflows/black.yml @@ -1,10 +1,13 @@ -name: Lint +name: Lint (Black code style) on: [push, pull_request] jobs: - lint: + black-code-style: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: psf/black@stable + with: + version: "23.3.0" + diff --git a/src/escpos/escpos.py b/src/escpos/escpos.py index 4ee6026..3460fce 100644 --- a/src/escpos/escpos.py +++ b/src/escpos/escpos.py @@ -592,7 +592,6 @@ class Escpos(object): text_distance=1, center=True, ): - image_writer = ImageWriter() # Check if barcode type exists diff --git a/test/test_function_set.py b/test/test_function_set.py index 910450e..40bac64 100644 --- a/test/test_function_set.py +++ b/test/test_function_set.py @@ -255,7 +255,6 @@ def test_align_right(): def test_densities(): - for density in range(8): instance = printer.Dummy() instance.set(density=density) From e4a73ad5c54a986a9904496e5a19545dd431c436 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Wed, 19 Apr 2023 22:27:03 +0200 Subject: [PATCH 2/2] install pycups on docbuild --- .github/workflows/documentation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 3b44bb6..c6d6072 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -26,6 +26,6 @@ jobs: run: sudo apt-get update -y && sudo apt-get install -y git python3-sphinx graphviz libenchant1c2a && - sudo pip install tox + sudo pip install tox pycups - name: Test doc build run: tox -e docs