Skip to content
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
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ updates:
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "pre-commit"
directory: "/"
schedule:
interval: "daily"
21 changes: 9 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,29 @@
repos:
# - repo: https://github.com/psf/black
# rev: 24.10.0
# hooks:
# - id: black
# exclude: ^(src/nebius/api|.direnv|.eggs|.git|.hg|.ipynb_checkpoints|.mypy_cache|.nox|.pytest_cache|.ruff_cache|.tox|.svn|.venv|.vscode|pypackages|_build|buck-out|build|dist|venv)/
- repo: https://github.com/psf/black
rev: 26.1.0
hooks:
- id: black
exclude: ^(docs/generated|src/nebius/api|.direnv|.eggs|.git|.hg|.ipynb_checkpoints|.mypy_cache|.nox|.pytest_cache|.ruff_cache|.tox|.svn|.venv|.vscode|pypackages|_build|buck-out|build|dist|venv)/

# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.13.0
# hooks:
# - id: mypy
# exclude: ^(src/nebius/api|.direnv|.eggs|.git|.hg|.ipynb_checkpoints|.mypy_cache|.nox|.pytest_cache|.ruff_cache|.tox|.svn|.venv|.vscode|pypackages|_build|buck-out|build|dist|venv)/


- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.7.2
rev: v0.14.13
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
exclude: ^(docs/generated|src/nebius/api|.direnv|.eggs|.git|.hg|.ipynb_checkpoints|.mypy_cache|.nox|.pytest_cache|.ruff_cache|.tox|.svn|.venv|.vscode|pypackages|_build|buck-out|build|dist|venv)/

# Run the formatter.
- id: ruff-format
exclude: ^(docs/generated|src/nebius/api|.direnv|.eggs|.git|.hg|.ipynb_checkpoints|.mypy_cache|.nox|.pytest_cache|.ruff_cache|.tox|.svn|.venv|.vscode|pypackages|_build|buck-out|build|dist|venv)/
# - id: ruff-format
# exclude: ^(docs/generated|src/nebius/api|.direnv|.eggs|.git|.hg|.ipynb_checkpoints|.mypy_cache|.nox|.pytest_cache|.ruff_cache|.tox|.svn|.venv|.vscode|pypackages|_build|buck-out|build|dist|venv)/

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: end-of-file-fixer
exclude: ^(docs/generated|src/nebius/api|.direnv|.eggs|.git|.hg|.ipynb_checkpoints|.mypy_cache|.nox|.pytest_cache|.ruff_cache|.tox|.svn|.venv|.vscode|pypackages|_build|buck-out|build|dist|venv)/
Expand Down
2 changes: 1 addition & 1 deletion nebius-api
Submodule nebius-api updated 104 files
3 changes: 1 addition & 2 deletions src/nebius/aio/cli_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,7 @@ def parent_id(self) -> str:
raise NoParentIdError("Missing parent-id in the profile.")
if not isinstance(self._profile["parent-id"], str):
raise ConfigError(
"Parent id should be a string, got "
f"{type(self._profile['parent-id'])}."
f"Parent id should be a string, got {type(self._profile['parent-id'])}."
)
if self._profile["parent-id"] == "":
raise NoParentIdError("Parent id is empty.")
Expand Down
3 changes: 1 addition & 2 deletions src/nebius/aio/token/exchangeable.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ class UnsupportedResponseError(SDKError):
def __init__(self, expected: str, resp: Any) -> None:
"""Initialize the error."""
super().__init__(
f"Unsupported response received: expected {expected},"
f" received {type(resp)}"
f"Unsupported response received: expected {expected}, received {type(resp)}"
)


Expand Down
4 changes: 1 addition & 3 deletions src/nebius/aio/token/file_cache/async_renewable_bearer.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ async def _fetch(
:returns: A :class:`Token` instance.
"""
self._trial += 1
log.debug(
f"token fetch requested, attempt: {self._trial}," f"timeout: {timeout}"
)
log.debug(f"token fetch requested, attempt: {self._trial},timeout: {timeout}")
return await self._parent.fetch(timeout=timeout, options=options)

def can_retry(
Expand Down
4 changes: 1 addition & 3 deletions src/nebius/aio/token/renewable.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,7 @@ async def _fetch(
:returns: The fetched :class:`Token`.
"""
self._trial += 1
log.debug(
f"token fetch requested, attempt: {self._trial}," f"timeout: {timeout}"
)
log.debug(f"token fetch requested, attempt: {self._trial},timeout: {timeout}")
return await self._parent.fetch(timeout=timeout, options=options)

def can_retry(
Expand Down
Loading