File: utils.py

package info (click to toggle)
python-jsonschema-path 0.3.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 320 kB
  • sloc: python: 950; makefile: 3
file content (8 lines) | stat: -rw-r--r-- 247 bytes parent folder | download
1
2
3
4
5
6
7
8
from typing import Any
from typing import Hashable
from typing import Mapping
from typing import Optional


def is_ref(item: Optional[Mapping[Hashable, Any]]) -> bool:
    return isinstance(item, dict) and "$ref" in item and item["$ref"].__hash__