Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
139
Merge Requests
139
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
3cb97d48
Commit
3cb97d48
authored
Apr 09, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*: fix some problems reported by pylint
parent
24841f4e
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
25 additions
and
18 deletions
+25
-18
bt5/erp5_base/DocumentTemplateItem/portal_components/document.erp5.SimulatedDeliveryBuilder.py
...rtal_components/document.erp5.SimulatedDeliveryBuilder.py
+0
-1
bt5/erp5_credential/TestTemplateItem/portal_components/test.erp5.testERP5Credential.py
...ateItem/portal_components/test.erp5.testERP5Credential.py
+1
-2
bt5/erp5_interface_post/TestTemplateItem/portal_components/test.erp5.testInterfacePost.py
...lateItem/portal_components/test.erp5.testInterfacePost.py
+3
-0
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.EmailDocument.py
...lateItem/portal_components/document.erp5.EmailDocument.py
+5
-3
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.File.py
...umentTemplateItem/portal_components/document.erp5.File.py
+1
-2
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.FolderWorkflowActionUtils.py
...al_components/extension.erp5.FolderWorkflowActionUtils.py
+0
-1
product/ERP5/bootstrap/erp5_core/MixinTemplateItem/portal_components/mixin.erp5.BaseConvertableFileMixin.py
.../portal_components/mixin.erp5.BaseConvertableFileMixin.py
+0
-1
product/ERP5/bootstrap/erp5_core/MixinTemplateItem/portal_components/mixin.erp5.BaseExtensibleTraversableMixin.py
...l_components/mixin.erp5.BaseExtensibleTraversableMixin.py
+2
-0
product/ERP5/bootstrap/erp5_core/ModuleComponentTemplateItem/portal_components/module.erp5.MovementGroup.py
...mplateItem/portal_components/module.erp5.MovementGroup.py
+0
-1
product/ERP5/bootstrap/erp5_core/ToolComponentTemplateItem/portal_components/tool.erp5.DiffTool.py
...onentTemplateItem/portal_components/tool.erp5.DiffTool.py
+3
-0
product/PortalTransforms/utils.py
product/PortalTransforms/utils.py
+5
-4
product/Zelenium/generator.py
product/Zelenium/generator.py
+5
-3
No files found.
bt5/erp5_base/DocumentTemplateItem/portal_components/document.erp5.SimulatedDeliveryBuilder.py
View file @
3cb97d48
...
@@ -99,7 +99,6 @@ class SimulatedDeliveryBuilder(BuilderMixin):
...
@@ -99,7 +99,6 @@ class SimulatedDeliveryBuilder(BuilderMixin):
Redefine this method, because it seems nothing interesting can be
Redefine this method, because it seems nothing interesting can be
done before building Delivery.
done before building Delivery.
"""
"""
pass
security
.
declarePrivate
(
'searchMovementList'
)
security
.
declarePrivate
(
'searchMovementList'
)
@
UnrestrictedMethod
@
UnrestrictedMethod
...
...
bt5/erp5_credential/TestTemplateItem/portal_components/test.erp5.testERP5Credential.py
View file @
3cb97d48
...
@@ -1099,12 +1099,11 @@ class TestERP5Credential(ERP5TypeTestCase):
...
@@ -1099,12 +1099,11 @@ class TestERP5Credential(ERP5TypeTestCase):
default_follow_up_uid
=
credential_request
.
getUid
())
default_follow_up_uid
=
credential_request
.
getUid
())
last_message
=
self
.
portal
.
MailHost
.
_last_message
last_message
=
self
.
portal
.
MailHost
.
_last_message
self
.
assertNotEqual
((),
last_message
)
self
.
assertNotEqual
((),
last_message
)
mfrom
,
mto
,
message_text
=
last_message
mfrom
,
mto
,
_
=
last_message
self
.
assertEqual
(
mfrom
,
'Portal Administrator <postmaster@localhost>'
)
self
.
assertEqual
(
mfrom
,
'Portal Administrator <postmaster@localhost>'
)
self
.
assertEqual
([
'Vifib Test <barney@duff.com>'
],
mto
)
self
.
assertEqual
([
'Vifib Test <barney@duff.com>'
],
mto
)
decoded_message
=
self
.
decode_email
(
last_message
[
2
])
decoded_message
=
self
.
decode_email
(
last_message
[
2
])
self
.
assertEqual
(
decoded_message
[
"headers"
][
"subject"
].
encode
(),
"Welcome"
)
self
.
assertEqual
(
decoded_message
[
"headers"
][
"subject"
].
encode
(),
"Welcome"
)
body_message
=
decoded_message
[
'body'
]
self
.
assertRegex
(
self
.
decode_email
(
last_message
[
2
])[
'body'
],
r"Hello\
Vi
fib\
Tes
t\
,
")
self
.
assertRegex
(
self
.
decode_email
(
last_message
[
2
])[
'body'
],
r"Hello\
Vi
fib\
Tes
t\
,
")
self.assertRegex(self.decode_email(last_message[2])['body'], "
key
=%
s
" % mail_message.getReference())
self.assertRegex(self.decode_email(last_message[2])['body'], "
key
=%
s
" % mail_message.getReference())
...
...
bt5/erp5_interface_post/TestTemplateItem/portal_components/test.erp5.testInterfacePost.py
View file @
3cb97d48
...
@@ -28,10 +28,13 @@ import email
...
@@ -28,10 +28,13 @@ import email
import
mock
import
mock
import
time
import
time
import
six
import
six
# pylint:disable=no-name-in-module
if
six
.
PY3
:
if
six
.
PY3
:
from
email
import
message_from_bytes
from
email
import
message_from_bytes
else
:
else
:
from
email
import
message_from_string
as
message_from_bytes
from
email
import
message_from_string
as
message_from_bytes
# pylint:enable=no-name-in-module
from
Products.ERP5Type.tests.ERP5TypeLiveTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.ERP5TypeLiveTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.Sequence
import
SequenceList
from
Products.ERP5Type.tests.Sequence
import
SequenceList
from
Products.ZSQLCatalog.SQLCatalog
import
SimpleQuery
from
Products.ZSQLCatalog.SQLCatalog
import
SimpleQuery
...
...
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.EmailDocument.py
View file @
3cb97d48
...
@@ -48,10 +48,12 @@ except ImportError:
...
@@ -48,10 +48,12 @@ except ImportError:
not installed yet.
not installed yet.
"""
"""
if
six
.
PY2
:
# pylint:disable=no-name-in-module
from
email
import
message_from_string
as
message_from_bytes
if
six
.
PY3
:
else
:
from
email
import
message_from_bytes
from
email
import
message_from_bytes
else
:
from
email
import
message_from_string
as
message_from_bytes
# pylint:enable=no-name-in-module
from
email.utils
import
parsedate_tz
,
mktime_tz
from
email.utils
import
parsedate_tz
,
mktime_tz
...
...
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.File.py
View file @
3cb97d48
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
#
#
##############################################################################
##############################################################################
import
six
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type.Base
import
WorkflowMethod
from
Products.ERP5Type.Base
import
WorkflowMethod
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type
import
Permissions
,
PropertySheet
...
@@ -154,7 +153,7 @@ class File(Document, OFS_File):
...
@@ -154,7 +153,7 @@ class File(Document, OFS_File):
security
.
declarePrivate
(
'update_data'
)
security
.
declarePrivate
(
'update_data'
)
def
update_data
(
self
,
*
args
,
**
kw
):
def
update_data
(
self
,
*
args
,
**
kw
):
super
(
File
,
self
).
update_data
(
*
args
,
**
kw
)
super
(
File
,
self
).
update_data
(
*
args
,
**
kw
)
if
six
.
PY2
and
isinstance
(
self
.
size
,
long
):
if
six
.
PY2
and
isinstance
(
self
.
size
,
long
):
# pylint:disable=undefined-variable
self
.
size
=
int
(
self
.
size
)
self
.
size
=
int
(
self
.
size
)
security
.
declareProtected
(
Permissions
.
ModifyPortalContent
,
'setFile'
)
security
.
declareProtected
(
Permissions
.
ModifyPortalContent
,
'setFile'
)
...
...
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.FolderWorkflowActionUtils.py
View file @
3cb97d48
...
@@ -29,7 +29,6 @@
...
@@ -29,7 +29,6 @@
import
six
import
six
from
past.builtins
import
cmp
from
hashlib
import
md5
from
hashlib
import
md5
# Some workflow does not make sense in the context of mass transition and are
# Some workflow does not make sense in the context of mass transition and are
...
...
product/ERP5/bootstrap/erp5_core/MixinTemplateItem/portal_components/mixin.erp5.BaseConvertableFileMixin.py
View file @
3cb97d48
...
@@ -33,7 +33,6 @@ from Products.ERP5Type.Message import translateString
...
@@ -33,7 +33,6 @@ from Products.ERP5Type.Message import translateString
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type
import
Permissions
from
OFS.Image
import
Pdata
from
OFS.Image
import
Pdata
from
io
import
BytesIO
from
io
import
BytesIO
import
six
_MARKER
=
object
()
_MARKER
=
object
()
class
BaseConvertableFileMixin
:
class
BaseConvertableFileMixin
:
...
...
product/ERP5/bootstrap/erp5_core/MixinTemplateItem/portal_components/mixin.erp5.BaseExtensibleTraversableMixin.py
View file @
3cb97d48
...
@@ -29,10 +29,12 @@
...
@@ -29,10 +29,12 @@
from
warnings
import
warn
from
warnings
import
warn
import
six
import
six
# pylint:disable=no-name-in-module
if
six
.
PY2
:
if
six
.
PY2
:
from
base64
import
decodestring
as
decodebytes
from
base64
import
decodestring
as
decodebytes
else
:
else
:
from
base64
import
decodebytes
from
base64
import
decodebytes
# pylint:enable=no-name-in-module
from
zLOG
import
LOG
from
zLOG
import
LOG
from
AccessControl
import
ClassSecurityInfo
,
getSecurityManager
from
AccessControl
import
ClassSecurityInfo
,
getSecurityManager
...
...
product/ERP5/bootstrap/erp5_core/ModuleComponentTemplateItem/portal_components/module.erp5.MovementGroup.py
View file @
3cb97d48
...
@@ -31,7 +31,6 @@
...
@@ -31,7 +31,6 @@
from
collections
import
OrderedDict
from
collections
import
OrderedDict
from
warnings
import
warn
from
warnings
import
warn
from
Products.PythonScripts.Utility
import
allow_class
from
Products.PythonScripts.Utility
import
allow_class
from
Products.ERP5Type.Utils
import
ensure_list
class
MovementGroupNode
:
class
MovementGroupNode
:
...
...
product/ERP5/bootstrap/erp5_core/ToolComponentTemplateItem/portal_components/tool.erp5.DiffTool.py
View file @
3cb97d48
...
@@ -28,10 +28,13 @@
...
@@ -28,10 +28,13 @@
##############################################################################
##############################################################################
import
six
import
six
# pylint:disable=no-name-in-module,import-error
if
six
.
PY3
:
if
six
.
PY3
:
from
collections.abc
import
Set
from
collections.abc
import
Set
else
:
else
:
from
collections
import
Set
from
collections
import
Set
# pylint:enable=no-name-in-module,import-error
import
difflib
import
difflib
import
warnings
import
warnings
try
:
try
:
...
...
product/PortalTransforms/utils.py
View file @
3cb97d48
...
@@ -4,11 +4,12 @@
...
@@ -4,11 +4,12 @@
import
io
import
io
import
six
import
six
if
six
.
PY2
:
# pylint:disable=no-name-in-module
from
email
import
message_from_string
as
message_from_bytes
if
six
.
PY3
:
else
:
from
email
import
message_from_bytes
from
email
import
message_from_bytes
else
:
from
email
import
message_from_string
as
message_from_bytes
# pylint:enable=no-name-in-module
class
TransformException
(
Exception
):
class
TransformException
(
Exception
):
pass
pass
...
...
product/Zelenium/generator.py
View file @
3cb97d48
...
@@ -12,10 +12,12 @@ import glob
...
@@ -12,10 +12,12 @@ import glob
import
cgi
import
cgi
from
six.moves
import
urllib
from
six.moves
import
urllib
import
multifile
import
multifile
if
six
.
PY2
:
# pylint:disable=no-name-in-module
from
email
import
message_from_file
as
message_from_bytes
if
six
.
PY3
:
else
:
from
email
import
message_from_bytes
from
email
import
message_from_bytes
else
:
from
email
import
message_from_string
as
message_from_bytes
# pylint:enable=no-name-in-module
_TEST_CASE_HEADER
=
"""
\
_TEST_CASE_HEADER
=
"""
\
<html>
<html>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment