Skip to content

Commit

Permalink
updating types
Browse files Browse the repository at this point in the history
  • Loading branch information
antonymayi committed May 27, 2022
1 parent f9c3af4 commit 0e903cc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions forml/io/dsl/_struct/__init__.py
Expand Up @@ -24,16 +24,16 @@
from . import kind as kindmod

if typing.TYPE_CHECKING:
from forml.io import layout
from forml.io import dsl, layout


class Field(typing.NamedTuple):
"""Schema field class."""

kind: kindmod.Any
kind: 'dsl.Any'
name: typing.Optional[str] = None

def renamed(self, name: typing.Optional[str]) -> 'Field':
def renamed(self, name: typing.Optional[str]) -> 'dsl.Field':
"""Return copy of the field with the new name.
Args:
Expand All @@ -53,7 +53,7 @@ class Schema(metaclass=frame.Table): # pylint: disable=invalid-metaclass
"""

@staticmethod
def from_fields(*fields: Field, title: typing.Optional[str] = None) -> frame.Source.Schema:
def from_fields(*fields: 'dsl.Field', title: typing.Optional[str] = None) -> 'dsl.Source.Schema':
"""Utility for programmatic schema assembly.
Args:
Expand All @@ -68,7 +68,7 @@ def from_fields(*fields: Field, title: typing.Optional[str] = None) -> frame.Sou
@classmethod
def from_record(
cls, record: 'layout.Native', *names: str, title: typing.Optional[str] = None
) -> frame.Source.Schema:
) -> 'dsl.Source.Schema':
"""Utility for programmatic schema inference.
Args:
Expand Down

0 comments on commit 0e903cc

Please sign in to comment.