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

build(deps-dev): bump the python-packages group with 4 updates #179

Merged
merged 2 commits into from
Feb 6, 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
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.1.1
hooks:
- id: black
exclude: ^hordelib/nodes/.*\..*$
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.11
rev: v0.2.1
hooks:
- id: ruff
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.8.0'
hooks:
- id: mypy
exclude: ^examples/.*$ # FIXME
additional_dependencies: [pydantic, strenum, types-colorama, types-docutils, types-Pillow, types-psutil, types-Pygments, types-pywin32, types-PyYAML, types-regex, types-requests, types-setuptools, types-tabulate, types-tqdm, types-urllib3]
additional_dependencies: [pydantic, strenum, types-colorama, types-docutils, types-Pillow, types-psutil, types-Pygments, types-pywin32, types-PyYAML, types-regex, types-requests, types-setuptools, types-tabulate, types-tqdm, types-urllib3, horde_sdk]
25 changes: 14 additions & 11 deletions hordelib/model_manager/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,17 +498,20 @@ def download_file(
response.raise_for_status()

# Write the content to file in chunks
with open(partial_pathname, "ab") as f, tqdm(
# all optional kwargs
unit="B",
initial=partial_size,
unit_scale=True,
unit_divisor=1024,
miniters=1,
desc=filename,
total=remote_file_size + partial_size,
# disable=UserSettings.download_progress_callback is not None,
) as pbar:
with (
open(partial_pathname, "ab") as f,
tqdm(
# all optional kwargs
unit="B",
initial=partial_size,
unit_scale=True,
unit_divisor=1024,
miniters=1,
desc=filename,
total=remote_file_size + partial_size,
# disable=UserSettings.download_progress_callback is not None,
) as pbar,
):
downloaded = partial_size
for chunk in response.iter_content(chunk_size=1024 * 1024 * 16):
response.raise_for_status()
Expand Down
7 changes: 4 additions & 3 deletions hordelib/model_manager/hyper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Home for the controller class ModelManager, and related meta information."""

import os
import threading
from collections.abc import Callable, Iterable
Expand Down Expand Up @@ -180,9 +181,9 @@ def init_model_managers(
self.active_model_managers.append(
resolve_manager_to_load_type(
multiprocessing_lock=multiprocessing_lock,
civitai_api_token=os.environ["CIVIT_API_TOKEN"]
if "CIVIT_API_TOKEN" in os.environ.keys()
else None,
civitai_api_token=(
os.environ["CIVIT_API_TOKEN"] if "CIVIT_API_TOKEN" in os.environ.keys() else None
),
),
)

Expand Down
8 changes: 4 additions & 4 deletions requirements.dev.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
pytest==7.4.4
pytest==8.0.0
mypy==1.8.0
black==23.12.1
ruff==0.1.11
tox~=4.11.4
black==24.1.1
ruff==0.2.1
tox~=4.12.1
pre-commit~=3.6.0
build>=0.10.0
coverage>=7.2.7
Expand Down
Loading