mirror of
https://github.com/JockeTF/fimfarchive.git
synced 2024-11-21 21:07:59 +01:00
Lint with Ruff instead of Flake8
This commit is contained in:
parent
f7ea42caa6
commit
95816c03b4
4 changed files with 12 additions and 5 deletions
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
|
@ -34,7 +34,7 @@ jobs:
|
|||
run: uv sync --all-extras --dev
|
||||
|
||||
- name: Check styling
|
||||
run: uv run flake8 --ignore=E123,E231,W291,W293 fimfarchive tests
|
||||
run: uv run ruff check
|
||||
|
||||
- name: Check types
|
||||
run: uv run mypy
|
||||
|
|
|
@ -34,7 +34,7 @@ from jsonapi_client.document import Document
|
|||
from jsonapi_client.exceptions import DocumentError
|
||||
from jsonapi_client.resourceobject import ResourceObject
|
||||
|
||||
from fimfarchive import __version__ as VERSION
|
||||
from fimfarchive import __version__ as version
|
||||
from fimfarchive.flavors import DataFormat, MetaFormat, MetaPurity, StorySource
|
||||
|
||||
from fimfarchive.exceptions import (
|
||||
|
@ -164,7 +164,7 @@ class ApiClient:
|
|||
headers = {
|
||||
'Accept-Encoding': 'gzip, deflate',
|
||||
'Authorization': f'Bearer {token}',
|
||||
'User-Agent': f'fimfarchive/{VERSION}',
|
||||
'User-Agent': f'fimfarchive/{version}',
|
||||
}
|
||||
|
||||
return Session(
|
||||
|
|
|
@ -22,10 +22,10 @@ lz4 = ["lz4~=4.3"]
|
|||
[tool.uv]
|
||||
compile-bytecode = true
|
||||
dev-dependencies = [
|
||||
"flake8~=5.0",
|
||||
"mypy~=1.11",
|
||||
"pytest~=8.3",
|
||||
"requests-mock~=1.12",
|
||||
"ruff~=0.6",
|
||||
"types-jmespath~=1.0",
|
||||
"types-requests~=2.32",
|
||||
"types-tqdm~=4.66",
|
||||
|
@ -45,6 +45,13 @@ venv = ".venv"
|
|||
[tool.pytest.ini_options]
|
||||
testpaths = ["tests"]
|
||||
|
||||
[tool.ruff]
|
||||
extend-exclude = ["fimfarchive/__init__.py"]
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = ["A", "E", "F", "N", "RUF", "T10", "W"]
|
||||
ignore = ["N801", "RUF012"]
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
|
|
@ -156,7 +156,7 @@ class TestDirectoryFetcher:
|
|||
"""
|
||||
assert 3 == len(fetcher)
|
||||
|
||||
def test_len_caching(test, fetcher):
|
||||
def test_len_caching(self, fetcher):
|
||||
"""
|
||||
Tests len is only calculated once.
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue