From 2f5ee4df47fe808d0779e401f0ff21c7df52e52d Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Thu, 25 Jul 2024 12:06:59 +0200 Subject: [PATCH 1/2] Update apimodels.py Typo? --- horde_sdk/generic_api/apimodels.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/horde_sdk/generic_api/apimodels.py b/horde_sdk/generic_api/apimodels.py index e54df4d..28cc740 100644 --- a/horde_sdk/generic_api/apimodels.py +++ b/horde_sdk/generic_api/apimodels.py @@ -325,7 +325,7 @@ def get_http_method(cls) -> HTTPMethod: # X_Fields # TODO client_agent: str = Field( - default=f"horde_sdk:{__version__}:https://githib.com/haidra-org/horde-sdk", + default=f"horde_sdk:{__version__}:https://github.com/haidra-org/horde-sdk", alias="Client-Agent", ) """The requesting client's agent. You should set this to reflect the name, version and contact information From 6b4f3385731e0118c00f87906d5ac72b01078578 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Sep 2024 14:19:44 -0400 Subject: [PATCH 2/2] build(deps): bump the python-packages group across 1 directory with 7 updates (#249) * build(deps): bump the python-packages group across 1 directory with 7 updates Updates the requirements on [pytest](https://github.com/pytest-dev/pytest), [mypy](https://github.com/python/mypy), [black](https://github.com/psf/black), [ruff](https://github.com/astral-sh/ruff), [tox](https://github.com/tox-dev/tox), [pre-commit](https://github.com/pre-commit/pre-commit) and [pydantic](https://github.com/pydantic/pydantic) to permit the latest version. Updates `pytest` from 8.2.1 to 8.3.3 - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.2.1...8.3.3) Updates `mypy` from 1.10.0 to 1.11.2 - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.10.0...v1.11.2) Updates `black` from 24.4.2 to 24.8.0 - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/24.4.2...24.8.0) Updates `ruff` from 0.4.7 to 0.6.5 - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.4.7...0.6.5) Updates `tox` to 4.18.1 - [Release notes](https://github.com/tox-dev/tox/releases) - [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst) - [Commits](https://github.com/tox-dev/tox/compare/4.15.0...4.18.1) Updates `pre-commit` to 3.8.0 - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md) - [Commits](https://github.com/pre-commit/pre-commit/compare/v3.7.1...v3.8.0) Updates `pydantic` from 2.7.4 to 2.9.2 - [Release notes](https://github.com/pydantic/pydantic/releases) - [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md) - [Commits](https://github.com/pydantic/pydantic/compare/v2.7.4...v2.9.2) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:development update-type: version-update:semver-minor dependency-group: python-packages - dependency-name: mypy dependency-type: direct:development update-type: version-update:semver-minor dependency-group: python-packages - dependency-name: black dependency-type: direct:development update-type: version-update:semver-minor dependency-group: python-packages - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-minor dependency-group: python-packages - dependency-name: tox dependency-type: direct:development dependency-group: python-packages - dependency-name: pre-commit dependency-type: direct:development dependency-group: python-packages - dependency-name: pydantic dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python-packages ... Signed-off-by: dependabot[bot] * chore/style: update pre-commit deps; style: fix --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: tazlin --- .pre-commit-config.yaml | 8 ++++---- horde_sdk/horde_logging.py | 16 ++++------------ requirements.dev.txt | 12 ++++++------ requirements.txt | 2 +- 4 files changed, 15 insertions(+), 23 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 18ebf29..0e6811c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,22 +6,22 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/psf/black - rev: 24.4.2 + rev: 24.8.0 hooks: - id: black - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.7 + rev: v0.6.5 hooks: - id: ruff - repo: https://github.com/pre-commit/mirrors-mypy - rev: 'v1.10.0' + rev: 'v1.11.2' hooks: - id: mypy args: [., --strict, --ignore-missing-imports, --exclude=^codegen] pass_filenames: false additional_dependencies: [ pytest, - pydantic==2.7.4, + pydantic>=2.9.2, types-Pillow, types-requests, types-pytz, diff --git a/horde_sdk/horde_logging.py b/horde_sdk/horde_logging.py index 4fc88e8..8548e6a 100644 --- a/horde_sdk/horde_logging.py +++ b/horde_sdk/horde_logging.py @@ -21,30 +21,22 @@ def set_logger_verbosity(count: int) -> None: def is_stdout_log(record: dict[str, Any]) -> bool: """Filter for stdout logs levels.""" - if record["level"].no < verbosity: - return False - return True + return not record["level"].no < verbosity def is_msg_log(record: dict[str, Any]) -> bool: """Filter for stdout logs levels.""" - if record["level"].no < verbosity: - return False - return True + return not record["level"].no < verbosity def is_stderr_log(record: dict[str, Any]) -> bool: """Filter for stderr logs levels.""" - if record["level"].name not in error_levels: - return False - return True + return not record["level"].name not in error_levels def is_trace_log(record: dict[str, Any]) -> bool: """Filter for trace logs levels.""" - if record["level"].name not in error_levels: - return False - return True + return not record["level"].name not in error_levels handler_config = [ diff --git a/requirements.dev.txt b/requirements.dev.txt index f8e568d..c72793b 100644 --- a/requirements.dev.txt +++ b/requirements.dev.txt @@ -1,9 +1,9 @@ -pytest==8.2.1 -mypy==1.10.0 -black==24.4.2 -ruff==0.4.7 -tox~=4.15.0 -pre-commit~=3.7.1 +pytest==8.3.3 +mypy==1.11.2 +black==24.8.0 +ruff==0.6.5 +tox~=4.18.1 +pre-commit~=3.8.0 build>=0.10.0 coverage>=7.2.7 diff --git a/requirements.txt b/requirements.txt index 2b48a92..0cfbb28 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ horde_model_reference>=0.9.0 -pydantic==2.7.4 +pydantic==2.9.2 requests StrEnum loguru