Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use pydantic==2.9.2; chore: update dev deps #253

Merged
merged 2 commits into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion horde_sdk/generic_api/apimodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 4 additions & 12 deletions horde_sdk/horde_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
12 changes: 6 additions & 6 deletions requirements.dev.txt
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
horde_model_reference>=0.9.0

pydantic==2.7.4
pydantic==2.9.2
requests
StrEnum
loguru
Expand Down
Loading