X7ROOT File Manager
Current Path:
/opt/hc_python/lib/python3.12/site-packages/sentry_sdk
opt
/
hc_python
/
lib
/
python3.12
/
site-packages
/
sentry_sdk
/
📁
..
📄
__init__.py
(1.19 KB)
📁
__pycache__
📄
_compat.py
(3.04 KB)
📄
_init_implementation.py
(2.5 KB)
📄
_log_batcher.py
(4.97 KB)
📄
_lru_cache.py
(1.2 KB)
📄
_queue.py
(10.99 KB)
📄
_types.py
(10.22 KB)
📄
_werkzeug.py
(3.65 KB)
📁
ai
📄
api.py
(11.59 KB)
📄
attachments.py
(3.04 KB)
📄
client.py
(37.14 KB)
📄
consts.py
(39.68 KB)
📁
crons
📄
debug.py
(1019 B)
📄
envelope.py
(10.11 KB)
📄
feature_flags.py
(2.18 KB)
📄
hub.py
(25.07 KB)
📁
integrations
📄
logger.py
(1.62 KB)
📄
metrics.py
(29.21 KB)
📄
monitor.py
(3.62 KB)
📁
profiler
📄
py.typed
(0 B)
📄
scope.py
(61.85 KB)
📄
scrubber.py
(5.92 KB)
📄
serializer.py
(12.78 KB)
📄
session.py
(5.44 KB)
📄
sessions.py
(8.97 KB)
📄
spotlight.py
(8.47 KB)
📄
tracing.py
(46.99 KB)
📄
tracing_utils.py
(28.14 KB)
📄
transport.py
(31.84 KB)
📄
types.py
(1.19 KB)
📄
utils.py
(57.98 KB)
📄
worker.py
(4.36 KB)
Editing: _lru_cache.py
from typing import TYPE_CHECKING if TYPE_CHECKING: from typing import Any _SENTINEL = object() class LRUCache: def __init__(self, max_size): # type: (int) -> None if max_size <= 0: raise AssertionError(f"invalid max_size: {max_size}") self.max_size = max_size self._data = {} # type: dict[Any, Any] self.hits = self.misses = 0 self.full = False def set(self, key, value): # type: (Any, Any) -> None current = self._data.pop(key, _SENTINEL) if current is not _SENTINEL: self._data[key] = value elif self.full: self._data.pop(next(iter(self._data))) self._data[key] = value else: self._data[key] = value self.full = len(self._data) >= self.max_size def get(self, key, default=None): # type: (Any, Any) -> Any try: ret = self._data.pop(key) except KeyError: self.misses += 1 ret = default else: self.hits += 1 self._data[key] = ret return ret def get_all(self): # type: () -> list[tuple[Any, Any]] return list(self._data.items())
Upload File
Create Folder