Commit Graph

15 Commits

Author SHA1 Message Date
Patrick Kanzler fbabd8ed88
Drop Py37, improve typing and docstrings (#544)
Drops Py3.7, improves typing and adds a mypy config, improves the docstrings and isorts the imports.

* configure isort
* sort with isort
* add github action
* enable flake8-docstrings
* fix docstrings
* add mypy env
* no implicit optional
* add type for raw
* add some type hints
2023-08-15 01:03:36 +02:00
Patrick Kanzler 435f2bba24 reformat codebase 2021-10-30 18:15:22 +02:00
Romain Porte cb30d7a881 drop Python 2.7 support
Python 2.7 EOL is arriving on 2020-01-01: https://pythonclock.org/

This will allow us to use Python 3 only libraries, like python-barcode,
which can maintain a reduced, simpler codebase, due to only one version
to support.

Closes #371.

Signed-off-by: Romain Porte <microjoe@microjoe.org>
2020-05-10 10:55:44 +02:00
Romain Porte b64b534394 Add methods for simpler newlines (#246) 2017-08-01 17:09:24 +02:00
Patrick Kanzler 3ee787e8b1
change license to MIT 2017-01-31 03:55:50 +01:00
Michael Billington 7b68d97f5f test fixes - just case-changes to match code page names, seems to need 'future' pip module 2016-09-13 20:28:54 +10:00
Michael Elsdörfer 2f89f3fe3a Port to current version of escpos-printer-db. 2016-08-30 17:08:27 +02:00
Michael Elsdörfer b37f4fc8cc Merge branch 'capabilities' into text-encoding 2016-08-30 13:36:53 +02:00
Michael Elsdörfer 3681c5c7bf Fix tests for Python 3. 2016-08-30 13:21:07 +02:00
Michael Elsdörfer 3d8626d17e Update text() test to use dummy printer. 2016-08-30 13:08:23 +02:00
Michael Elsdörfer f6ce7e45da Merge branch 'capabilities' into text-encoding 2016-08-26 15:29:31 +02:00
Michael Elsdörfer 8b5bc9cf8a Make the Escpos class accept a profile.
This is now used for the block_text function.
2016-08-26 10:41:01 +02:00
Patrick Kanzler 0cfedb5706 add automatic codepage-changing
This code is adapted from the works by Frédéric Van der Essen in
pyxmlescpos.
I had to adapt the code completely in order to make it compatible with
modern unicode-handling

Further changes:
* improve text unittests in CLI and MagicEncode with hypothesis
* add feature force_encoding in order to enable old behaviour
* disable cli_text_test (for now)
* fix charcode(): it does now cooperate with the new structure
* remove redundant variable codepage from class Escpos
2016-08-02 04:42:21 +02:00
Patrick Kanzler 0121aa0bfb
REFACTOR add PEP8-newlines 2016-04-02 15:29:51 +02:00
Patrick Kanzler bda7f85346 ADD test for image printing and text
* image printing does not check output
* text test checks output of a very basic string
2016-03-08 20:07:16 +01:00