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
140
Merge Requests
140
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
ec64cedf
Commit
ec64cedf
authored
Apr 11, 2024
by
Jérome Perrin
Committed by
Arnaud Fontaine
Jul 31, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
web: pylint (py3)
parent
cf0bc418
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
5 deletions
+10
-5
bt5/erp5_web/DocumentTemplateItem/portal_components/document.erp5.WebSection.py
...emplateItem/portal_components/document.erp5.WebSection.py
+2
-2
bt5/erp5_web/ExtensionTemplateItem/portal_components/extension.erp5.WebUtility.py
...mplateItem/portal_components/extension.erp5.WebUtility.py
+3
-0
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/Base_convertHtmlToSingleFile.py
...tem/portal_skins/erp5_web/Base_convertHtmlToSingleFile.py
+2
-2
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/Base_formatAttachmentListToMIMEMultipartString.py
...rp5_web/Base_formatAttachmentListToMIMEMultipartString.py
+3
-1
No files found.
bt5/erp5_web/DocumentTemplateItem/portal_components/document.erp5.WebSection.py
View file @
ec64cedf
...
@@ -442,7 +442,7 @@ class WebSection(Domain, DocumentExtensibleTraversableMixin):
...
@@ -442,7 +442,7 @@ class WebSection(Domain, DocumentExtensibleTraversableMixin):
return
result
return
result
def
_edit
(
self
,
**
kw
):
def
_edit
(
self
,
*
args
,
*
*
kw
):
# XXX it is unclear if we should keep this behavior in other potential subclasses.
# XXX it is unclear if we should keep this behavior in other potential subclasses.
# Probably yes.
# Probably yes.
if
self
.
getPortalType
()
in
WEB_SECTION_PORTAL_TYPE_TUPLE
:
if
self
.
getPortalType
()
in
WEB_SECTION_PORTAL_TYPE_TUPLE
:
...
@@ -453,4 +453,4 @@ class WebSection(Domain, DocumentExtensibleTraversableMixin):
...
@@ -453,4 +453,4 @@ class WebSection(Domain, DocumentExtensibleTraversableMixin):
else
:
else
:
# cleanup beforeTraverse hooks that may exist after this document was cloned.
# cleanup beforeTraverse hooks that may exist after this document was cloned.
self
.
_cleanupBeforeTraverseHooks
()
self
.
_cleanupBeforeTraverseHooks
()
super
(
WebSection
,
self
).
_edit
(
**
kw
)
super
(
WebSection
,
self
).
_edit
(
*
args
,
*
*
kw
)
bt5/erp5_web/ExtensionTemplateItem/portal_components/extension.erp5.WebUtility.py
View file @
ec64cedf
...
@@ -60,6 +60,9 @@ class HtmlParseHelper(HTMLParser):
...
@@ -60,6 +60,9 @@ class HtmlParseHelper(HTMLParser):
self
.
result
.
append
((
"pi"
,
data
))
self
.
result
.
append
((
"pi"
,
data
))
def
unknown_decl
(
self
,
data
):
def
unknown_decl
(
self
,
data
):
self
.
result
.
append
((
"unknown_decl"
,
data
))
self
.
result
.
append
((
"unknown_decl"
,
data
))
def
error
(
self
,
message
):
raise
ValueError
(
message
)
def
parseHtml
(
text
):
def
parseHtml
(
text
):
"""
"""
...
...
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/Base_convertHtmlToSingleFile.py
View file @
ec64cedf
...
@@ -194,7 +194,7 @@ def handleHrefObject(obj, src, default_mimetype="text/html", default_data=b"<p>L
...
@@ -194,7 +194,7 @@ def handleHrefObject(obj, src, default_mimetype="text/html", default_data=b"<p>L
data
=
bytes
(
obj
.
data
or
b""
)
data
=
bytes
(
obj
.
data
or
b""
)
else
:
else
:
data
=
getattr
(
obj
,
"getData"
,
lambda
:
bytes
(
obj
))()
or
b""
data
=
getattr
(
obj
,
"getData"
,
lambda
:
bytes
(
obj
))()
or
b""
if
six
.
PY2
and
isinstance
(
data
,
unicode
):
if
six
.
PY2
and
isinstance
(
data
,
unicode
):
# pylint:disable=undefined-variable
data
=
data
.
encode
(
"utf-8"
)
data
=
data
.
encode
(
"utf-8"
)
assert
isinstance
(
data
,
bytes
)
assert
isinstance
(
data
,
bytes
)
return
handleLinkedData
(
mime
,
data
,
src
)
return
handleLinkedData
(
mime
,
data
,
src
)
...
@@ -205,7 +205,7 @@ def handleHrefObject(obj, src, default_mimetype="text/html", default_data=b"<p>L
...
@@ -205,7 +205,7 @@ def handleHrefObject(obj, src, default_mimetype="text/html", default_data=b"<p>L
# use the same behavior as when we call a script from browser URL bar.
# use the same behavior as when we call a script from browser URL bar.
if
not
hasattr
(
obj
,
"getPortalType"
)
and
callable
(
obj
):
if
not
hasattr
(
obj
,
"getPortalType"
)
and
callable
(
obj
):
mime
,
data
=
"text/html"
,
obj
()
mime
,
data
=
"text/html"
,
obj
()
if
six
.
PY2
and
isinstance
(
data
,
unicode
):
if
six
.
PY2
and
isinstance
(
data
,
unicode
):
# pylint:disable=undefined-variable
data
=
data
.
encode
(
"utf-8"
)
data
=
data
.
encode
(
"utf-8"
)
return
handleLinkedData
(
mime
,
data
,
src
)
return
handleLinkedData
(
mime
,
data
,
src
)
...
...
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/Base_formatAttachmentListToMIMEMultipartString.py
View file @
ec64cedf
...
@@ -148,7 +148,9 @@ for attachment in attachment_list:
...
@@ -148,7 +148,9 @@ for attachment in attachment_list:
for
key
,
value
in
attachment
.
get
(
"add_header_list"
,
[]):
for
key
,
value
in
attachment
.
get
(
"add_header_list"
,
[]):
part
.
add_header
(
key
,
value
)
part
.
add_header
(
key
,
value
)
if
attachment
.
get
(
"filename"
,
None
)
is
not
None
:
if
attachment
.
get
(
"filename"
,
None
)
is
not
None
:
part
.
add_header
(
"Content-Disposition"
,
"attachment"
,
attachment
[
"filename"
])
# XXX disable too-many-function-args because there is no error with this code,
# but it might just be not tested.
part
.
add_header
(
"Content-Disposition"
,
"attachment"
,
attachment
[
"filename"
])
# pylint:disable=too-many-function-args
outer
.
attach
(
part
)
outer
.
attach
(
part
)
#return outer.as_string()
#return outer.as_string()
...
...
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