fix: explicitly disable 'duplicate-code' false alarm
so we can keep default config for that checker
This commit is contained in:
parent
96eb8f4356
commit
7b7fb6d7b8
3 changed files with 7 additions and 5 deletions
|
@ -1,8 +1,4 @@
|
||||||
# -*- mode: conf; -*-
|
# -*- mode: conf; -*-
|
||||||
|
|
||||||
[MESSAGES CONTROL]
|
[MESSAGES CONTROL]
|
||||||
disable=fixme,
|
disable=fixme
|
||||||
|
|
||||||
[SIMILARITIES]
|
|
||||||
# nb. cuts out some noise for duplicate-code
|
|
||||||
min-similarity-lines=5
|
|
||||||
|
|
|
@ -634,6 +634,7 @@ class FileDownload(colander.String):
|
||||||
name/size is shown with no hyperlink.
|
name/size is shown with no hyperlink.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# pylint: disable=duplicate-code
|
||||||
def __init__(self, request, *args, **kwargs):
|
def __init__(self, request, *args, **kwargs):
|
||||||
self.url = kwargs.pop("url", None)
|
self.url = kwargs.pop("url", None)
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
|
@ -641,6 +642,8 @@ class FileDownload(colander.String):
|
||||||
self.config = self.request.wutta_config
|
self.config = self.request.wutta_config
|
||||||
self.app = self.config.get_app()
|
self.app = self.config.get_app()
|
||||||
|
|
||||||
|
# pylint: enable=duplicate-code
|
||||||
|
|
||||||
def widget_maker(self, **kwargs): # pylint: disable=empty-docstring
|
def widget_maker(self, **kwargs): # pylint: disable=empty-docstring
|
||||||
""" """
|
""" """
|
||||||
kwargs.setdefault("url", self.url)
|
kwargs.setdefault("url", self.url)
|
||||||
|
|
|
@ -321,6 +321,7 @@ class FileDownloadWidget(Widget): # pylint: disable=abstract-method
|
||||||
|
|
||||||
readonly_template = "readonly/filedownload"
|
readonly_template = "readonly/filedownload"
|
||||||
|
|
||||||
|
# pylint: disable=duplicate-code
|
||||||
def __init__(self, request, *args, **kwargs):
|
def __init__(self, request, *args, **kwargs):
|
||||||
self.url = kwargs.pop("url", None)
|
self.url = kwargs.pop("url", None)
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
|
@ -328,6 +329,8 @@ class FileDownloadWidget(Widget): # pylint: disable=abstract-method
|
||||||
self.config = self.request.wutta_config
|
self.config = self.request.wutta_config
|
||||||
self.app = self.config.get_app()
|
self.app = self.config.get_app()
|
||||||
|
|
||||||
|
# pylint: enable=duplicate-code
|
||||||
|
|
||||||
def serialize(self, field, cstruct, **kw): # pylint: disable=empty-docstring
|
def serialize(self, field, cstruct, **kw): # pylint: disable=empty-docstring
|
||||||
""" """
|
""" """
|
||||||
# nb. readonly is the only way this rolls
|
# nb. readonly is the only way this rolls
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue