Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ruff exit non zero on fix #332

Merged
merged 3 commits into from
Nov 21, 2023
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
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