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

all ruff #71

Merged
merged 3 commits into from
Dec 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
11 changes: 4 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
.DEFAULT_GOAL := all
isort = isort rtoml tests
black = black rtoml tests

install:
pip install -U pip wheel pre-commit
Expand All @@ -22,16 +20,15 @@ build-prod:

.PHONY: format
format:
$(isort)
$(black)
ruff check --fix-only rtoml tests
ruff format rtoml tests
cargo fmt


.PHONY: lint-python
lint-python:
ruff src tests
$(isort) --check-only --df
$(black) --check --diff
ruff check rtoml tests
ruff format --check rtoml tests

.PHONY: lint-rust
lint-rust:
Expand Down
21 changes: 3 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,25 +68,10 @@ exclude_lines = [

[tool.ruff]
line-length = 120
extend-select = ["Q"]
extend-select = ["Q", "RUF100", "UP", "I"]
flake8-quotes = {inline-quotes = "single", multiline-quotes = "double"}

[tool.black]
color = true
line-length = 120
target-version = ["py37", "py38", "py39", "py310"]
skip-string-normalization = true
skip-magic-trailing-comma = true

[tool.isort]
line_length = 120
known_first_party = ["rtoml"]
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
combine_as_imports = true
color_output = true
skip = "tests/toml_test.py"
format.quote-style="single"
target-version = "py38"

[tool.mypy]
follow_imports = "normal"
Expand Down
8 changes: 2 additions & 6 deletions tests/requirements-linting.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
black==22.3.0
ruff==0.0.108
isort[colors]==5.10.1
mypy==0.950
pycodestyle==2.8.0
pyflakes==2.4.0
ruff==0.1.8
mypy==1.7.1
2 changes: 1 addition & 1 deletion tests/toml_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# via `~/go/bin/toml-test ./tests/toml_test.py`
import json
import sys
from datetime import datetime, date, time
from datetime import date, datetime, time
from pathlib import Path

ROOT_DIR = (Path(__file__).parent / '..').resolve()
Expand Down
Loading