Skip to content

Commit

Permalink
Move to ruff for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
fkantelberg committed Mar 30, 2024
1 parent da21bef commit 8812d3c
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 32 deletions.
5 changes: 0 additions & 5 deletions .flake8

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.mypy_cache
.nox
.pytest_cache
.ruff_cache
.tox/
__pycache__/
build/
Expand Down
6 changes: 0 additions & 6 deletions .isort.cfg

This file was deleted.

18 changes: 4 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
repos:
- repo: https://github.com/psf/black
rev: 23.3.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.4
hooks:
- id: black

- repo: https://github.com/pycqa/flake8
rev: 3.7.9
hooks:
- id: flake8
additional_dependencies: [flake8-bugbear]

- repo: https://github.com/PyCQA/isort
rev: 5.11.5
hooks:
- id: isort
- id: ruff
- id: ruff-format

- repo: https://github.com/pylint-dev/pylint
rev: v2.17.4
Expand Down
20 changes: 15 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,20 @@
requires = [ "setuptools >= 35.0.2", "wheel >= 0.29.0"]
build-backend = "setuptools.build_meta"

[tool.black]
[tool.mypy]
disable_error_code = "attr-defined,import,union-attr"

[tool.ruff]
line-length = 88
target-version = ['py37', 'py38', 'py39', 'py310', 'py311', 'py312']
include = '(\.pyi?$|src|tests)'
indent-width = 4
target-version = 'py38'

[tool.mypy]
disable_error_code = 'attr-defined,import,union-attr'
[tool.ruff.lint]
ignore = ["E203", "E266", "E501", "F403", "F401"]
fixable = ["ALL"]

[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
3 changes: 1 addition & 2 deletions src/socket_proxy/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
class Reader(Protocol):
"""Protocol to read data from a reader"""

async def readexactly(self, length: int) -> bytes:
...
async def readexactly(self, length: int) -> bytes: ...


class MetaPackage(type):
Expand Down

0 comments on commit 8812d3c

Please sign in to comment.