mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-07 10:34:08 +00:00
fix new linting issues from pylint 2.16
This commit is contained in:
@@ -13,6 +13,6 @@ ignored-classes=NominatimArgs,closing
|
|||||||
# 'too-many-ancestors' is triggered already by deriving from UserDict
|
# 'too-many-ancestors' is triggered already by deriving from UserDict
|
||||||
# 'not-context-manager' disabled because it causes false positives once
|
# 'not-context-manager' disabled because it causes false positives once
|
||||||
# typed Python is enabled. See also https://github.com/PyCQA/pylint/issues/5273
|
# typed Python is enabled. See also https://github.com/PyCQA/pylint/issues/5273
|
||||||
disable=too-few-public-methods,duplicate-code,too-many-ancestors,bad-option-value,no-self-use,not-context-manager
|
disable=too-few-public-methods,duplicate-code,too-many-ancestors,bad-option-value,no-self-use,not-context-manager,use-dict-literal
|
||||||
|
|
||||||
good-names=i,x,y,m,t,fd,db,cc
|
good-names=i,x,y,m,t,fd,db,cc
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ Data classes are part of the public API while the functions are for
|
|||||||
internal use only. That's why they are implemented as free-standing functions
|
internal use only. That's why they are implemented as free-standing functions
|
||||||
instead of member functions.
|
instead of member functions.
|
||||||
"""
|
"""
|
||||||
from typing import Optional, Tuple, Dict, Sequence, Any
|
from typing import Optional, Tuple, Dict, Sequence
|
||||||
import enum
|
import enum
|
||||||
import dataclasses
|
import dataclasses
|
||||||
import datetime as dt
|
import datetime as dt
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ def _migration(major: int, minor: int, patch: int = 0,
|
|||||||
there.
|
there.
|
||||||
"""
|
"""
|
||||||
def decorator(func: Callable[..., None]) -> Callable[..., None]:
|
def decorator(func: Callable[..., None]) -> Callable[..., None]:
|
||||||
version = (NominatimVersion(major, minor, patch, dbpatch))
|
version = NominatimVersion(major, minor, patch, dbpatch)
|
||||||
_MIGRATION_FUNCTIONS.append((version, func))
|
_MIGRATION_FUNCTIONS.append((version, func))
|
||||||
return func
|
return func
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user