pylint: disable no-self-use check

This checker encourages bad behaviour (namely changing the static
status of a function during inheritence) and will be made optional
in upcoming versions of pylint.
This commit is contained in:
Sarah Hoffmann
2022-05-11 10:25:00 +02:00
parent 7f7a7df3a2
commit d14a585cc9
3 changed files with 3 additions and 5 deletions

View File

@@ -11,6 +11,6 @@ ignored-modules=icu,datrie
# 'with' statements.
ignored-classes=NominatimArgs,closing
# 'too-many-ancestors' is triggered already by deriving from UserDict
disable=too-few-public-methods,duplicate-code,too-many-ancestors,bad-option-value
disable=too-few-public-methods,duplicate-code,too-many-ancestors,bad-option-value,no-self-use
good-names=i,x,y,fd,db

View File

@@ -278,8 +278,7 @@ class LegacyICUNameAnalyzer(AbstractAnalyzer):
+ [(k, v, part_ids.get(v, None)) for k, v in partial_tokens.items()]
@staticmethod
def normalize_postcode(postcode):
def normalize_postcode(self, postcode):
""" Convert the postcode to a standardized form.
This function must yield exactly the same result as the SQL function

View File

@@ -337,8 +337,7 @@ class LegacyNameAnalyzer(AbstractAnalyzer):
return self.normalizer.transliterate(phrase)
@staticmethod
def normalize_postcode(postcode):
def normalize_postcode(self, postcode):
""" Convert the postcode to a standardized form.
This function must yield exactly the same result as the SQL function