mirror of
https://github.com/python-escpos/python-escpos
synced 2025-08-24 09:03:34 +00:00
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
This commit is contained in:
@@ -1,20 +1,21 @@
|
||||
#!/usr/bin/python
|
||||
"""test the facility which enables usage of the with-statement
|
||||
|
||||
:author: `Patrick Kanzler <patrick.kanzler@fablab.fau.de>`_
|
||||
:author: `Patrick Kanzler <dev@pkanzler.de>`_
|
||||
:organization: `python-escpos <https://github.com/python-escpos>`_
|
||||
:copyright: Copyright (c) 2016 `python-escpos <https://github.com/python-escpos>`_
|
||||
:license: MIT
|
||||
"""
|
||||
|
||||
|
||||
import escpos.printer as printer
|
||||
import escpos.escpos as escpos
|
||||
import escpos.printer as printer
|
||||
|
||||
|
||||
def test_with_statement():
|
||||
"""Use with statement"""
|
||||
"""Use with statement
|
||||
|
||||
.. todo:: Extend these tests as they don't really do anything at the moment"""
|
||||
dummy_printer = printer.Dummy()
|
||||
with escpos.EscposIO(dummy_printer) as p:
|
||||
p.writelines("Some text.\n")
|
||||
# TODO extend these tests as they don't really do anything at the moment
|
||||
|
Reference in New Issue
Block a user