Skip to content

Commit 2623018

Browse files
authored
ruff exit non zero on fix (#332)
* ruff exit non zero on fix * fixup * rename job
1 parent 61adbc3 commit 2623018

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.github/workflows/mypy.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
name: mypy
1+
name: lint
22

33
on:
44
pull_request:
55
push:
66
branches: [main]
77

88
jobs:
9-
tox:
9+
lint:
1010
strategy:
1111
matrix:
1212
python-version: ["3.8", "3.11"]
@@ -30,5 +30,7 @@ jobs:
3030
run: python -m pip install --upgrade mypy typing-extensions ruff
3131
- name: run mypy
3232
run: cd spec/API_specification && mypy dataframe_api && mypy examples
33-
- name: run ruff
34-
run: cd spec/API_specification && ruff format dataframe_api examples && ruff dataframe_api examples
33+
- name: run ruff format
34+
run: cd spec/API_specification && ruff format dataframe_api examples --diff
35+
- name: run ruff check
36+
run: cd spec/API_specification && ruff check dataframe_api examples --no-fix

spec/API_specification/dataframe_api/typing.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class NullType:
6969
null: NullType
7070

7171
class Datetime:
72-
time_unit: Literal['ms', 'us']
72+
time_unit: Literal["ms", "us"]
7373
time_zone: str | None
7474

7575
def __init__( # noqa: ANN204
@@ -80,7 +80,7 @@ def __init__( # noqa: ANN204
8080
...
8181

8282
class Duration:
83-
time_unit: Literal['ms', 'us']
83+
time_unit: Literal["ms", "us"]
8484

8585
def __init__( # noqa: ANN204
8686
self,

0 commit comments

Comments
 (0)