From 36f06a03e7c446d88a194a631d35010a68c9f0d7 Mon Sep 17 00:00:00 2001 From: Aaron Bach Date: Thu, 27 Oct 2022 18:37:12 -0600 Subject: [PATCH] Yes? --- README.md | 2 +- aiopurpleair/model/keys.py | 4 +-- noxfile.py | 34 ------------------- poetry.lock | 69 +------------------------------------- pyproject.toml | 1 - 5 files changed, 4 insertions(+), 106 deletions(-) delete mode 100644 noxfile.py diff --git a/README.md b/README.md index d092f15..30c60b7 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ pip install aiopurpleair 5. Install the dev environment: `script/setup` 6. Code your new feature or bug fix. 7. Write tests that cover your new functionality. -8. Run tests and ensure 100% code coverage: `nox -rs coverage` +8. Run tests and ensure 100% code coverage: `poetry run pytest test` 9. Update `README.md` with any new documentation. 10. Add yourself to `AUTHORS.md`. 11. Submit a pull request! diff --git a/aiopurpleair/model/keys.py b/aiopurpleair/model/keys.py index c1981ae..a263372 100644 --- a/aiopurpleair/model/keys.py +++ b/aiopurpleair/model/keys.py @@ -27,8 +27,8 @@ class GetKeysResponse(BaseModel): api_key_type: str @validator("api_key_type") - @staticmethod - def validate_api_key_type(value: str) -> ApiKeyType: + @classmethod + def validate_api_key_type(cls, value: str) -> ApiKeyType: # noqa: F841 """Validate the API key type. Args: diff --git a/noxfile.py b/noxfile.py deleted file mode 100644 index ca1a966..0000000 --- a/noxfile.py +++ /dev/null @@ -1,34 +0,0 @@ -"""Define nox actions.""" -import nox - - -@nox.session -def coverage(session: nox.sessions.Session) -> None: - """Report test coverage. - - Args: - session: A nox session. - """ - args = session.posargs or [ - "-s", - "--cov=aiopurpleair", - "--cov-report=term-missing", - "--cov-report=xml", - "tests/", - ] - session.run("poetry", "lock", external=True) - session.run("poetry", "install", external=True) - session.run("pytest", *args) - - -@nox.session -def tests(session: nox.sessions.Session) -> None: - """Run all tests. - - Args: - session: A nox session. - """ - args = session.posargs or ["-s", "tests/"] - session.run("poetry", "lock", external=True) - session.run("poetry", "install", external=True) - session.run("pytest", *args) diff --git a/poetry.lock b/poetry.lock index cc5de69..00aef9d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -41,17 +41,6 @@ python-versions = ">=3.6" aiohttp = ">=3.1.0,<4.0.0" pytest-asyncio = "*" -[[package]] -name = "argcomplete" -version = "2.0.0" -description = "Bash tab completion for argparse" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.extras] -test = ["coverage", "flake8", "pexpect", "wheel"] - [[package]] name = "astor" version = "0.8.1" @@ -209,20 +198,6 @@ category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" -[[package]] -name = "colorlog" -version = "6.7.0" -description = "Add colours to the output of Python's logging module." -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} - -[package.extras] -development = ["black", "flake8", "mypy", "pytest", "types-colorama"] - [[package]] name = "coverage" version = "6.5.0" @@ -569,24 +544,6 @@ python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.* [package.dependencies] setuptools = "*" -[[package]] -name = "nox" -version = "2022.8.7" -description = "Flexible test automation." -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -argcomplete = ">=1.9.4,<3.0" -colorlog = ">=2.6.1,<7.0.0" -packaging = ">=20.9" -py = ">=1.4,<2.0.0" -virtualenv = ">=14" - -[package.extras] -tox-to-nox = ["jinja2", "tox"] - [[package]] name = "packaging" version = "21.3" @@ -666,14 +623,6 @@ python-versions = ">=3.7" "ruamel.yaml" = ">=0.15" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -[[package]] -name = "py" -version = "1.11.0" -description = "library with cross-python path, ini-parsing, io, code, log facilities" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" - [[package]] name = "pycodestyle" version = "2.8.0" @@ -1055,7 +1004,7 @@ multidict = ">=4.0" [metadata] lock-version = "1.1" python-versions = "^3.9.0" -content-hash = "c5a785095ce9ac5e2ec38569cfd20467228e02ef01434d3f49e33513114e2cff" +content-hash = "4f7628f6fac292536b657f7c7d7a0c993fffbc5ebfb5e17f887e880733df64b4" [metadata.files] aiohttp = [ @@ -1155,10 +1104,6 @@ aresponses = [ {file = "aresponses-2.1.6-py3-none-any.whl", hash = "sha256:06525f6911063f0f8d370cbc96bd273e6cddc89c7b5163ddf91e0c8abf148a32"}, {file = "aresponses-2.1.6.tar.gz", hash = "sha256:231dfa0756e39ca9f1e82212038f98e773d1ed9c0993caf2667e25ba535697ca"}, ] -argcomplete = [ - {file = "argcomplete-2.0.0-py2.py3-none-any.whl", hash = "sha256:cffa11ea77999bb0dd27bb25ff6dc142a6796142f68d45b1a26b11f58724561e"}, - {file = "argcomplete-2.0.0.tar.gz", hash = "sha256:6372ad78c89d662035101418ae253668445b391755cfe94ea52f1b9d22425b20"}, -] astor = [ {file = "astor-0.8.1-py2.py3-none-any.whl", hash = "sha256:070a54e890cefb5b3739d19f30f5a5ec840ffc9c50ffa7d23cc9fc1a38ebbfc5"}, {file = "astor-0.8.1.tar.gz", hash = "sha256:6a6effda93f4e1ce9f618779b2dd1d9d84f1e32812c23a29b3fff6fd7f63fa5e"}, @@ -1230,10 +1175,6 @@ colorama = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] -colorlog = [ - {file = "colorlog-6.7.0-py2.py3-none-any.whl", hash = "sha256:0d33ca236784a1ba3ff9c532d4964126d8a2c44f1f0cb1d2b0728196f512f662"}, - {file = "colorlog-6.7.0.tar.gz", hash = "sha256:bd94bd21c1e13fac7bd3153f4bc3a7dc0eb0974b8bc2fdf1a989e474f6e582e5"}, -] coverage = [ {file = "coverage-6.5.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ef8674b0ee8cc11e2d574e3e2998aea5df5ab242e012286824ea3c6970580e53"}, {file = "coverage-6.5.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:784f53ebc9f3fd0e2a3f6a78b2be1bd1f5575d7863e10c6e12504f240fd06660"}, @@ -1559,10 +1500,6 @@ nodeenv = [ {file = "nodeenv-1.7.0-py2.py3-none-any.whl", hash = "sha256:27083a7b96a25f2f5e1d8cb4b6317ee8aeda3bdd121394e5ac54e498028a042e"}, {file = "nodeenv-1.7.0.tar.gz", hash = "sha256:e0e7f7dfb85fc5394c6fe1e8fa98131a2473e04311a45afb6508f7cf1836fa2b"}, ] -nox = [ - {file = "nox-2022.8.7-py3-none-any.whl", hash = "sha256:96cca88779e08282a699d672258ec01eb7c792d35bbbf538c723172bce23212c"}, - {file = "nox-2022.8.7.tar.gz", hash = "sha256:1b894940551dc5c389f9271d197ca5d655d40bdc6ccf93ed6880e4042760a34b"}, -] packaging = [ {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"}, @@ -1591,10 +1528,6 @@ pre-commit-hooks = [ {file = "pre_commit_hooks-4.3.0-py2.py3-none-any.whl", hash = "sha256:9ccaf7c98794659d345080ee1ea0256a55ae059675045eebdbbc17c0be8c7e4b"}, {file = "pre_commit_hooks-4.3.0.tar.gz", hash = "sha256:fda598a4c834d030727e6a615722718b47510f4bed72df4c949f95ba9f5aaf88"}, ] -py = [ - {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, - {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, -] pycodestyle = [ {file = "pycodestyle-2.8.0-py2.py3-none-any.whl", hash = "sha256:720f8b39dde8b293825e7ff02c475f3077124006db4f440dcbc9a20b76548a20"}, {file = "pycodestyle-2.8.0.tar.gz", hash = "sha256:eddd5847ef438ea1c7870ca7eb78a9d47ce0cdb4851a5523949f2601d0cbbe7f"}, diff --git a/pyproject.toml b/pyproject.toml index 8a99fd7..e7f738d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -83,7 +83,6 @@ flake8-markdown = "^0.3.0" flake8-simplify = "^0.19.3" isort = "^5.10.1" mypy = "^0.982" -nox = "^2022.1.7" pre-commit = "^2.20.0" pre-commit-hooks = "^4.3.0" pylint = "^2.15.5"