Add py.typed

This commit is contained in:
Timmy Welch 2023-04-24 23:51:40 -07:00
parent e9d0e874f3
commit e2ff779c30
No known key found for this signature in database
6 changed files with 145 additions and 25 deletions

90
.gitignore vendored
View File

@ -1,7 +1,85 @@
*.egg-info # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion
*.py[co]
/.coverage *.iml
/.tox
/dist ## Directory-based project format:
.vscode/ .idea/
### Other editors
.*.swp
nbproject/
.vscode
*.exe
*.zip
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/ build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# for testing
temp/
tmp/

6
settngs/__main__.py Normal file
View File

@ -0,0 +1,6 @@
from __future__ import annotations
from settngs import _main
if __name__ == '__main__':
_main()

0
settngs/py.typed Normal file
View File

View File

@ -1,6 +1,6 @@
[metadata] [metadata]
name = settngs name = settngs
version = 0.6.2 version = 0.6.3
description = A library for managing settings description = A library for managing settings
long_description = file: README.md long_description = file: README.md
long_description_content_type = text/markdown long_description_content_type = text/markdown
@ -17,16 +17,69 @@ classifiers =
Programming Language :: Python :: Implementation :: PyPy Programming Language :: Python :: Implementation :: PyPy
[options] [options]
py_modules = settngs packages = find:
install_requires = install_requires =
typing-extensions;python_version < '3.11' typing-extensions;python_version < '3.11'
python_requires = >=3.8 python_requires = >=3.8
include_package_data = True
[options.packages.find] [options.packages.find]
exclude = exclude =
tests* tests*
testing* testing*
[options.package_data]
settngs = py.typed
[tox:tox]
envlist = py3.8,py3.9,py3.10,py3.11,pypy3
[testenv]
deps = -rrequirements-dev.txt
commands =
coverage erase
coverage run -m pytest {posargs:tests}
coverage report
[testenv:wheel]
description = Generate wheel and tar.gz
labels =
release
build
skip_install = true
deps =
build
commands_pre =
-python -c 'import shutil,pathlib; \
shutil.rmtree("./build/", ignore_errors=True); \
shutil.rmtree("./dist/", ignore_errors=True)'
commands =
python -m build
[testenv:pypi-upload]
description = Upload wheel to PyPi
platform = Linux
labels =
release
skip_install = true
depends = wheel
deps =
twine
passenv =
TWINE_*
setenv =
TWINE_NON_INTERACTIVE=true
commands =
python -m twine upload dist/*.whl dist/*.tar.gz
[pep8]
ignore = E265,E501
max_line_length = 120
[flake8]
extend-ignore = E501, A003
max_line_length = 120
[coverage:run] [coverage:run]
plugins = covdefaults plugins = covdefaults

17
tox.ini
View File

@ -1,17 +0,0 @@
[tox]
envlist = py3.8,py3.9,py3.10,py3.11,pypy3
[testenv]
deps = -rrequirements-dev.txt
commands =
coverage erase
coverage run -m pytest {posargs:tests}
coverage report
[pep8]
ignore = E265,E501
max_line_length = 120
[flake8]
extend-ignore = E501, A003
max_line_length = 120