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:
15
setup.py
15
setup.py
@@ -1,9 +1,10 @@
|
||||
#!/usr/bin/env python
|
||||
"""Setup script for python package."""
|
||||
|
||||
import os
|
||||
import sys
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
base_dir = os.path.dirname(__file__)
|
||||
src_dir = os.path.join(base_dir, "src")
|
||||
@@ -14,14 +15,18 @@ sys.path.insert(0, src_dir)
|
||||
|
||||
|
||||
def read(fname):
|
||||
"""read file from same path as setup.py"""
|
||||
"""Read file from same path as setup.py."""
|
||||
return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
||||
|
||||
|
||||
setuptools_scm_template = """\
|
||||
# coding: utf-8
|
||||
# file generated by setuptools_scm
|
||||
# don't change, don't track in version control
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
\"\"\"Version identifier.
|
||||
|
||||
file generated by setuptools_scm
|
||||
don't change, don't track in version control
|
||||
\"\"\"
|
||||
|
||||
version = '{version}'
|
||||
"""
|
||||
|
Reference in New Issue
Block a user