robotcode-core 2.3.1__tar.gz → 2.5.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 (34) hide show
  1. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/.gitignore +5 -1
  2. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/PKG-INFO +1 -1
  3. robotcode_core-2.5.0/src/robotcode/core/__version__.py +1 -0
  4. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/utils/path.py +23 -1
  5. robotcode_core-2.3.1/src/robotcode/core/__version__.py +0 -1
  6. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/README.md +0 -0
  7. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/pyproject.toml +0 -0
  8. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/__init__.py +0 -0
  9. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/async_tools.py +0 -0
  10. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/concurrent.py +0 -0
  11. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/documents_manager.py +0 -0
  12. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/event.py +0 -0
  13. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/filewatcher.py +0 -0
  14. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/ignore_spec.py +0 -0
  15. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/language.py +0 -0
  16. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/lsp/__init__.py +0 -0
  17. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/lsp/types.py +0 -0
  18. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/py.typed +0 -0
  19. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/text_document.py +0 -0
  20. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/types.py +0 -0
  21. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/uri.py +0 -0
  22. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/utils/__init__.py +0 -0
  23. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/utils/caching.py +0 -0
  24. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/utils/cli.py +0 -0
  25. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/utils/dataclasses.py +0 -0
  26. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/utils/debugpy.py +0 -0
  27. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/utils/glob_path.py +0 -0
  28. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/utils/inspect.py +0 -0
  29. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/utils/logging.py +0 -0
  30. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/utils/net.py +0 -0
  31. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/utils/process.py +0 -0
  32. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/utils/safe_eval.py +0 -0
  33. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/utils/version.py +0 -0
  34. {robotcode_core-2.3.1 → robotcode_core-2.5.0}/src/robotcode/core/workspace.py +0 -0
@@ -334,4 +334,8 @@ bundled/libs
334
334
  results/
335
335
 
336
336
  # kilocode
337
- .kilocode/
337
+ .kilocode/
338
+
339
+ # .agents
340
+ .agents/
341
+ skills-lock.json
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: robotcode-core
3
- Version: 2.3.1
3
+ Version: 2.5.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__ = "2.5.0"
@@ -2,7 +2,7 @@ import os
2
2
  import re
3
3
  import sys
4
4
  from pathlib import Path
5
- from typing import Any, Union
5
+ from typing import Any, Optional, Tuple, Union
6
6
 
7
7
 
8
8
  def path_is_relative_to(
@@ -61,8 +61,30 @@ def normalized_path_full(path: Union[str, "os.PathLike[str]"]) -> Path:
61
61
  return Path(*parents)
62
62
 
63
63
 
64
+ FileId = Tuple[int, int]
65
+
66
+
67
+ def file_id(path: Union[str, "os.PathLike[str]", Path]) -> Optional[FileId]:
68
+ """Return the (st_dev, st_ino) tuple for *path*, or ``None`` on error."""
69
+ try:
70
+ st = os.stat(path)
71
+ return (st.st_dev, st.st_ino)
72
+ except OSError:
73
+ return None
74
+
75
+
64
76
  def same_file(path1: Union[str, "os.PathLike[str]", Path], path2: Union[str, "os.PathLike[str]", Path]) -> bool:
65
77
  try:
66
78
  return os.path.samefile(path1, path2)
67
79
  except OSError:
68
80
  return False
81
+
82
+
83
+ def same_file_id(
84
+ id1: Optional[FileId],
85
+ id2: Optional[FileId],
86
+ ) -> bool:
87
+ """Compare two :func:`file_id` values. ``None`` never matches anything."""
88
+ if id1 is None or id2 is None:
89
+ return False
90
+ return id1 == id2
@@ -1 +0,0 @@
1
- __version__ = "2.3.1"
File without changes