Skip to content

Commit

Permalink
Merge pull request #27 from simonsobs/dev
Browse files Browse the repository at this point in the history
Format code with `ruff`
  • Loading branch information
TaiSakuma authored Sep 25, 2024
2 parents d175ed4 + bc12c88 commit 708a4d7
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 9 deletions.
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"python.testing.pytestArgs": ["tests"],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"isort.check": true,
"markdownlint.config": {
"MD033": false,
"MD036": false,
Expand Down
29 changes: 26 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,32 @@ addopts = "--doctest-modules"
doctest_optionflags = ["ELLIPSIS"]
norecursedirs = "build"

[tool.black]
skip-string-normalization = true
target_version = ['py310', 'py311', 'py312']
[tool.ruff]
line-length = 88

[tool.ruff.format]
quote-style = "preserve"

[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
]
ignore = [
"E203", # Whitespace before '{symbol}'
"E265", # Block comment should start with #
"E266", # Too many leading # before block comment
"E501", # Line too long ({width} > {limit})
"E741", # Ambiguous variable name '{name}'
]

[tool.ruff.lint.mccabe]
max-complexity = 20

[tool.ruff.lint.isort]
known-first-party = ["nextline", "nextlinegraphql"]

[tool.coverage.run]
source_pkgs = ["nextline_alert", "tests"]
Expand Down
4 changes: 0 additions & 4 deletions setup.cfg

This file was deleted.

1 change: 1 addition & 0 deletions src/nextline_alert/emitter.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from logging import getLogger

import httpx

from nextline.plugin.spec import Context, hookimpl


Expand Down
1 change: 1 addition & 0 deletions src/nextline_alert/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from apluggy import asynccontextmanager
from dynaconf import Dynaconf, Validator

from nextline import Nextline
from nextlinegraphql.hook import spec

Expand Down
2 changes: 1 addition & 1 deletion tests/test_emitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

import pytest
import respx
from nextline import Nextline

from nextline import Nextline
from nextline_alert.emitter import Emitter


Expand Down

0 comments on commit 708a4d7

Please sign in to comment.