Skip to content

Commit

Permalink
Fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
huong-li-nguyen committed Jan 2, 2024
1 parent d2552dc commit bde9e0d
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!--
A new scriv changelog fragment.
Uncomment the section that is right (remove the HTML comment wrapper).
-->

<!--
### Highlights ✨
- A bullet item for the Highlights ✨ category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Removed
- A bullet item for the Removed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Added
- A bullet item for the Added category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Changed
- A bullet item for the Changed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Deprecated
- A bullet item for the Deprecated category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Fixed
- A bullet item for the Fixed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Security
- A bullet item for the Security category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
2 changes: 1 addition & 1 deletion vizro-core/src/vizro/models/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def _is_discriminated_union(field):
new_annotation = _add_to_discriminated_union(field.outer_type_)
elif sub_field is not None and _is_discriminated_union(sub_field):
# Field is a list of discriminated union e.g. components: List[ComponentType].
new_annotation = List[_add_to_discriminated_union(sub_field.outer_type_)] # type: ignore[misc,index]
new_annotation = List[_add_to_discriminated_union(sub_field.outer_type_)] # type: ignore[misc]
else:
raise ValueError(
f"Field '{field_name}' must be a discriminated union or list of discriminated union type. "
Expand Down

0 comments on commit bde9e0d

Please sign in to comment.