Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update config #60

Merged
merged 3 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading