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,12 +1,15 @@
|
||||
from escpos.printer import CupsPrinter
|
||||
"""Example for a flask application."""
|
||||
from flask import Flask
|
||||
|
||||
from escpos.printer import CupsPrinter
|
||||
|
||||
# Initialize Flask app
|
||||
app = Flask(__name__)
|
||||
|
||||
|
||||
@app.route("/", methods=["GET"])
|
||||
def do_print():
|
||||
"""Print."""
|
||||
# p = Usb(0x04b8, 0x0e28, 0)
|
||||
p = CupsPrinter(host="localhost", port=631, printer_name="TM-T20III")
|
||||
p.text("Hello World\n")
|
||||
|
@@ -3,7 +3,6 @@ argcomplete==3.0.8
|
||||
blinker==1.6.2
|
||||
click==8.1.3
|
||||
Flask==2.3.2
|
||||
future==0.18.3
|
||||
itsdangerous==2.1.2
|
||||
Jinja2==3.1.2
|
||||
MarkupSafe==2.1.2
|
||||
|
Reference in New Issue
Block a user