forked from pydantic/pydantic
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Toml support for
pydantic-mypy
plugin config (pydantic#2908)
* 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>
- Loading branch information
Showing
4 changed files
with
15 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
Adds configuration logic to the `PydanticPluginConfig` constructor, enabling parsing of the configuration slots from `pyproject.toml` for `mypy>0.900`. | ||
Adds test cases for parsing config from `pyproject.toml`, including a failing case for a non-boolean value (this matches the old `ConfigParser` behavior of raising a `ValueError` on failures in the `getboolean` method). | ||
Increases the pinned version to `mypy==0.902` in the test suite, and includes formatting changes to prior test cases to match. | ||
Adds documentation change reflecting `pyproject.toml` configuration for plugin. | ||
Make `pydantic-mypy` plugin compatible with `pyproject.toml` configuration, consistent with `mypy` changes. See the [doc](https://pydantic-docs.helpmanual.io/mypy_plugin/#configuring-the-plugin) for more information. |
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