Skip to content

Commit

Permalink
ruff exit non zero on fix (#332)
Browse files Browse the repository at this point in the history
* ruff exit non zero on fix

* fixup

* rename job
  • Loading branch information
MarcoGorelli committed Nov 21, 2023
1 parent 61adbc3 commit 2623018
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: mypy
name: lint

on:
pull_request:
push:
branches: [main]

jobs:
tox:
lint:
strategy:
matrix:
python-version: ["3.8", "3.11"]
Expand All @@ -30,5 +30,7 @@ jobs:
run: python -m pip install --upgrade mypy typing-extensions ruff
- name: run mypy
run: cd spec/API_specification && mypy dataframe_api && mypy examples
- name: run ruff
run: cd spec/API_specification && ruff format dataframe_api examples && ruff dataframe_api examples
- name: run ruff format
run: cd spec/API_specification && ruff format dataframe_api examples --diff
- name: run ruff check
run: cd spec/API_specification && ruff check dataframe_api examples --no-fix
4 changes: 2 additions & 2 deletions spec/API_specification/dataframe_api/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class NullType:
null: NullType

class Datetime:
time_unit: Literal['ms', 'us']
time_unit: Literal["ms", "us"]
time_zone: str | None

def __init__( # noqa: ANN204
Expand All @@ -80,7 +80,7 @@ def __init__( # noqa: ANN204
...

class Duration:
time_unit: Literal['ms', 'us']
time_unit: Literal["ms", "us"]

def __init__( # noqa: ANN204
self,
Expand Down

0 comments on commit 2623018

Please sign in to comment.