Skip to content

Commit

Permalink
[GHC] Refactor/remove legacy code (#790)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Antony Milne <[email protected]>
  • Loading branch information
3 people authored Oct 7, 2024
1 parent e5a240b commit b07c4c4
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 12 deletions.
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))
-->
3 changes: 2 additions & 1 deletion vizro-core/docs/pages/explanation/authors.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ Natalia Kurakina,
[Rashida Kanchwala](https://github.com/rashidakanchwala),
[Juan Luis Cano Rodríguez](https://github.com/astrojuanlu),
[Anna Xiong](https://github.com/Anna-Xiong),
[Chiara Pullem](https://github.com/chiara-sophie)
[Chiara Pullem](https://github.com/chiara-sophie),
[Sylvie Zhang](https://github.com/sylviezhang37)

with thanks to Sam Bourton and Kevin Staight for sponsorship, inspiration and guidance,

Expand Down
13 changes: 2 additions & 11 deletions vizro-core/src/vizro/models/_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from numpy import ma

try:
from pydantic.v1 import Field, PrivateAttr, ValidationError, validator
from pydantic.v1 import Field, PrivateAttr, validator
except ImportError: # pragma: no cov
from pydantic import Field, PrivateAttr, ValidationError, validator
from pydantic import Field, PrivateAttr, validator

from vizro._constants import EMPTY_SPACE_CONST
from vizro.models import VizroBaseModel
Expand Down Expand Up @@ -223,12 +223,3 @@ def build(self):
id=self.id,
)
return component_container


if __name__ == "__main__":
print(repr(Layout(grid=[[0, 1], [0, 2]]))) # noqa: T201

try:
Layout(grid=[[0, 1], [1, 0]])
except ValidationError as e:
print(e) # noqa: T201

0 comments on commit b07c4c4

Please sign in to comment.