robotcode-core 0.96.0__tar.gz → 0.97.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.96.0 → robotcode_core-0.97.0}/PKG-INFO +1 -2
  2. robotcode_core-0.97.0/src/robotcode/core/__version__.py +1 -0
  3. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/lsp/types.py +12 -0
  4. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/utils/path.py +11 -0
  5. robotcode_core-0.96.0/src/robotcode/core/__version__.py +0 -1
  6. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/.gitignore +0 -0
  7. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/LICENSE.txt +0 -0
  8. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/README.md +0 -0
  9. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/pyproject.toml +0 -0
  10. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/__init__.py +0 -0
  11. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/async_tools.py +0 -0
  12. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/concurrent.py +0 -0
  13. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/documents_manager.py +0 -0
  14. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/event.py +0 -0
  15. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/filewatcher.py +0 -0
  16. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/ignore_spec.py +0 -0
  17. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/language.py +0 -0
  18. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/lsp/__init__.py +0 -0
  19. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/py.typed +0 -0
  20. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/text_document.py +0 -0
  21. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/types.py +0 -0
  22. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/uri.py +0 -0
  23. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/utils/__init__.py +0 -0
  24. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/utils/caching.py +0 -0
  25. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/utils/cli.py +0 -0
  26. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/utils/dataclasses.py +0 -0
  27. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/utils/debugpy.py +0 -0
  28. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/utils/glob_path.py +0 -0
  29. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/utils/inspect.py +0 -0
  30. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/utils/logging.py +0 -0
  31. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/utils/net.py +0 -0
  32. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/utils/process.py +0 -0
  33. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/utils/safe_eval.py +0 -0
  34. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/utils/version.py +0 -0
  35. {robotcode_core-0.96.0 → robotcode_core-0.97.0}/src/robotcode/core/workspace.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: robotcode-core
3
- Version: 0.96.0
3
+ Version: 0.97.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
@@ -10,7 +10,6 @@ Project-URL: Issues, https://github.com/robotcodedev/robotcode/issues
10
10
  Project-URL: Source, https://github.com/robotcodedev/robotcode
11
11
  Author-email: Daniel Biehl <dbiehl@live.de>
12
12
  License: Apache-2.0
13
- License-File: LICENSE.txt
14
13
  Classifier: Development Status :: 5 - Production/Stable
15
14
  Classifier: Framework :: Robot Framework
16
15
  Classifier: Framework :: Robot Framework :: Tool
@@ -0,0 +1 @@
1
+ __version__ = "0.97.0"
@@ -3988,6 +3988,18 @@ class Range(CamelSnakeMixin):
3988
3988
  def __hash__(self) -> int:
3989
3989
  return hash((self.start, self.end))
3990
3990
 
3991
+ @staticmethod
3992
+ def from_int_range(
3993
+ start_line: int, start_character: int = 0, end_line: Optional[int] = None, end_character: Optional[int] = None
3994
+ ) -> Range:
3995
+ return Range(
3996
+ start=Position(line=start_line, character=start_character),
3997
+ end=Position(
3998
+ line=end_line if end_line is not None else start_line,
3999
+ character=end_character if end_character is not None else start_character,
4000
+ ),
4001
+ )
4002
+
3991
4003
 
3992
4004
  @dataclass
3993
4005
  class WorkspaceFoldersChangeEvent(CamelSnakeMixin):
@@ -16,6 +16,17 @@ def path_is_relative_to(
16
16
  return False
17
17
 
18
18
 
19
+ def try_get_relative_path(
20
+ path: Union[str, "os.PathLike[str]"], other_path: Union[str, "os.PathLike[str]", None]
21
+ ) -> Path:
22
+ if other_path is None:
23
+ return Path(path)
24
+ try:
25
+ return Path(path).relative_to(other_path)
26
+ except ValueError:
27
+ return Path(path)
28
+
29
+
19
30
  _RE_DRIVE_LETTER_PATH = re.compile(r"^[a-zA-Z]:")
20
31
 
21
32
 
@@ -1 +0,0 @@
1
- __version__ = "0.96.0"