--- a/src/pyams_utils/__init__.py Wed Nov 20 19:26:23 2019 +0100
+++ b/src/pyams_utils/__init__.py Fri Nov 22 18:51:37 2019 +0100
@@ -18,24 +18,23 @@
custom decorators to define several kinds of properties, and so on.
"""
+from pyramid.i18n import TranslationStringFactory
+from zope.schema.fieldproperty import FieldProperty
+
+
__docformat__ = 'restructuredtext'
-from zope.schema.fieldproperty import FieldProperty
-
-from pyramid.i18n import TranslationStringFactory
_ = TranslationStringFactory('pyams_utils')
def get_field_doc(self):
"""Try to get FieldProperty field docstring from field interface"""
- field = self._FieldProperty__field
+ field = self._FieldProperty__field # pylint: disable=protected-access
if field.title:
if field.description:
return '{0}: {1}'.format(field.title, field.description)
- else:
- return field.title
- else:
- return super(self.__class__, self).__doc__
+ return field.title
+ return super(self.__class__, self).__doc__
FieldProperty.__doc__ = property(get_field_doc)
@@ -43,5 +42,5 @@
def includeme(config):
"""pyams_utils features include"""
- from .include import include_package
+ from .include import include_package # pylint: disable=import-outside-toplevel
include_package(config)