Skip to content

Commit dbb9311

Browse files
authored
Add pre-commit action job (#96)
1 parent a61843c commit dbb9311

File tree

5 files changed

+17
-4
lines changed

5 files changed

+17
-4
lines changed

.github/workflows/tests.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,13 @@ jobs:
2828
2929
- name: "Tests"
3030
run: tox -e py${{ matrix.python-version }}${{ matrix.env}} -- -vv
31+
pre-commit-ci-lite:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v3
35+
- uses: actions/setup-python@v4
36+
with:
37+
python-version: 3.x
38+
- uses: pre-commit/action@v3.0.1
39+
- uses: pre-commit-ci/lite-action@v1.1.0
40+
if: always()

src/yandex_cloud_ml_sdk/_exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
if TYPE_CHECKING:
1212
# pylint: disable=cyclic-import
1313
from ._client import StubType
14-
from ._types.operation import OperationErrorInfo
1514
from ._datasets.validation import DatasetValidationResult
15+
from ._types.operation import OperationErrorInfo
1616

1717

1818
class YCloudMLError(Exception):

src/yandex_cloud_ml_sdk/exceptions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
from __future__ import annotations
22

33
from ._exceptions import (
4-
AioRpcError, AsyncOperationError, DatasetValidationError, RunError, WrongAsyncOperationStatusError, YCloudMLError, TuningError
4+
AioRpcError, AsyncOperationError, DatasetValidationError, RunError, TuningError, WrongAsyncOperationStatusError,
5+
YCloudMLError
56
)
67

78
__all__ = [

test_requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ pylint-protobuf
88
pytest
99
pytest-asyncio
1010
pytest-flakes
11+
pytest-httpx
12+
pytest-mock
1113
pytest-mypy
1214
pytest-pylint
1315
pytest-recording
14-
pytest-httpx
15-
pytest-mock
1616
tqdm
1717
types-aiofiles
1818
types-protobuf

tests/datasets/test_download_datasets.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# pylint: disable=no-name-in-module
22
# pylint: disable=redefined-outer-name
3+
from __future__ import annotations
4+
35
from pathlib import Path
46

57
import httpx

0 commit comments

Comments
 (0)