Skip to content

Commit

Permalink
Update config (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Feb 8, 2024
2 parents e69dc50 + 5d18bfe commit 16104aa
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 15 deletions.
19 changes: 6 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.9
rev: v0.2.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
args: [--exit-non-zero-on-fix]

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.12.1
rev: 24.1.1
hooks:
- id: black

Expand All @@ -28,23 +28,16 @@ repos:
- id: mypy
args: [--strict, --pretty, --show-error-codes]
additional_dependencies:
[
platformdirs,
pytest,
rapidfuzz,
types-freezegun,
types-python-slugify,
urllib3,
]
[platformdirs, pytest, python-slugify, rapidfuzz, types-freezegun, urllib3]

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 1.5.3
rev: 1.7.0
hooks:
- id: pyproject-fmt
additional_dependencies: [tox]

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.15
rev: v0.16
hooks:
- id: validate-pyproject

Expand Down
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,22 @@ version.source = "vcs"
local_scheme = "no-local-version"

[tool.ruff]
fix = true

[tool.ruff.lint]
select = [
"C4", # flake8-comprehensions
"E", # pycodestyle errors
"EM", # flake8-errmsg
"F", # pyflakes errors
"I", # isort
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"PGH", # pygrep-hooks
"RUF100", # unused noqa (yesqa)
"UP", # pyupgrade
"W", # pycodestyle warnings
"YTT", # flake8-2020
# "LOG", # TODO: enable flake8-logging when it's not in preview anymore
]
extend-ignore = [
"E203", # Whitespace before ':'
Expand All @@ -85,7 +88,7 @@ extend-ignore = [
"E241", # Multiple spaces after ','
]

[tool.ruff.isort]
[tool.ruff.lint.isort]
known-first-party = ["pepotron"]
required-imports = ["from __future__ import annotations"]

Expand Down
1 change: 1 addition & 0 deletions src/pepotron/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
CLI to open PEPs in your browser
"""

from __future__ import annotations

import importlib.metadata
Expand Down
1 change: 1 addition & 0 deletions src/pepotron/_cache.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Cache functions
"""

from __future__ import annotations

import datetime as dt
Expand Down
1 change: 1 addition & 0 deletions src/pepotron/cli.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
pepotron: CLI to open PEPs in your browser
"""

from __future__ import annotations

import argparse
Expand Down
1 change: 1 addition & 0 deletions tests/test_cache.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Unit tests for _cache
"""

from __future__ import annotations

import tempfile
Expand Down
1 change: 1 addition & 0 deletions tests/test_pepotron.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Unit tests
"""

from __future__ import annotations

from collections import namedtuple
Expand Down

0 comments on commit 16104aa

Please sign in to comment.