Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#305)
Browse files Browse the repository at this point in the history
<!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.6.7 →
v0.6.8](astral-sh/ruff-pre-commit@v0.6.7...v0.6.8)
<!--pre-commit.ci end-->

---------

Signed-off-by: Alexander Piskun <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alexander Piskun <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and bigcat88 authored Oct 3, 2024
1 parent 5050b72 commit a56fa6d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ repos:
- id: pyproject-fmt

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.7
rev: v0.6.8
hooks:
- id: ruff

Expand Down
4 changes: 2 additions & 2 deletions nc_py_api/_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def _response_event(self, response: Response) -> None:

def download2fp(self, url_path: str, fp, dav: bool, params=None, **kwargs):
adapter = self.adapter_dav if dav else self.adapter
with adapter.stream("GET", url_path, params=params, headers=kwargs.get("headers", None)) as response:
with adapter.stream("GET", url_path, params=params, headers=kwargs.get("headers")) as response:
check_error(response)
for data_chunk in response.iter_raw(chunk_size=kwargs.get("chunk_size", 5 * 1024 * 1024)):
fp.write(data_chunk)
Expand Down Expand Up @@ -425,7 +425,7 @@ async def _response_event(self, response: Response) -> None:

async def download2fp(self, url_path: str, fp, dav: bool, params=None, **kwargs):
adapter = self.adapter_dav if dav else self.adapter
async with adapter.stream("GET", url_path, params=params, headers=kwargs.get("headers", None)) as response:
async with adapter.stream("GET", url_path, params=params, headers=kwargs.get("headers")) as response:
check_error(response)
async for data_chunk in response.aiter_raw(chunk_size=kwargs.get("chunk_size", 5 * 1024 * 1024)):
fp.write(data_chunk)
Expand Down
4 changes: 2 additions & 2 deletions nc_py_api/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ async def get_avatar(


def _create(user_id: str, display_name: str | None, **kwargs) -> dict[str, typing.Any]:
password = kwargs.get("password", None)
email = kwargs.get("email", None)
password = kwargs.get("password")
email = kwargs.get("email")
if not password and not email:
raise ValueError("Either password or email must be set")
data = {"userid": user_id}
Expand Down

0 comments on commit a56fa6d

Please sign in to comment.