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
d8274477
Commit
d8274477
authored
Nov 19, 2021
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
monaco_editor: jedi wip (no longer use /tmp/)
parent
e6bedb8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
bt5/erp5_monaco_editor/ExtensionTemplateItem/portal_components/extension.erp5.Jedi.py
...sionTemplateItem/portal_components/extension.erp5.Jedi.py
+7
-3
No files found.
bt5/erp5_monaco_editor/ExtensionTemplateItem/portal_components/extension.erp5.Jedi.py
View file @
d8274477
...
...
@@ -21,6 +21,9 @@ import time
import
erp5.portal_type
import
tempfile
STUBS_BASE_PATH
=
os
.
path
.
join
(
tempfile
.
gettempdir
(),
'erp5-stubs'
)
last_reload_time
=
time
.
time
()
# increase default cache duration
...
...
@@ -356,7 +359,7 @@ def ERP5Site_getPythonSourceCodeCompletionList(self, data, REQUEST=None):
data
[
'position'
][
'line'
],
data
[
'position'
][
'column'
]
-
1
,
script_name
,
sys_path
=
[
'/tmp/ahaha/'
]
+
list
(
sys
.
path
),
sys_path
=
[
STUBS_BASE_PATH
]
+
list
(
sys
.
path
),
)
def
_get_param_name
(
p
):
...
...
@@ -763,7 +766,7 @@ def XXX_skins_class_exists(name):
"""Returns true if a skin class exists for this name.
"""
return
os
.
path
.
exists
(
"
/tmp/ahaha/erp5/skins_tool/{name}.pyi"
.
format
(
name
=
name
))
"
{STUBS_BASE_PATH}/erp5/skins_tool/{name}.pyi"
.
format
(
STUBS_BASE_PATH
=
STUBS_BASE_PATH
,
name
=
name
))
def
TypeInformation_getStub
(
self
):
...
...
@@ -1404,7 +1407,8 @@ def ERP5Site_dumpModuleCode(self, component_or_script=None):
f
.
write
(
content
)
portal
=
self
.
getPortalObject
()
module_dir
=
'/tmp/ahaha/erp5/'
# TODO
mkdir_p
(
STUBS_BASE_PATH
)
module_dir
=
os
.
path
.
join
(
STUBS_BASE_PATH
,
'erp5'
)
mkdir_p
(
module_dir
)
# generate erp5/__init__.py
...
...
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