setta 0.0.5.dev3__py3-none-any.whl → 0.0.6.dev0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- setta/__init__.py +1 -1
- setta/lsp/writer.py +9 -9
- setta/static/frontend/assets/{index-a780ff4e.js → index-105d4b9e.js} +2 -2
- setta/static/frontend/assets/index-a5bd0f52.css +32 -0
- setta/static/frontend/index.html +2 -2
- setta-0.0.6.dev0.dist-info/METADATA +176 -0
- {setta-0.0.5.dev3.dist-info → setta-0.0.6.dev0.dist-info}/RECORD +11 -11
- setta/static/frontend/assets/index-cc7772be.css +0 -32
- setta-0.0.5.dev3.dist-info/METADATA +0 -105
- {setta-0.0.5.dev3.dist-info → setta-0.0.6.dev0.dist-info}/LICENSE +0 -0
- {setta-0.0.5.dev3.dist-info → setta-0.0.6.dev0.dist-info}/WHEEL +0 -0
- {setta-0.0.5.dev3.dist-info → setta-0.0.6.dev0.dist-info}/entry_points.txt +0 -0
- {setta-0.0.5.dev3.dist-info → setta-0.0.6.dev0.dist-info}/top_level.txt +0 -0
setta/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "0.0.
|
1
|
+
__version__ = "0.0.6.dev0"
|
setta/lsp/writer.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
import asyncio
|
2
2
|
import json
|
3
3
|
import logging
|
4
|
-
import platform
|
5
4
|
import uuid
|
6
5
|
|
7
6
|
from setta.utils.utils import recursive_dict_merge
|
@@ -268,18 +267,19 @@ class LanguageServerWriter(LanguageServerInteractor):
|
|
268
267
|
asyncio.create_task(async_task)
|
269
268
|
|
270
269
|
def get_workspace_uri(self):
|
271
|
-
return
|
270
|
+
return self.workspace_folder.as_uri()
|
272
271
|
|
273
|
-
def
|
272
|
+
def get_code_id_path(self, code_id):
|
274
273
|
return self.code_folder / f"{code_id}.py"
|
275
274
|
|
275
|
+
def get_base_uri(self, code_id):
|
276
|
+
return self.get_code_id_path(code_id).as_uri()
|
277
|
+
|
276
278
|
# https://github.com/microsoft/language-server-protocol/issues/1676
|
277
279
|
def get_uri(self, code_id, virtual):
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
if platform.system() == "Windows":
|
282
|
-
uri += "/" # need trailing slash on Windows for some reason
|
280
|
+
uri = self.get_base_uri(code_id)
|
281
|
+
if virtual:
|
282
|
+
uri = uri.replace("file://", "untitled:", 1)
|
283
283
|
return uri
|
284
284
|
|
285
285
|
def get_is_virtual(self, virtual):
|
@@ -288,7 +288,7 @@ class LanguageServerWriter(LanguageServerInteractor):
|
|
288
288
|
def create_temp_file(self, code_id, code):
|
289
289
|
"""Create a temporary file for the given code and return its path."""
|
290
290
|
# Create all necessary parent directories
|
291
|
-
file_path = self.
|
291
|
+
file_path = self.get_code_id_path(code_id)
|
292
292
|
logger.debug(f"Creating temporary file {file_path}")
|
293
293
|
file_path.parent.mkdir(parents=True, exist_ok=True)
|
294
294
|
|