Skip to content

Commit

Permalink
Merge pull request #253 from Haidra-Org/main
Browse files Browse the repository at this point in the history
feat: use `pydantic==2.9.2`; chore: update dev deps
  • Loading branch information
tazlin authored Sep 21, 2024
2 parents d433905 + 6b4f338 commit 0244ed5
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 24 deletions.
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

0 comments on commit 0244ed5

Please sign in to comment.