-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Toml support for pydantic-mypy plugin config
#2908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This should be ready, please review! |
|
@samuelcolvin @PrettyWood is anything other than resolving the implicit dependency needed to get this merged? I'd love to stop organizing project configuration around the plugin's idiosyncratic parsing, and the PR looks great otherwise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks a lot 😊
Just need to rebase/merge and update the changelog to be more digest
|
Please update. |
|
@PrettyWood should be good to go! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much 🙏
|
Thanks for the review @PrettyWood, glad to help! |
|
Is there a plan for when this will be released? The last tagged release of pydantic appears to have been in May |
* add toml reader * fix path * skip configparser step * fix quotes * full pyproject.toml check * add doc note * cleaner formatting, raise ValueError for non-bool * fix tests * add bad config test case * add changelog file. * bump mypy to 0.902 * tweak change MD, fix formatting in requirements * import check around toml * switch to tomli for parsing to match mypy dependency * import check around toml/tomli * add note on tomli usage * more succinct changelog entry * fix quotes in changelog * linting fixes, remove unnecessary stub install * mypy checks on mypy plugin file * wrongly placed pragma no cover Co-authored-by: PrettyWood <em.jolibois@gmail.com>
* add toml reader * fix path * skip configparser step * fix quotes * full pyproject.toml check * add doc note * cleaner formatting, raise ValueError for non-bool * fix tests * add bad config test case * add changelog file. * bump mypy to 0.902 * tweak change MD, fix formatting in requirements * import check around toml * switch to tomli for parsing to match mypy dependency * import check around toml/tomli * add note on tomli usage * more succinct changelog entry * fix quotes in changelog * linting fixes, remove unnecessary stub install * mypy checks on mypy plugin file * wrongly placed pragma no cover Co-authored-by: PrettyWood <em.jolibois@gmail.com>
* add toml reader * fix path * skip configparser step * fix quotes * full pyproject.toml check * add doc note * cleaner formatting, raise ValueError for non-bool * fix tests * add bad config test case * add changelog file. * bump mypy to 0.902 * tweak change MD, fix formatting in requirements * import check around toml * switch to tomli for parsing to match mypy dependency * import check around toml/tomli * add note on tomli usage * more succinct changelog entry * fix quotes in changelog * linting fixes, remove unnecessary stub install * mypy checks on mypy plugin file * wrongly placed pragma no cover Co-authored-by: PrettyWood <em.jolibois@gmail.com>
* add toml reader * fix path * skip configparser step * fix quotes * full pyproject.toml check * add doc note * cleaner formatting, raise ValueError for non-bool * fix tests * add bad config test case * add changelog file. * bump mypy to 0.902 * tweak change MD, fix formatting in requirements * import check around toml * switch to tomli for parsing to match mypy dependency * import check around toml/tomli * add note on tomli usage * more succinct changelog entry * fix quotes in changelog * linting fixes, remove unnecessary stub install * mypy checks on mypy plugin file * wrongly placed pragma no cover Co-authored-by: PrettyWood <em.jolibois@gmail.com>
* add toml reader * fix path * skip configparser step * fix quotes * full pyproject.toml check * add doc note * cleaner formatting, raise ValueError for non-bool * fix tests * add bad config test case * add changelog file. * bump mypy to 0.902 * tweak change MD, fix formatting in requirements * import check around toml * switch to tomli for parsing to match mypy dependency * import check around toml/tomli * add note on tomli usage * more succinct changelog entry * fix quotes in changelog * linting fixes, remove unnecessary stub install * mypy checks on mypy plugin file * wrongly placed pragma no cover Co-authored-by: PrettyWood <em.jolibois@gmail.com>
* add toml reader * fix path * skip configparser step * fix quotes * full pyproject.toml check * add doc note * cleaner formatting, raise ValueError for non-bool * fix tests * add bad config test case * add changelog file. * bump mypy to 0.902 * tweak change MD, fix formatting in requirements * import check around toml * switch to tomli for parsing to match mypy dependency * import check around toml/tomli * add note on tomli usage * more succinct changelog entry * fix quotes in changelog * linting fixes, remove unnecessary stub install * mypy checks on mypy plugin file * wrongly placed pragma no cover Co-authored-by: PrettyWood <em.jolibois@gmail.com>
* add toml reader * fix path * skip configparser step * fix quotes * full pyproject.toml check * add doc note * cleaner formatting, raise ValueError for non-bool * fix tests * add bad config test case * add changelog file. * bump mypy to 0.902 * tweak change MD, fix formatting in requirements * import check around toml * switch to tomli for parsing to match mypy dependency * import check around toml/tomli * add note on tomli usage * more succinct changelog entry * fix quotes in changelog * linting fixes, remove unnecessary stub install * mypy checks on mypy plugin file * wrongly placed pragma no cover Co-authored-by: PrettyWood <em.jolibois@gmail.com>
Change Summary
This PR adds support for configuring the
pydantic-mypyplugin inpyproject.toml, as well as the previousmypy.iniconfig file, enabling full compatibility withmypy>0.900.Configuration behavior should be consistent with prior behavior from
mypy.ini, with enumerated slots populated from thepydantic-mypyconfiguration section, and with non-boolean options resulting in aValueError.Note that this increases the pinned
mypyversion in the testing suite to 0.901, and includes some formatting changes for compatibility to the test cases. However, the plugin behavior is the same in earlier versions ofmypy.Related issue number
Resolves #2895
Checklist
changes/<pull request or issue id>-<github username>.mdfile added describing change(see changes/README.md for details)