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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
erp5
Commits
d1a6a688
Commit
d1a6a688
authored
Oct 01, 2022
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
py2/py3: 2to3 -f methodattrs
parent
b5193345
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
13 deletions
+16
-13
bt5/erp5_big_file/TestTemplateItem/portal_components/test.erp5.testBigFile.py
...stTemplateItem/portal_components/test.erp5.testBigFile.py
+2
-2
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testFields.py
...estTemplateItem/portal_components/test.erp5.testFields.py
+2
-2
bt5/erp5_dummy_movement/DocumentTemplateItem/portal_components/document.erp5.DummyMovement.py
...lateItem/portal_components/document.erp5.DummyMovement.py
+1
-1
product/ERP5Type/patches/DCWorkflow.py
product/ERP5Type/patches/DCWorkflow.py
+7
-7
product/ERP5Type/tests/ProcessingNodeTestCase.py
product/ERP5Type/tests/ProcessingNodeTestCase.py
+1
-1
product/ERP5Type/tests/Python3StyleTest.py
product/ERP5Type/tests/Python3StyleTest.py
+3
-0
No files found.
bt5/erp5_big_file/TestTemplateItem/portal_components/test.erp5.testBigFile.py
View file @
d1a6a688
...
...
@@ -304,7 +304,7 @@ class TestBigFile(ERP5TypeTestCase):
# NOTE this change is automatically reverted back in calling helper
self
.
assertIsInstance
(
f
.
_baseGetData
.
_default
,
str
)
self
.
assertEqual
(
f
.
_baseGetData
.
_default
,
''
)
f
.
_baseGetData
.
im_func
.
_default
=
None
# NOTE not possible to do on just f._baseGetData
f
.
_baseGetData
.
__func__
.
_default
=
None
# NOTE not possible to do on just f._baseGetData
self
.
assertIs
(
f
.
_baseGetData
.
_default
,
None
)
self
.
assertIs
(
f
.
_baseGetData
(),
None
)
# <- oops
...
...
@@ -338,7 +338,7 @@ class TestBigFile(ERP5TypeTestCase):
self
.
assertEqual
(
_
,
''
)
# NOTE obtaining getter is not possible via BigFile._baseGetData
g
=
f
.
_baseGetData
.
im_func
g
=
f
.
_baseGetData
.
__func__
self
.
assertIsInstance
(
g
.
_default
,
str
)
self
.
assertEqual
(
g
.
_default
,
''
)
...
...
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testFields.py
View file @
d1a6a688
...
...
@@ -66,10 +66,10 @@ class TestRenderViewAPI(ERP5TypeTestCase):
def
test_signature
(
self
):
for
field
in
FieldRegistry
.
get_field_classes
().
itervalues
():
# pylint: disable=no-value-for-parameter
self
.
assertEqual
((
'self'
,
'value'
,
'REQUEST'
,
'render_prefix'
),
field
.
render_view
.
im_func
.
func_code
.
co_varnames
)
field
.
render_view
.
__func__
.
func_code
.
co_varnames
)
if
field
is
not
ProxyField
:
self
.
assertEqual
((
'self'
,
'field'
,
'value'
,
'REQUEST'
),
field
.
widget
.
render_view
.
im_func
.
func_code
.
co_varnames
[:
4
],
'%s %s'
%
(
field
.
widget
,
field
.
widget
.
render_view
.
im_func
.
func_code
.
co_varnames
[:
4
]))
field
.
widget
.
render_view
.
__func__
.
func_code
.
co_varnames
[:
4
],
'%s %s'
%
(
field
.
widget
,
field
.
widget
.
render_view
.
__func__
.
func_code
.
co_varnames
[:
4
]))
class
TestFloatField
(
ERP5TypeTestCase
):
...
...
bt5/erp5_dummy_movement/DocumentTemplateItem/portal_components/document.erp5.DummyMovement.py
View file @
d1a6a688
...
...
@@ -72,7 +72,7 @@ class DummyMovement(Movement):
parent
=
self
.
getParentValue
()
if
isinstance
(
parent
,
DummyDelivery
):
self
=
parent
return
DummyDelivery
.
getSimulationState
.
im_func
(
self
)
return
DummyDelivery
.
getSimulationState
.
__func__
(
self
)
def
getDeliveryValue
(
self
):
"""
...
...
product/ERP5Type/patches/DCWorkflow.py
View file @
d1a6a688
...
...
@@ -198,10 +198,10 @@ DCWorkflowDefinition.listObjectActions = ERP5Workflow.__dict__['listObjectAction
from
Products.DCWorkflow.Expression
import
Expression
DCWorkflowDefinition
.
security
.
declarePrivate
(
'getWorklistVariableMatchDict'
)
DCWorkflowDefinition
.
getWorklistVariableMatchDict
=
ERP5Workflow
.
getWorklistVariableMatchDict
.
im_func
DCWorkflowDefinition
.
getWorklistVariableMatchDict
=
ERP5Workflow
.
getWorklistVariableMatchDict
.
__func__
DCWorkflowDefinition
.
security
.
declarePrivate
(
'isWorkflowMethodSupported'
)
DCWorkflowDefinition
.
isWorkflowMethodSupported
=
ERP5Workflow
.
isWorkflowMethodSupported
.
im_func
DCWorkflowDefinition
.
isWorkflowMethodSupported
=
ERP5Workflow
.
isWorkflowMethodSupported
.
__func__
TransitionDefinition__init__orig
=
TransitionDefinition
.
__init__
def
TransitionDefinition__init__
(
self
,
*
args
,
**
kw
):
...
...
@@ -421,7 +421,7 @@ def _executeMetaTransition(self, ob, new_state_id):
DCWorkflowDefinition
.
_executeMetaTransition
=
_executeMetaTransition
DCWorkflowDefinition
.
wrapWorkflowMethod
=
ERP5Workflow
.
wrapWorkflowMethod
.
im_func
DCWorkflowDefinition
.
wrapWorkflowMethod
=
ERP5Workflow
.
wrapWorkflowMethod
.
__func__
def
StateDefinition_getStatePermissionRoleListDict
(
self
):
if
self
.
permission_roles
is
None
:
...
...
@@ -878,7 +878,7 @@ def method_getGuardExpressionInstance(self):
return
self
.
guard
.
expr
def
method_checkGuard
(
self
,
*
args
,
**
kwargs
):
return
ERP5Guardable
.
checkGuard
.
im_func
(
self
,
*
args
,
**
kwargs
)
return
ERP5Guardable
.
checkGuard
.
__func__
(
self
,
*
args
,
**
kwargs
)
def
method_getAction
(
self
):
return
self
.
actbox_url
...
...
@@ -1207,9 +1207,9 @@ DCWorkflowDefinition.getTitle = method_getTitle
DCWorkflowDefinition
.
getDescription
=
method_getDescription
DCWorkflowDefinition
.
isManagerBypass
=
lambda
self
:
self
.
manager_bypass
DCWorkflowDefinition
.
getSourceValue
=
DCWorkflowDefinition_getSourceValue
DCWorkflowDefinition
.
notifyWorkflowMethod
=
ERP5Workflow
.
notifyWorkflowMethod
.
im_func
DCWorkflowDefinition
.
notifyBefore
=
ERP5Workflow
.
notifyBefore
.
im_func
DCWorkflowDefinition
.
notifySuccess
=
ERP5Workflow
.
notifySuccess
.
im_func
DCWorkflowDefinition
.
notifyWorkflowMethod
=
ERP5Workflow
.
notifyWorkflowMethod
.
__func__
DCWorkflowDefinition
.
notifyBefore
=
ERP5Workflow
.
notifyBefore
.
__func__
DCWorkflowDefinition
.
notifySuccess
=
ERP5Workflow
.
notifySuccess
.
__func__
DCWorkflowDefinition
.
getVariableValueDict
=
DCWorkflowDefinition_getVariableValueDict
DCWorkflowDefinition
.
getVariableValueByReference
=
DCWorkflowDefinition_getVariableValueByReference
DCWorkflowDefinition
.
getStateValueByReference
=
DCWorkflowDefinition_getStateValueByReference
...
...
product/ERP5Type/tests/ProcessingNodeTestCase.py
View file @
d1a6a688
...
...
@@ -75,7 +75,7 @@ def patchActivityTool():
def
__init__
(
self
,
ob
):
self
.
_ob
=
ob
def
__getattr__
(
self
,
attr
):
m
=
getattr
(
self
.
_ob
,
attr
).
im_func
m
=
getattr
(
self
.
_ob
,
attr
).
__func__
return
lambda
*
args
,
**
kw
:
m
(
self
,
*
args
,
**
kw
)
@
patch
def
manage_setDistributingNode
(
self
,
distributingNode
,
REQUEST
=
None
):
...
...
product/ERP5Type/tests/Python3StyleTest.py
View file @
d1a6a688
...
...
@@ -87,6 +87,9 @@ class Python3StyleTest(ERP5TypeTestCase):
def
test_importFixApplied
(
self
):
self
.
_testFixer
(
'import'
)
def
test_methodattrsFixApplied
(
self
):
self
.
_testFixer
(
'methodattrs'
)
def
test_numliteralsFixApplied
(
self
):
self
.
_testFixer
(
'numliterals'
)
...
...
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