33import pathlib
44import typing
55
6- from maison import types
6+ from maison import typedefs
77
88
99class Parser (typing .Protocol ):
1010 """Defines the interface for a parser used to parse a config file."""
1111
12- def parse_config (self , file_path : pathlib .Path ) -> types .ConfigValues :
12+ def parse_config (self , file_path : pathlib .Path ) -> typedefs .ConfigValues :
1313 """Parses a config file.
1414
1515 Args:
@@ -24,7 +24,7 @@ def parse_config(self, file_path: pathlib.Path) -> types.ConfigValues:
2424class IsSchema (typing .Protocol ):
2525 """Protocol for config schemas."""
2626
27- def model_dump (self ) -> types .ConfigValues :
27+ def model_dump (self ) -> typedefs .ConfigValues :
2828 """Convert the validated config to a dict."""
2929 ...
3030
@@ -49,7 +49,7 @@ def get_file_path(
4949class ConfigParser (typing .Protocol ):
5050 """Defines the interface for a class that parses a config."""
5151
52- def parse_config (self , file_path : pathlib .Path ) -> types .ConfigValues :
52+ def parse_config (self , file_path : pathlib .Path ) -> typedefs .ConfigValues :
5353 """Parse a config.
5454
5555 Args:
@@ -65,8 +65,8 @@ class Validator(typing.Protocol):
6565 """Defines the interface for a class that validates some config values."""
6666
6767 def validate (
68- self , values : types .ConfigValues , schema : type [IsSchema ]
69- ) -> types .ConfigValues :
68+ self , values : typedefs .ConfigValues , schema : type [IsSchema ]
69+ ) -> typedefs .ConfigValues :
7070 """Validate a config.
7171
7272 Args:
0 commit comments