Skip to content

Commit

Permalink
fix weakref type
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 committed Jul 1, 2023
1 parent f74de81 commit c3f669d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/ome_types/_mixins/_reference.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
from typing import TYPE_CHECKING, Any, Optional
import weakref
from typing import Any, Optional

from ._base_type import OMEType

if TYPE_CHECKING:
import weakref


class ReferenceMixin(OMEType):
_ref: Optional["weakref.ReferenceType[OMEType]"] = None
_ref: Optional[weakref.ReferenceType] = None

@property
def ref(self) -> "OMEType | None":
Expand Down
2 changes: 2 additions & 0 deletions tests/test_names.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import json
from pathlib import Path
from typing import Any, Sequence
Expand Down

0 comments on commit c3f669d

Please sign in to comment.