Skip to content

Commit

Permalink
Merge pull request #851 from lsst/tickets/DM-39663
Browse files Browse the repository at this point in the history
DM-39663: Use Type rather than type[BaseModel] for protocol
  • Loading branch information
timj committed Jun 14, 2023
2 parents d363fbe + 7a6c4d7 commit a67c57d
Showing 1 changed file with 2 additions and 4 deletions.
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

0 comments on commit a67c57d

Please sign in to comment.