Skip to content

Commit

Permalink
Ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
hamdanal committed Aug 19, 2023
1 parent 08f99c0 commit 4e5669b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 38 deletions.
6 changes: 0 additions & 6 deletions .flake8

This file was deleted.

30 changes: 8 additions & 22 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ci:
autoupdate_schedule: "monthly"
autoupdate_schedule: "quarterly"

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand All @@ -17,30 +17,16 @@ repos:
- id: mixed-line-ending
args: [--fix=lf]
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v3.4.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.285
hooks:
- id: pyupgrade
args: [--py37-plus]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: [--add-import, "from __future__ import annotations"]
- repo: https://github.com/psf/black
rev: 23.3.0
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.7.0
hooks:
- id: black
- repo: https://github.com/asottile/yesqa
rev: v1.4.0
hooks:
- id: yesqa
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies: [ "flake8-bugbear" ]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.3.0
rev: v1.5.1
hooks:
- id: mypy
23 changes: 13 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,10 @@ classifiers = [
keywords = ["serial", "lsports", "list-ports", "USB", "COM"]
dependencies = []
requires-python = ">=3.7"
urls.Home = "https://github.com/hamdanal/lsports"

[project.urls]
Homepage = "https://github.com/hamdanal/lsports"
Documentation = "https://github.com/hamdanal/lsports#lsports"
Issue-Tracker = "https://github.com/hamdanal/lsports/issues"

[tool.hatch.build]
only-include = ["lsports"]
[tool.hatch]
build.packages = ["lsports"]

[tool.tox]
legacy_tox_ini = """
Expand All @@ -50,9 +46,16 @@ commands =
[tool.black]
line_length = 100

[tool.isort]
profile = "black"
line_length = 100
[tool.ruff]
line-length = 100
select = ["E", "F", "B", "UP", "RUF100", "TID"]
unfixable = ["B"]
ignore = ["E501"]
isort.required-imports = ["from __future__ import annotations"]
flake8-tidy-imports.ban-relative-imports = "all"

[tool.ruff.per-file-ignores]
"lsports/_windows.py" = ["E221", "E402"]

[tool.mypy]
strict = true
Expand Down

0 comments on commit 4e5669b

Please sign in to comment.