Skip to content

Commit 708a4d7

Browse files
authored
Merge pull request #27 from simonsobs/dev
Format code with `ruff`
2 parents d175ed4 + bc12c88 commit 708a4d7

File tree

6 files changed

+29
-9
lines changed

6 files changed

+29
-9
lines changed

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"python.testing.pytestArgs": ["tests"],
1111
"python.testing.unittestEnabled": false,
1212
"python.testing.pytestEnabled": true,
13-
"isort.check": true,
1413
"markdownlint.config": {
1514
"MD033": false,
1615
"MD036": false,

pyproject.toml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,32 @@ addopts = "--doctest-modules"
5454
doctest_optionflags = ["ELLIPSIS"]
5555
norecursedirs = "build"
5656

57-
[tool.black]
58-
skip-string-normalization = true
59-
target_version = ['py310', 'py311', 'py312']
57+
[tool.ruff]
58+
line-length = 88
59+
60+
[tool.ruff.format]
61+
quote-style = "preserve"
62+
63+
[tool.ruff.lint]
64+
select = [
65+
"E", # pycodestyle errors
66+
"W", # pycodestyle warnings
67+
"F", # pyflakes
68+
"I", # isort
69+
]
70+
ignore = [
71+
"E203", # Whitespace before '{symbol}'
72+
"E265", # Block comment should start with #
73+
"E266", # Too many leading # before block comment
74+
"E501", # Line too long ({width} > {limit})
75+
"E741", # Ambiguous variable name '{name}'
76+
]
77+
78+
[tool.ruff.lint.mccabe]
79+
max-complexity = 20
80+
81+
[tool.ruff.lint.isort]
82+
known-first-party = ["nextline", "nextlinegraphql"]
6083

6184
[tool.coverage.run]
6285
source_pkgs = ["nextline_alert", "tests"]

setup.cfg

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/nextline_alert/emitter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from logging import getLogger
22

33
import httpx
4+
45
from nextline.plugin.spec import Context, hookimpl
56

67

src/nextline_alert/plugin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
from apluggy import asynccontextmanager
77
from dynaconf import Dynaconf, Validator
8+
89
from nextline import Nextline
910
from nextlinegraphql.hook import spec
1011

tests/test_emitter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
import pytest
66
import respx
7-
from nextline import Nextline
87

8+
from nextline import Nextline
99
from nextline_alert.emitter import Emitter
1010

1111

0 commit comments

Comments
 (0)