robotcode-core 0.99.0__tar.gz → 0.100.1__tar.gz
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.
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/PKG-INFO +1 -1
- robotcode_core-0.100.1/src/robotcode/core/__version__.py +1 -0
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/concurrent.py +4 -6
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/event.py +1 -1
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/ignore_spec.py +0 -1
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/uri.py +0 -1
- robotcode_core-0.100.1/src/robotcode/core/utils/contextlib.py +44 -0
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/utils/dataclasses.py +6 -5
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/utils/glob_path.py +2 -2
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/utils/logging.py +1 -1
- robotcode_core-0.99.0/src/robotcode/core/__version__.py +0 -1
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/.gitignore +0 -0
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/LICENSE.txt +0 -0
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/README.md +0 -0
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/pyproject.toml +0 -0
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/__init__.py +0 -0
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/async_tools.py +0 -0
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/documents_manager.py +0 -0
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/filewatcher.py +0 -0
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/language.py +0 -0
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/lsp/__init__.py +0 -0
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/lsp/types.py +0 -0
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/py.typed +0 -0
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/text_document.py +0 -0
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/types.py +0 -0
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/utils/__init__.py +0 -0
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/utils/caching.py +0 -0
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/utils/cli.py +0 -0
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/utils/debugpy.py +0 -0
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/utils/inspect.py +0 -0
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/utils/net.py +0 -0
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/utils/path.py +0 -0
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/utils/process.py +0 -0
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/utils/safe_eval.py +0 -0
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/utils/version.py +0 -0
- {robotcode_core-0.99.0 → robotcode_core-0.100.1}/src/robotcode/core/workspace.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.100.1"
|
|
@@ -145,10 +145,8 @@ def threaded_task(__func: _F = None, *, enabled: bool = True) -> Callable[[_F],
|
|
|
145
145
|
|
|
146
146
|
|
|
147
147
|
def is_threaded_callable(callable: Callable[..., Any]) -> bool:
|
|
148
|
-
return (
|
|
149
|
-
getattr(callable, __THREADED_MARKER, False)
|
|
150
|
-
or inspect.ismethod(callable)
|
|
151
|
-
and getattr(callable, __THREADED_MARKER, False)
|
|
148
|
+
return getattr(callable, __THREADED_MARKER, False) or (
|
|
149
|
+
inspect.ismethod(callable) and getattr(callable, __THREADED_MARKER, False)
|
|
152
150
|
)
|
|
153
151
|
|
|
154
152
|
|
|
@@ -251,8 +249,8 @@ def run_as_debugpy_hidden_task(callable: Callable[_P, _TResult], *args: _P.args,
|
|
|
251
249
|
hide = hidden_tasks == "0"
|
|
252
250
|
|
|
253
251
|
if hide:
|
|
254
|
-
thread
|
|
255
|
-
thread
|
|
252
|
+
setattr(thread, "pydev_do_not_trace", True)
|
|
253
|
+
setattr(thread, "is_pydev_daemon_thread", True)
|
|
256
254
|
|
|
257
255
|
thread.start()
|
|
258
256
|
|
|
@@ -142,7 +142,6 @@ class IgnoreSpec(_HelperCache):
|
|
|
142
142
|
def _rule_from_pattern(
|
|
143
143
|
cls, pattern: str, base_path: PurePath, source: Optional[Tuple[str, int]] = None
|
|
144
144
|
) -> Optional[IgnoreRule]:
|
|
145
|
-
|
|
146
145
|
orig_pattern = pattern
|
|
147
146
|
|
|
148
147
|
if pattern.strip() == "" or pattern[0] == "#":
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from contextlib import AbstractContextManager
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
from typing import Any, Callable, List, Literal, Optional, Union
|
|
5
|
+
|
|
6
|
+
from .path import same_file
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ChDir(AbstractContextManager[Any]):
|
|
10
|
+
def __init__(
|
|
11
|
+
self, path: "Union[str, os.PathLike[str], None]", verbose_callback: Optional[Callable[[str], None]] = None
|
|
12
|
+
) -> None:
|
|
13
|
+
self.path = path
|
|
14
|
+
self._old_cwd: List[Optional[Path]] = []
|
|
15
|
+
self._verbose_callback = verbose_callback
|
|
16
|
+
|
|
17
|
+
def __enter__(self) -> Optional[Path]:
|
|
18
|
+
result = Path.cwd()
|
|
19
|
+
|
|
20
|
+
if self.path is None or (self._old_cwd and same_file(self.path, Path.cwd())):
|
|
21
|
+
self._old_cwd.append(None)
|
|
22
|
+
else:
|
|
23
|
+
self._old_cwd.append(result)
|
|
24
|
+
|
|
25
|
+
if self.path:
|
|
26
|
+
if self._verbose_callback:
|
|
27
|
+
self._verbose_callback(f"Changing directory to {self.path}")
|
|
28
|
+
|
|
29
|
+
os.chdir(self.path)
|
|
30
|
+
|
|
31
|
+
return result
|
|
32
|
+
|
|
33
|
+
def __exit__(self, _exc_type: Any, _exc_value: Any, _traceback: Any) -> Literal[False]:
|
|
34
|
+
old_path = self._old_cwd.pop()
|
|
35
|
+
if old_path is not None:
|
|
36
|
+
if self._verbose_callback:
|
|
37
|
+
self._verbose_callback(f"Changing directory back to {old_path}")
|
|
38
|
+
|
|
39
|
+
os.chdir(old_path)
|
|
40
|
+
|
|
41
|
+
return False
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
chdir = ChDir
|
|
@@ -28,14 +28,14 @@ from typing import (
|
|
|
28
28
|
)
|
|
29
29
|
|
|
30
30
|
__all__ = [
|
|
31
|
-
"
|
|
32
|
-
"
|
|
31
|
+
"CamelSnakeMixin",
|
|
32
|
+
"ValidateMixin",
|
|
33
|
+
"as_dict",
|
|
33
34
|
"as_json",
|
|
34
35
|
"from_dict",
|
|
35
36
|
"from_json",
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"CamelSnakeMixin",
|
|
37
|
+
"to_camel_case",
|
|
38
|
+
"to_snake_case",
|
|
39
39
|
]
|
|
40
40
|
|
|
41
41
|
_RE_SNAKE_CASE_1 = re.compile(r"[\-\.\s]")
|
|
@@ -190,6 +190,7 @@ def as_json(obj: Any, indent: Optional[bool] = None, compact: Optional[bool] = N
|
|
|
190
190
|
default=_default,
|
|
191
191
|
indent=4 if indent else None,
|
|
192
192
|
separators=(",", ":") if compact else None,
|
|
193
|
+
ensure_ascii=False,
|
|
193
194
|
)
|
|
194
195
|
|
|
195
196
|
|
|
@@ -164,7 +164,7 @@ def _iter_files_recursive_re(
|
|
|
164
164
|
relative_path = (path / f.name).relative_to(_base_path)
|
|
165
165
|
|
|
166
166
|
if not ignore_patterns or not any(
|
|
167
|
-
p.matches(relative_path) and (not p.only_dirs or p.only_dirs and f.is_dir())
|
|
167
|
+
p.matches(relative_path) and (not p.only_dirs or (p.only_dirs and f.is_dir()))
|
|
168
168
|
for p in cast(Iterable[Pattern], ignore_patterns)
|
|
169
169
|
):
|
|
170
170
|
if f.is_dir():
|
|
@@ -177,7 +177,7 @@ def _iter_files_recursive_re(
|
|
|
177
177
|
_base_path=_base_path,
|
|
178
178
|
)
|
|
179
179
|
if not patterns or any(
|
|
180
|
-
p.matches(relative_path) and (not p.only_dirs or p.only_dirs and f.is_dir())
|
|
180
|
+
p.matches(relative_path) and (not p.only_dirs or (p.only_dirs and f.is_dir()))
|
|
181
181
|
for p in cast(Iterable[Pattern], patterns)
|
|
182
182
|
):
|
|
183
183
|
yield Path(f).absolute() if absolute else Path(f)
|
|
@@ -196,7 +196,7 @@ class LoggingDescriptor:
|
|
|
196
196
|
extra: Optional[Mapping[str, object]] = None,
|
|
197
197
|
**kwargs: Any,
|
|
198
198
|
) -> None:
|
|
199
|
-
if self.is_enabled_for(level) and condition is not None and condition() or condition is None:
|
|
199
|
+
if (self.is_enabled_for(level) and condition is not None and condition()) or condition is None:
|
|
200
200
|
depth = 0
|
|
201
201
|
if context_name is not None:
|
|
202
202
|
depth = self._measure_contexts.get(context_name, 0)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.99.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|