Skip to content

Commit

Permalink
Update config (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Feb 14, 2024
2 parents fff64dd + 054a654 commit 0c4dc97
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- uses: pre-commit/[email protected]
cache: pip
- uses: pre-commit/[email protected]
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ jobs:
runs-on: ubuntu-latest
steps:
# Drafts your next release notes as pull requests are merged into "main"
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
tox -e pins
- name: Upload coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v3.1.5
with:
flags: ${{ matrix.os }}
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
Expand Down
10 changes: 5 additions & 5 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.2.0
hooks:
- id: black

Expand Down Expand Up @@ -43,13 +43,13 @@ repos:
# ]

- 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
9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,22 @@ version.source = "vcs"
local_scheme = "no-local-version"

[tool.ruff]
line-length = 88
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 @@ -88,7 +91,7 @@ extend-ignore = [
"E241", # Multiple spaces after ','
]

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

Expand Down
1 change: 1 addition & 0 deletions src/norwegianblue/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Python interface to endoflife.date API
https://endoflife.date/docs/api/
"""

from __future__ import annotations

import datetime as dt
Expand Down
1 change: 1 addition & 0 deletions src/norwegianblue/_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 tests/test_cache.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Unit tests for norwegianblue cache
"""

from __future__ import annotations

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

from __future__ import annotations

import json
Expand Down

0 comments on commit 0c4dc97

Please sign in to comment.