Skip to content

Commit

Permalink
more type fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 committed Jul 1, 2023
1 parent 30cd47d commit 7403cad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ome_types/_mixins/_bin_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class BinDataMixin(OMEType):
@root_validator(pre=True)
def _v(cls, values: dict) -> dict[str, Any]:
def _v(cls, values: dict) -> "dict[str, Any]":
# This catches the case of <BinData Length="0"/>, where the parser may have
# omitted value from the dict, and sets value to b""
# seems like it could be done in a default_factory, but that would
Expand Down
4 changes: 2 additions & 2 deletions src/ome_types/_mixins/_reference.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import TYPE_CHECKING, Any, Dict, Optional
from typing import TYPE_CHECKING, Any, Optional

from ._base_type import OMEType

Expand All @@ -15,7 +15,7 @@ def ref(self) -> "OMEType | None":
raise ValueError("references not yet resolved on root OME object")
return self._ref()

def __getstate__(self: Any) -> Dict[str, Any]:
def __getstate__(self: Any) -> "dict[str, Any]":
"""Support pickle of our weakref references."""
state = super().__getstate__()
state["__private_attribute_values__"].pop("_ref", None)
Expand Down

0 comments on commit 7403cad

Please sign in to comment.