robotcode-core 0.95.2__tar.gz → 0.96.0__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.
Files changed (35) hide show
  1. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/PKG-INFO +1 -1
  2. robotcode_core-0.96.0/src/robotcode/core/__version__.py +1 -0
  3. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/documents_manager.py +1 -1
  4. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/event.py +2 -0
  5. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/ignore_spec.py +4 -4
  6. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/workspace.py +9 -3
  7. robotcode_core-0.95.2/src/robotcode/core/__version__.py +0 -1
  8. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/.gitignore +0 -0
  9. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/LICENSE.txt +0 -0
  10. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/README.md +0 -0
  11. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/pyproject.toml +0 -0
  12. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/__init__.py +0 -0
  13. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/async_tools.py +0 -0
  14. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/concurrent.py +0 -0
  15. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/filewatcher.py +0 -0
  16. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/language.py +0 -0
  17. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/lsp/__init__.py +0 -0
  18. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/lsp/types.py +0 -0
  19. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/py.typed +0 -0
  20. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/text_document.py +0 -0
  21. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/types.py +0 -0
  22. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/uri.py +0 -0
  23. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/utils/__init__.py +0 -0
  24. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/utils/caching.py +0 -0
  25. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/utils/cli.py +0 -0
  26. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/utils/dataclasses.py +0 -0
  27. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/utils/debugpy.py +0 -0
  28. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/utils/glob_path.py +0 -0
  29. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/utils/inspect.py +0 -0
  30. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/utils/logging.py +0 -0
  31. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/utils/net.py +0 -0
  32. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/utils/path.py +0 -0
  33. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/utils/process.py +0 -0
  34. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/utils/safe_eval.py +0 -0
  35. {robotcode_core-0.95.2 → robotcode_core-0.96.0}/src/robotcode/core/utils/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: robotcode-core
3
- Version: 0.95.2
3
+ Version: 0.96.0
4
4
  Summary: Some core classes for RobotCode
5
5
  Project-URL: Homepage, https://robotcode.io
6
6
  Project-URL: Donate, https://opencollective.com/robotcode
@@ -0,0 +1 @@
1
+ __version__ = "0.96.0"
@@ -28,7 +28,7 @@ class CantReadDocumentError(Exception):
28
28
  class DocumentsManager:
29
29
  _logger: Final = LoggingDescriptor()
30
30
 
31
- def __init__(self, languages: List[LanguageDefinition]) -> None:
31
+ def __init__(self, languages: List[LanguageDefinition] = []) -> None:
32
32
  self.languages = languages
33
33
 
34
34
  self._documents: Dict[DocumentUri, TextDocument] = {}
@@ -83,6 +83,8 @@ class EventResultIteratorBase(Generic[_TParams, _TResult]):
83
83
  ):
84
84
  try:
85
85
  yield method(*__args, **__kwargs)
86
+ except (SystemExit, KeyboardInterrupt):
87
+ raise
86
88
  except BaseException as e:
87
89
  if return_exceptions:
88
90
  yield e
@@ -19,7 +19,7 @@ class _HelperCache:
19
19
  raise NotImplementedError
20
20
 
21
21
 
22
- class _IgnoreRule(NamedTuple):
22
+ class IgnoreRule(NamedTuple):
23
23
  pattern: str
24
24
  regex: "re.Pattern[str]"
25
25
  negation: bool
@@ -75,7 +75,7 @@ class _IgnoreRule(NamedTuple):
75
75
 
76
76
 
77
77
  class IgnoreSpec(_HelperCache):
78
- def __init__(self, rules: Reversible[_IgnoreRule]):
78
+ def __init__(self, rules: Reversible[IgnoreRule]):
79
79
  self.rules = rules
80
80
  self.negation = any(r.negation for r in rules)
81
81
 
@@ -141,7 +141,7 @@ class IgnoreSpec(_HelperCache):
141
141
  @classmethod
142
142
  def _rule_from_pattern(
143
143
  cls, pattern: str, base_path: PurePath, source: Optional[Tuple[str, int]] = None
144
- ) -> Optional[_IgnoreRule]:
144
+ ) -> Optional[IgnoreRule]:
145
145
 
146
146
  orig_pattern = pattern
147
147
 
@@ -189,7 +189,7 @@ class IgnoreSpec(_HelperCache):
189
189
  i = i - 1
190
190
  regex = cls._fnmatch_pathname_to_regex(pattern, directory_only, negation, anchored=bool(anchored))
191
191
 
192
- return _IgnoreRule(
192
+ return IgnoreRule(
193
193
  pattern=orig_pattern,
194
194
  regex=re.compile(regex),
195
195
  negation=negation,
@@ -1,3 +1,4 @@
1
+ import functools
1
2
  import threading
2
3
  from typing import (
3
4
  Any,
@@ -11,9 +12,10 @@ from typing import (
11
12
  Union,
12
13
  )
13
14
 
14
- from robotcode.core.uri import Uri
15
- from robotcode.core.utils.dataclasses import CamelSnakeMixin, from_dict
16
- from robotcode.core.utils.path import path_is_relative_to
15
+ from .documents_manager import DocumentsManager
16
+ from .uri import Uri
17
+ from .utils.dataclasses import CamelSnakeMixin, from_dict
18
+ from .utils.path import path_is_relative_to
17
19
 
18
20
 
19
21
  class WorkspaceFolder:
@@ -98,3 +100,7 @@ class Workspace:
98
100
  return result[0]
99
101
 
100
102
  return None
103
+
104
+ @functools.cached_property
105
+ def documents(self) -> DocumentsManager:
106
+ return DocumentsManager()
@@ -1 +0,0 @@
1
- __version__ = "0.95.2"