From 10237a65f3adcd605536d22dfb79c58d0251625b Mon Sep 17 00:00:00 2001 From: Klaas Schoute Date: Tue, 13 Feb 2024 17:16:27 +0100 Subject: [PATCH] Update pylint and ruff configurations --- pyproject.toml | 37 ++++++++++--------------------------- src/brussel/brussel.py | 2 +- 2 files changed, 11 insertions(+), 28 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index bc62726..677bef5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -94,19 +94,7 @@ warn_unused_configs = true warn_unused_ignores = true [tool.pylint.BASIC] -good-names = [ - "_", - "ex", - "fp", - "i", - "id", - "j", - "k", - "on", - "Run", - "T", - "vw", -] +good-names = ["_", "ex", "fp", "i", "id", "j", "k", "on", "Run", "T"] [tool.pylint."MESSAGES CONTROL"] disable= [ @@ -129,26 +117,21 @@ addopts = "--cov" asyncio_mode = "auto" [tool.ruff] +target-version = "py311" lint.select = ["ALL"] lint.ignore = [ - "ANN101", # Self... explanatory - "ANN401", # Opinioated warning on disallowing dynamically typed expressions - "D203", # Conflicts with other rules - "D213", # Conflicts with other rules - "D417", # False positives in some occasions + "ANN101", # Self... explanatory + "ANN102", # cls... just as useless + "ANN401", # Opinioated warning on disallowing dynamically typed expressions + "D203", # Conflicts with other rules + "D213", # Conflicts with other rules + "D417", # False positives in some occasions "PLR2004", # Just annoying, not really useful + "SLOT000", # Has a bug with enums: https://github.com/astral-sh/ruff/issues/5748 - # Formatter conflicts + # Conflicts with the Ruff formatter "COM812", - "COM819", - "D206", - "E501", "ISC001", - "Q000", - "Q001", - "Q002", - "Q003", - "W191", ] [tool.ruff.lint.flake8-pytest-style] diff --git a/src/brussel/brussel.py b/src/brussel/brussel.py index 229cbcd..3e80de2 100644 --- a/src/brussel/brussel.py +++ b/src/brussel/brussel.py @@ -77,7 +77,7 @@ async def _request( ssl=True, ) response.raise_for_status() - except asyncio.TimeoutError as exception: + except TimeoutError as exception: msg = "Timeout occurred while connecting to the Open Data Platform API." raise ODPBrusselConnectionError( msg,