Skip to content

Commit

Permalink
Add more type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
beregond committed Oct 14, 2022
1 parent eb30cba commit a6b85ef
Show file tree
Hide file tree
Showing 9 changed files with 165 additions and 153 deletions.
4 changes: 2 additions & 2 deletions jsonmodels/builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from collections import defaultdict

from . import errors
from .fields import NotSet
from .fields import Value, NotSet


class Builder:
Expand Down Expand Up @@ -41,7 +41,7 @@ def count_type(self, type):
return self.types_count[type]

@staticmethod
def maybe_build(value):
def maybe_build(value: Value) -> dict[str, Value] | Value:
return value.build() if isinstance(value, Builder) else value

def add_definition(self, builder):
Expand Down
Loading

0 comments on commit a6b85ef

Please sign in to comment.