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
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
cc7f9fbb
Commit
cc7f9fbb
authored
Oct 08, 2022
by
Kazuhiko Shiozaki
Committed by
Jérome Perrin
Jun 05, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
py2/py3: explicitly cast to list for dict.keys() or dict.items() + list.
parent
f1fd95f8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
7 deletions
+11
-7
bt5/erp5_data_notebook/ExtensionTemplateItem/portal_components/extension.erp5.JupyterCompile.py
...teItem/portal_components/extension.erp5.JupyterCompile.py
+2
-1
bt5/erp5_deferred_style/SkinTemplateItem/portal_skins/erp5_deferred_style_core/ERP5Site_filterRequestForDeferredStyle.py
...rred_style_core/ERP5Site_filterRequestForDeferredStyle.py
+2
-1
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Delivery_setCausalityFromSimulation.py
...l_skins/erp5_trade/Delivery_setCausalityFromSimulation.py
+2
-1
product/ERP5/bootstrap/erp5_core/ToolComponentTemplateItem/portal_components/tool.erp5.DomainTool.py
...entTemplateItem/portal_components/tool.erp5.DomainTool.py
+2
-1
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_quantity_unit_conversion_list.sql
..._mysql_innodb/z_catalog_quantity_unit_conversion_list.sql
+1
-1
product/ERP5Type/mixin/matrix.py
product/ERP5Type/mixin/matrix.py
+2
-2
No files found.
bt5/erp5_data_notebook/ExtensionTemplateItem/portal_components/extension.erp5.JupyterCompile.py
View file @
cc7f9fbb
...
...
@@ -17,6 +17,7 @@ import Acquisition
import
astor
import
importlib
from
erp5.component.module.Log
import
log
from
Products.ERP5Type.Utils
import
ensure_list
# Display matplotlib figure automatically like
# the original python kernel
...
...
@@ -495,7 +496,7 @@ def Base_runJupyterCode(self, jupyter_code, old_notebook_context):
# Saves a list of all the variables we injected into the user context and
# shall be deleted before saving the context.
volatile_variable_list
=
current_setup_dict
.
keys
()
+
inject_variable_dict
.
keys
(
)
+
user_context
.
get
(
'_volatile_variable_list'
,
[])
volatile_variable_list
=
ensure_list
(
current_setup_dict
.
keys
())
+
ensure_list
(
inject_variable_dict
.
keys
()
)
+
user_context
.
get
(
'_volatile_variable_list'
,
[])
volatile_variable_list
.
append
(
'__builtins__'
)
for
key
,
val
in
user_context
.
items
():
...
...
bt5/erp5_deferred_style/SkinTemplateItem/portal_skins/erp5_deferred_style_core/ERP5Site_filterRequestForDeferredStyle.py
View file @
cc7f9fbb
from
Products.ERP5Type.Utils
import
ensure_list
new_request
=
{}
for
k
,
v
in
request
.
other
.
items
()
+
request
.
form
.
items
(
):
for
k
,
v
in
ensure_list
(
request
.
other
.
items
())
+
ensure_list
(
request
.
form
.
items
()
):
if
k
not
in
(
'TraversalRequestNameStack'
,
'AUTHENTICATED_USER'
,
'URL'
,
'SERVER_URL'
,
'AUTHENTICATION_PATH'
,
'USER_PREF_LANGUAGES'
,
'PARENTS'
,
'PUBLISHED'
,
'AcceptLanguage'
,
'AcceptCharset'
,
'RESPONSE'
,
'SESSION'
,
...
...
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Delivery_setCausalityFromSimulation.py
View file @
cc7f9fbb
...
...
@@ -9,6 +9,7 @@ It will also not work if strict security is set on simulation. It's recommended
delivery builder.
"""
from
erp5.component.module.Log
import
log
from
Products.ERP5Type.Utils
import
ensure_list
LOG
=
lambda
msg
:
log
(
"Delivery_setCausalityFromSimulation on %s"
%
context
.
getPath
(),
msg
)
LOG
=
lambda
msg
:
'DISABLED'
...
...
@@ -36,4 +37,4 @@ for simulation_movement in simulation_movement_list :
causality_value_set
[
explanation_value
]
=
1
LOG
(
'setCausalityValueList %s'
%
causality_value_set
.
keys
())
delivery
.
setCausalityValueList
(
causality_value_set
.
keys
()
+
delivery
.
getCausalityValueList
(
))
delivery
.
setCausalityValueList
(
ensure_list
(
causality_value_set
.
keys
())
+
ensure_list
(
delivery
.
getCausalityValueList
()
))
product/ERP5/bootstrap/erp5_core/ToolComponentTemplateItem/portal_components/tool.erp5.DomainTool.py
View file @
cc7f9fbb
...
...
@@ -32,6 +32,7 @@ from AccessControl import ClassSecurityInfo
from
Products.ERP5Type.Globals
import
InitializeClass
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type.Tool.BaseTool
import
BaseTool
from
Products.ERP5Type.Utils
import
ensure_list
from
Products.ZSQLCatalog.SQLCatalog
import
SimpleQuery
,
ComplexQuery
import
six
...
...
@@ -337,7 +338,7 @@ class DomainTool(BaseTool):
mapped_value
=
self
.
getPortalObject
().
newContent
(
temp_object
=
True
,
portal_type
=
'Supply Cell'
,
id
=
'multivalued_mapped_value'
)
mapped_value
.
_setMappedValuePropertyList
(
mapped_value_property_dict
.
keys
(
))
ensure_list
(
mapped_value_property_dict
.
keys
()
))
mapped_value
.
__dict__
.
update
(
mapped_value_property_dict
)
return
mapped_value
...
...
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_quantity_unit_conversion_list.sql
View file @
cc7f9fbb
...
...
@@ -13,7 +13,7 @@
<
dtml
-
if
quantity_unit_conversion_dict
>
DELETE
FROM
`quantity_unit_conversion`
WHERE
<
dtml
-
sqltest
"quantity_unit_conversion_dict.keys(
)"
column
=
"resource_uid"
type
=
"int"
multiple
>
<
dtml
-
sqltest
expr
=
"set(quantity_unit_conversion_dict.keys()
)"
column
=
"resource_uid"
type
=
"int"
multiple
>
<
dtml
-
var
sql_delimiter
>
...
...
product/ERP5Type/mixin/matrix.py
View file @
cc7f9fbb
...
...
@@ -30,7 +30,7 @@ from Products.ERP5Type.Globals import InitializeClass, PersistentMapping
from
Acquisition
import
aq_base
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type.Utils
import
cartesianProduct
,
INFINITE_SET
from
Products.ERP5Type.Utils
import
cartesianProduct
,
ensure_list
,
INFINITE_SET
from
Products.ERP5Type.Accessor.Constant
import
PropertyGetter
as
ConstantGetter
from
zLOG
import
LOG
...
...
@@ -163,7 +163,7 @@ class Matrix(object):
else
:
delete
=
set
()
to_delete
.
append
(
delete
)
for
k
,
v
in
id_dict
.
items
(
):
for
k
,
v
in
ensure_list
(
id_dict
.
items
()
):
try
:
axis
.
remove
(
k
)
if
last_id
<
v
:
...
...
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