4 Commits
0.6.1 ... 0.6.3

Author SHA1 Message Date
e2ff779c30 Add py.typed 2023-04-25 00:13:51 -07:00
e9d0e874f3 Merge pull request #1 from lordwelch/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-04-24 23:20:57 -07:00
c9f5d57ed1 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pre-commit/mirrors-autopep8: v2.0.1 → v2.0.2](https://github.com/pre-commit/mirrors-autopep8/compare/v2.0.1...v2.0.2)
- [github.com/pre-commit/mirrors-mypy: v1.0.1 → v1.2.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.0.1...v1.2.0)
2023-04-24 18:48:25 +00:00
ea5be60c63 Add un-committed fix and version bump 2023-02-20 02:07:35 -08:00
7 changed files with 148 additions and 28 deletions

90
.gitignore vendored
View File

@ -1,7 +1,85 @@
*.egg-info
*.py[co]
/.coverage
/.tox
/dist
.vscode/
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion
*.iml
## Directory-based project format:
.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/
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/

View File

@ -33,7 +33,7 @@ repos:
- id: pyupgrade
args: [--py38-plus]
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v2.0.1
rev: v2.0.2
hooks:
- id: autopep8
- repo: https://github.com/PyCQA/flake8
@ -42,6 +42,6 @@ repos:
- id: flake8
additional_dependencies: [flake8-encodings, flake8-warnings, flake8-builtins, flake8-length, flake8-print]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.0.1
rev: v1.2.0
hooks:
- id: mypy

View File

@ -379,7 +379,7 @@ def get_namespace(config: Config[T], defaults: bool = True, persistent: bool = T
"""
if isinstance(config.values, Namespace):
options, definitions = normalize_config(config, defaults=defaults, persistent=persistent)
options, definitions = normalize_config(config, True, True, defaults=defaults, persistent=persistent)
else:
options, definitions = config
namespace = Namespace()

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]
name = settngs
version = 0.6.1
version = 0.6.3
description = A library for managing settings
long_description = file: README.md
long_description_content_type = text/markdown
@ -17,16 +17,69 @@ classifiers =
Programming Language :: Python :: Implementation :: PyPy
[options]
py_modules = settngs
packages = find:
install_requires =
typing-extensions;python_version < '3.11'
python_requires = >=3.8
include_package_data = True
[options.packages.find]
exclude =
tests*
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]
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