-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Improve linting/editor experience for hera models. (#950)
**Pull Request Checklist** - [ ] Fixes #<!--issue number goes here--> - [ ] Tests added - [ ] Documentation/examples added - [ ] [Good commit messages](https://cbea.ms/git-commit/) and/or PR title **Description of PR** Today, hera models seem to receive no editor/linter support for the `__init__` arguments of hera models. This **seems** to be solely from the necessary try/except imports used to support both pydantic v1 and v2. Both mypy and pyright will bail on and not yield useful types when you do this. But it can be hacked around with some **more** conditionals imports 😅 Today: <img width="1219" alt="Screenshot 2024-01-31 at 2 19 19 PM" src="https://github.com/argoproj-labs/hera/assets/701548/6bcddeab-58c3-4205-836b-58ec24c23f03"> <img width="367" alt="Screenshot 2024-01-31 at 2 19 27 PM" src="https://github.com/argoproj-labs/hera/assets/701548/35148eb6-5a08-4987-a215-ee6580b3ea36"> With this change: <img width="1224" alt="Screenshot 2024-01-31 at 2 18 27 PM" src="https://github.com/argoproj-labs/hera/assets/701548/76e06cad-ebe0-4f4a-b6be-25bf8c3070c4"> <img width="1341" alt="Screenshot 2024-01-31 at 2 18 36 PM" src="https://github.com/argoproj-labs/hera/assets/701548/b711663d-5539-4c16-a043-7bcb83ed2ad6"> Signed-off-by: DanCardin <[email protected]>
- Loading branch information
Showing
4 changed files
with
45 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters