Commit c8e12a94 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: Fix pylint warning.

W: Dangerous default value _MARKER (__builtin__.list) as argument (dangerous-default-value)
parent e5587493
...@@ -173,7 +173,7 @@ class Image(TextConvertableMixin, File, OFSImage): ...@@ -173,7 +173,7 @@ class Image(TextConvertableMixin, File, OFSImage):
return self.height return self.height
security.declareProtected(Permissions.AccessContentsInformation, 'getContentType') security.declareProtected(Permissions.AccessContentsInformation, 'getContentType')
def getContentType( # pylint: disable=arguments-differ,dangerous-default-value def getContentType( # pylint: disable=arguments-differ
self, self,
default=_MARKER, default=_MARKER,
): ):
...@@ -211,7 +211,7 @@ class Image(TextConvertableMixin, File, OFSImage): ...@@ -211,7 +211,7 @@ class Image(TextConvertableMixin, File, OFSImage):
return links return links
security.declareProtected(Permissions.AccessContentsInformation, 'displayMap') security.declareProtected(Permissions.AccessContentsInformation, 'displayMap')
def displayMap( # pylint: disable=dangerous-default-value def displayMap(
self, self,
exclude=None, exclude=None,
format=None, # pylint: disable=redefined-builtin format=None, # pylint: disable=redefined-builtin
...@@ -414,7 +414,7 @@ class Image(TextConvertableMixin, File, OFSImage): ...@@ -414,7 +414,7 @@ class Image(TextConvertableMixin, File, OFSImage):
return self.getData() return self.getData()
return self._resize(quality, width, height, format, resolution, frame, crop) return self._resize(quality, width, height, format, resolution, frame, crop)
def _makeDisplayPhoto( # pylint: disable=dangerous-default-value def _makeDisplayPhoto(
self, self,
format=None, # pylint: disable=redefined-builtin format=None, # pylint: disable=redefined-builtin
quality=_MARKER, quality=_MARKER,
......
...@@ -52,7 +52,7 @@ from Products.ERP5.mixin.crawlable import CrawlableMixin ...@@ -52,7 +52,7 @@ from Products.ERP5.mixin.crawlable import CrawlableMixin
from Products.ERP5.mixin.discoverable import DiscoverableMixin from Products.ERP5.mixin.discoverable import DiscoverableMixin
from Products.ERP5.mixin.url import UrlMixin from Products.ERP5.mixin.url import UrlMixin
_MARKER = [] _MARKER = object()
# these property ids are unchangable # these property ids are unchangable
FIXED_PROPERTY_IDS = ('id', 'uid', 'rid', 'sid') FIXED_PROPERTY_IDS = ('id', 'uid', 'rid', 'sid')
......
...@@ -52,7 +52,7 @@ from email.utils import parsedate_tz, mktime_tz ...@@ -52,7 +52,7 @@ from email.utils import parsedate_tz, mktime_tz
DEFAULT_TEXT_FORMAT = 'text/html' DEFAULT_TEXT_FORMAT = 'text/html'
COMMASPACE = ', ' COMMASPACE = ', '
_MARKER = () _MARKER = object()
filename_regexp = 'name="([^"]*)"' filename_regexp = 'name="([^"]*)"'
......
...@@ -33,7 +33,7 @@ from Products.ERP5Type import Permissions, PropertySheet ...@@ -33,7 +33,7 @@ from Products.ERP5Type import Permissions, PropertySheet
from erp5.component.document.Event import Event from erp5.component.document.Event import Event
_MARKER = () _MARKER = object()
class MailMessage(Event): class MailMessage(Event):
""" """
......
...@@ -34,7 +34,7 @@ from Products.ERP5Type import Permissions ...@@ -34,7 +34,7 @@ from Products.ERP5Type import Permissions
from Products.ERP5Type.Tool.BaseTool import BaseTool from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ZSQLCatalog.SQLCatalog import SimpleQuery, ComplexQuery from Products.ZSQLCatalog.SQLCatalog import SimpleQuery, ComplexQuery
_MARKER = () _MARKER = object()
class DomainTool(BaseTool): class DomainTool(BaseTool):
""" """
......
...@@ -44,7 +44,7 @@ from cgi import escape ...@@ -44,7 +44,7 @@ from cgi import escape
import logging import logging
_MARKER = () _MARKER = object()
event_log = logging.getLogger() event_log = logging.getLogger()
access_log = logging.getLogger("access") access_log = logging.getLogger("access")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment