Skip to content

Commit

Permalink
Improve CI and linters
Browse files Browse the repository at this point in the history
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
  • Loading branch information
Noltari committed Aug 23, 2023
1 parent a1e0c32 commit 1cb5a08
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 35 deletions.
2 changes: 1 addition & 1 deletion aioqsw/device.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""QNAP QSW Device."""
from __future__ import annotations

import re
from datetime import datetime
import re
from typing import Any

from aioqsw.const import (
Expand Down
4 changes: 2 additions & 2 deletions aioqsw/localapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

import asyncio
import base64
import json
import logging
from dataclasses import dataclass
from datetime import datetime, timezone
import json
import logging
from typing import Any, cast

from aiohttp import ClientSession, ContentTypeError
Expand Down
32 changes: 0 additions & 32 deletions pylintrc

This file was deleted.

55 changes: 55 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,61 @@ dependencies = [
"Homepage" = "https://github.com/Noltari/aioqsw"
"Bug Tracker" = "https://github.com/Noltari/aioqsw/issues"

[tool.mypy]
python_version = "3.11"

[tool.pylint.MAIN]
py-version = "3.11"

[tool.pylint.BASIC]
class-const-naming-style = "any"

[tool.pylint."MESSAGES CONTROL"]
# Reasons disabled:
# duplicate-code - unavoidable
# invalid-name - not using snake case naming style
# too-many-* - are not enforced for the sake of readability
# too-few-* - same as too-many-*
disable = [
"duplicate-code",
"invalid-name",
"too-few-public-methods",
"too-many-arguments",
"too-many-branches",
"too-many-instance-attributes",
"too-many-lines",
"too-many-locals",
"too-many-public-methods",
"too-many-statements",
]

[tool.pylint.REPORTS]
score = false

[tool.pylint.FORMAT]
expected-line-ending-format = "LF"

[tool.ruff]
select = [
"D", # docstrings
"E", # pycodestyle
"G", # flake8-logging-format
"I", # isort
"W", # pycodestyle
]

ignore = [
"D202", # No blank lines allowed aftee function docstring
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"D401", # First line should be in imperative mood
]

[tool.ruff.isort]
force-sort-within-sections = true
combine-as-imports = true
split-on-trailing-comma = false

[tool.setuptools]
platforms = ["any"]
zip-safe = false
Expand Down

0 comments on commit 1cb5a08

Please sign in to comment.