Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-39663: Use Type rather than type[BaseModel] for protocol #851

Merged
merged 1 commit into from
Jun 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions python/lsst/daf/butler/core/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,15 @@
__all__ = ("to_json_generic", "from_json_generic", "to_json_pydantic", "from_json_pydantic")

import json
from typing import TYPE_CHECKING, Any, Protocol
from typing import TYPE_CHECKING, Any, Protocol, Type

if TYPE_CHECKING:
from pydantic import BaseModel

from ..registry import Registry
from .dimensions import DimensionUniverse


class SupportsSimple(Protocol):
_serializedType: type[BaseModel]
_serializedType: Type

def to_simple(self, minimal: bool) -> Any:
...
Expand Down