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
Carlos Ramos Carreño
erp5
Commits
233f67f6
Commit
233f67f6
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
6389af5a
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 @
233f67f6
...
...
@@ -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