From 0ce3cc9687a038b8643d3984c503efb37ef3d288 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 16:32:45 +0900 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#312) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/tox-dev/pyproject-fmt: 1.8.0 → 2.1.3](https://github.com/tox-dev/pyproject-fmt/compare/1.8.0...2.1.3) - [github.com/igorshubovych/markdownlint-cli: v0.40.0 → v0.41.0](https://github.com/igorshubovych/markdownlint-cli/compare/v0.40.0...v0.41.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 4 +-- pyproject.toml | 75 +++++++++++++++++++++++++++-------------- 2 files changed, 52 insertions(+), 27 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4348be26d..610b2bb88 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,7 +27,7 @@ repos: - flake8-comprehensions - flake8-simplify - repo: https://github.com/tox-dev/pyproject-fmt - rev: "1.8.0" + rev: "2.1.3" hooks: - id: pyproject-fmt # https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version @@ -39,7 +39,7 @@ repos: # additional_dependencies: # - tomli - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.40.0 + rev: v0.41.0 hooks: - id: markdownlint args: ["-c", ".markdownlint.yaml", "--fix"] diff --git a/pyproject.toml b/pyproject.toml index 41e11a020..5e5ab0067 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,22 +25,21 @@ dynamic = [ ] dependencies = [ "aiofiles==22.1", - "aiohttp<3.10.0,>=3.9.5", - "cryptography<43.0.0,>=42.0.4", - "grpcio<1.54.0,>=1.53.2", - "protobuf<4.22.0,>=4.21.12", + "aiohttp<3.10,>=3.9.5", + "cryptography<43,>=42.0.4", + "grpcio<1.54,>=1.53.2", + "protobuf<4.22,>=4.21.12", "pydantic==2.7", "pydantic-settings==2.2.1", - "pyOpenSSL==24.1", - "PyYAML>=3.12", - "requests<2.32.0,>=2.31", - 'typing_extensions>=4.6.3; python_version < "3.11"', - "urllib3<2.0.0,>=1.26.8", + "pyopenssl==24.1", + "pyyaml>=3.12", + "requests<2.32,>=2.31", + "typing-extensions>=4.6.3; python_version<'3.11'", + "urllib3<2,>=1.26.8", "uvicorn[standard]==0.20", "zstandard==0.18", ] -[project.optional-dependencies] -dev = [ +optional-dependencies.dev = [ "black", "coverage", "flake8", @@ -50,8 +49,7 @@ dev = [ "pytest-mock==3.8.2", "requests-mock", ] -[project.urls] -Source = "https://github.com/tier4/ota-client" +urls.Source = "https://github.com/tier4/ota-client" [tool.hatch.version] source = "vcs" @@ -60,26 +58,39 @@ source = "vcs" version-file = "src/_otaclient_version.py" [tool.hatch.build.targets.sdist] -exclude = ["/tools"] +exclude = [ + "/tools", +] [tool.hatch.build.targets.wheel] -only-include = ["src"] -sources = ["src"] +only-include = [ + "src", +] +sources = [ + "src", +] [tool.hatch.envs.dev] type = "virtual" -features = ["dev"] +features = [ + "dev", +] [tool.black] line-length = 88 -target-version = ['py38'] +target-version = [ + 'py38', +] extend-exclude = '''( ^.*(_pb2.pyi?|_pb2_grpc.pyi?)$ )''' [tool.isort] profile = "black" -extend_skip_glob = ["*_pb2.py*", "_pb2_grpc.py*"] +extend_skip_glob = [ + "*_pb2.py*", + "_pb2_grpc.py*", +] [tool.pytest.ini_options] asyncio_mode = "auto" @@ -87,16 +98,25 @@ log_auto_indent = true log_format = "%(asctime)s %(levelname)s %(filename)s %(funcName)s,%(lineno)d %(message)s" log_cli = true log_cli_level = "INFO" -pythonpath = ["otaclient"] -testpaths = ["./tests"] +pythonpath = [ + "otaclient", +] +testpaths = [ + "./tests", +] [tool.coverage.run] branch = false relative_files = true -source = ["otaclient"] +source = [ + "otaclient", +] [tool.coverage.report] -omit = ["**/*_pb2.py*", "**/*_pb2_grpc.py*"] +omit = [ + "**/*_pb2.py*", + "**/*_pb2_grpc.py*", +] exclude_also = [ "def __repr__", "if __name__ == .__main__.:", @@ -108,6 +128,11 @@ skip_empty = true skip_covered = true [tool.pyright] -exclude = ["**/__pycache__"] -ignore = ["**/*_pb2.py*", "**/*_pb2_grpc.py*"] +exclude = [ + "**/__pycache__", +] +ignore = [ + "**/*_pb2.py*", + "**/*_pb2_grpc.py*", +] pythonVersion = "3.8"