Skip to content

Commit a56fa6d

Browse files
[pre-commit.ci] pre-commit autoupdate (#305)
<!--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]>
1 parent 5050b72 commit a56fa6d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Diff for: .pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ repos:
4141
- id: pyproject-fmt
4242

4343
- repo: https://github.com/astral-sh/ruff-pre-commit
44-
rev: v0.6.7
44+
rev: v0.6.8
4545
hooks:
4646
- id: ruff
4747

Diff for: nc_py_api/_session.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ def _response_event(self, response: Response) -> None:
301301

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

426426
async def download2fp(self, url_path: str, fp, dav: bool, params=None, **kwargs):
427427
adapter = self.adapter_dav if dav else self.adapter
428-
async with adapter.stream("GET", url_path, params=params, headers=kwargs.get("headers", None)) as response:
428+
async with adapter.stream("GET", url_path, params=params, headers=kwargs.get("headers")) as response:
429429
check_error(response)
430430
async for data_chunk in response.aiter_raw(chunk_size=kwargs.get("chunk_size", 5 * 1024 * 1024)):
431431
fp.write(data_chunk)

Diff for: nc_py_api/users.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,8 @@ async def get_avatar(
369369

370370

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

0 commit comments

Comments
 (0)