ruff: Use py312 target version

This commit is contained in:
Adrian Moennich 2024-03-26 21:28:59 +01:00
parent 2a6b882093
commit f077b4f039
2 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,6 @@
# them and/or modify them under the terms of the MIT License;
# see the LICENSE file for more details.
import socket
from urllib.parse import urlparse
import requests
@ -64,7 +63,7 @@ class PiwikRequest:
"""Returns the raw results from the API"""
try:
response = requests.get(query_url, timeout=timeout)
except socket.timeout:
except TimeoutError:
current_plugin.logger.warning('Timeout contacting Piwik server')
return default_response
except Exception:

View File

@ -1,4 +1,4 @@
target-version = 'py39'
target-version = 'py312'
line-length = 120
extend-exclude = ['docs', 'htmlcov', '*.egg-info']
@ -49,6 +49,7 @@ ignore = [
'RUF015', # not always more readable, and we don't do it for huge lists
'RUF022', # autofix messes up out formatting instead of just sorting
'RUF027', # also triggers on i18n functions -> too noisy for now
'UP038', # it looks kind of weird and it slower than a tuple
'D205', # too many docstrings which have no summary line
'D301', # https://github.com/astral-sh/ruff/issues/8696
'D1', # we have way too many missing docstrings :(