Skip to content

Commit

Permalink
fix: Type errors after mypy version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpovel committed Jan 1, 2024
1 parent fdcfc65 commit dcc813d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ancv/data/models/resume.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ class Config:
None, description="Specify career projects"
)
meta: Meta = Field(
Meta(),
Meta(ancv=None, canonical=None, version=None, lastModified=None),
description="The schema version and any other tooling configuration lives here",
)

Expand Down
2 changes: 1 addition & 1 deletion ancv/reflection.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ def strip_prefix(cls, v: Optional[list[str]]) -> Optional[list[str]]:
return [url.split()[-1] for url in v]


METADATA = Metadata(**metadata(PACKAGE).json)
METADATA = Metadata.parse_obj(metadata(PACKAGE).json)
8 changes: 7 additions & 1 deletion ancv/visualization/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,13 @@ def from_model_config(cls, model: ResumeSchema) -> "Template":
"""

if (config := model.meta.config) is None:
config = TemplateConfig()
config = TemplateConfig(
template=None,
theme=None,
language=None,
ascii_only=None,
dec31_as_year=None,
)

if (theme_name := config.theme) is None:
theme_name = "lollipop"
Expand Down

0 comments on commit dcc813d

Please sign in to comment.