diff --git a/CHANGELOG/index.html b/CHANGELOG/index.html
index 7dc0f809..3835e6c3 100644
--- a/CHANGELOG/index.html
+++ b/CHANGELOG/index.html
@@ -442,6 +442,15 @@
+
+
+
@@ -3662,7 +3680,8 @@
Changelog
-
+
+0.4.13 - 2024-04-15
- Fix unresolved ClassVar attribute error [#919]
diff --git a/search/search_index.json b/search/search_index.json
index ecb81949..9e9fa6a8 100644
--- a/search/search_index.json
+++ b/search/search_index.json
@@ -1 +1 @@
-{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Pydantic PyCharm Plugin","text":"A JetBrains PyCharm plugin for pydantic
.
"},{"location":"#interview","title":"Interview","text":"I got interviewed about this plugin for JetBrains' PyCharm Blog.
"},{"location":"#sponsors","title":"Sponsors","text":""},{"location":"#features","title":"Features","text":""},{"location":"#implemented","title":"Implemented","text":""},{"location":"#pydanticbasemodel","title":"pydantic.BaseModel","text":" - Model-specific
__init__
-signature inspection and autocompletion for subclasses of pydantic.BaseModel
- Model-specific
__init__
-arguments type-checking for subclasses of pydantic.BaseModel
- Refactor support for renaming fields for subclasses of
BaseModel
- (If the field name is refactored from the model definition or
__init__
call keyword arguments, PyCharm will present a dialog offering the choice to automatically rename the keyword where it occurs in a model initialization call.) - Search related-fields by class attributes and keyword arguments of
__init__
with Ctrl+B
and Cmd+B
- Provide an inspection for type-checking which is compatible with pydantic. the inspection supports
parsable-type
. the detail is at Inspection for type-checking section - Insert unfilled arguments with a QuickFix for subclasses of
pydantic.BaseModel
- Support typing.Annotated (PEP 593)
- Regex arguments in
Field
and constr
are treated as Python's regex string literals - Config/ConfigDict support
- Auto-completion for Config/ConfigDict
- Read Model config such
frozen=True
from Config/ConfigDict - validator/field_validator support
- respect first argument is
cls
of the method - Auto-completion for field name arguments of validator/field_validator
- Associate validator/field_validator with field
- Support refactoring/jumping
- Validate field name on validator arguments
"},{"location":"#pydanticgenericsgenericmodel","title":"pydantic.generics.GenericModel","text":" - Support same features as
pydantic.BaseModel
- (This plugin version 0.3.1 or later)
"},{"location":"#pydanticdataclassesdataclass","title":"pydantic.dataclasses.dataclass","text":" - Support same features as
pydantic.BaseModel
- (After PyCharm 2020.1 and this plugin version 0.1.0, PyCharm treats
pydantic.dataclasses.dataclass
as third-party dataclass.)
"},{"location":"#pydanticcreate_model-experimental","title":"pydantic.create_model [experimental]","text":" - Support minimum features for a model which is created by create_model
"},{"location":"#sqlmodelsqlmodel","title":"sqlmodel.SQLModel","text":" - Support same features as
pydantic.BaseModel
- (This plugin version 0.3.12 or later)
"},{"location":"#supported-pydantic-major-versions","title":"Supported Pydantic major versions","text":""},{"location":"#demo","title":"Demo","text":""},{"location":"#quick-installation","title":"Quick Installation","text":"The plugin is in Jetbrains repository (Pydantic Plugin Page)
You can install the stable version on PyCharm's Marketplace
(Preference -> Plugins -> Marketplace) Official Documentation
The plugin requires PyCharm 2020.2 or later (include other JetBrains IDEs)
"},{"location":"#contribute","title":"Contribute","text":"We are waiting for your contributions to pydantic-pycharm-plugin
.
"},{"location":"#links","title":"Links","text":""},{"location":"#jetbrains-plugin-page","title":"JetBrains Plugin Page","text":"Pydantic Plugin Page
"},{"location":"#motivation","title":"Motivation","text":"Auto-completion when instantiating BaseModel objects #650
"},{"location":"#other-pycharm-plugin-projects","title":"Other PyCharm plugin projects","text":"Poetry PyCharm Plugin
"},{"location":"#this-project-is-currently-in-an-experimental-phase","title":"This project is currently in an experimental phase","text":""},{"location":"CHANGELOG/","title":"Changelog","text":""},{"location":"CHANGELOG/#unreleased","title":"Unreleased","text":" - Fix unresolved ClassVar attribute error [#919]
"},{"location":"CHANGELOG/#0412-2024-03-14","title":"0.4.12 - 2024-03-14","text":" - Skip multi resolve item when is in dumb mode [#885]
- Fix
@model_validator(mode=\"before\")
causes \"Problematic nesting of decorators\" inspection false positive [#882] - Support 241 EAP [#879]
- Inspect undefined field [#858]
"},{"location":"CHANGELOG/#0411-2024-01-12","title":"0.4.11 - 2024-01-12","text":" - Improve annotated default detection for v2 [#857]
- Improve annotated default detection [#856]
- Fix named argument as positional in popup [#855]
- (\ud83c\udf81) Add icon [#849]
"},{"location":"CHANGELOG/#0410-2023-12-07","title":"0.4.10 - 2023-12-07","text":" - Support PyCharm 2023.3 [#840]
"},{"location":"CHANGELOG/#049-2023-10-12","title":"0.4.9 - 2023-10-12","text":" - Fix False positive for non-decorator use of validator [#818]
- Support 2023.3 EAP [#813]
"},{"location":"CHANGELOG/#048-2023-09-14","title":"0.4.8 - 2023-09-14","text":" - Improve RootModel inspection [#783]
- Fix populate_by_name [#779]
- Ignore
__init__
method if parameter is only only **kwargs
arguments. [#798] - Fixed problem refactoring unrelated fields [#800]
"},{"location":"CHANGELOG/#047-2023-08-07","title":"0.4.7 - 2023-08-07","text":" - Fix false positive \"root cannot be mixed with other fields\" -- ty\u2026 [#780]
- treat model validator as an instance method when mode='after' [#779]
- Fix NullPointerException of getExternalDocumentationUrl [#778]
- Fix false positive validator asterisk [#777]
"},{"location":"CHANGELOG/#046-232-2023-07-20","title":"0.4.6-232 - 2023-07-20","text":" - Associating fields with validator fields for 232 [#762]
- Add validator field argument completion for 232 [#758]
"},{"location":"CHANGELOG/#045-232-2023-07-17","title":"0.4.5-232 - 2023-07-17","text":" - Add migration guide url for 232 [#752]
- Update v2 external document url for 232 [#749]
- Support ConfigDict for 232 [#747]
"},{"location":"CHANGELOG/#044-232-2023-07-14","title":"0.4.4-232 - 2023-07-14","text":" - Support pydantic v2 validators for 232 [#737]
"},{"location":"CHANGELOG/#043-232-2023-06-26","title":"0.4.3-232 - 2023-06-26","text":" - Support Kotlin 1.8.20 [#719]
- Update build.yml [#724]
- Support 232 EAP [#717]
- Add error message for root model in v2 [#696]
- Add official document link [#697]
"},{"location":"CHANGELOG/#043-2023-06-26","title":"0.4.3 - 2023-06-26","text":" - Add error message for root model in v2 [#696]
- Add official document link [#697]
"},{"location":"CHANGELOG/#042-231-2023-03-22","title":"0.4.2-231 - 2023-03-22","text":""},{"location":"CHANGELOG/#042-2023-03-21","title":"0.4.2 - 2023-03-21","text":""},{"location":"CHANGELOG/#041-231-2023-03-02","title":"0.4.1-231 - 2023-03-02","text":" - Support 2023.1 EAP [#633]
"},{"location":"CHANGELOG/#040-2023-03-02","title":"0.4.0 - 2023-03-02","text":" - Fix wrong inspections when a model has a call method [#655]
- Reduce unnecessary resolve in type providers [#656]
- Optimize resolving pydantic class [#658]
- Improve dynamic model field detection [#659]
- Improve test coverage [#660]
- Use multiResolveCalleeFunction instead of getResolvedPsiElements [#661]
"},{"location":"CHANGELOG/#0317-2022-12-16","title":"0.3.17 - 2022-12-16","text":" - Support Union operator [#602]
- Ignore forbid for double star arguments [#603]
- Improve dataclass default Value detection [#604]
- Add inspection for default factory [#605]
- Improve insert arguments [#607]
- Fix None default value on Field function[#608]
- Improve dataclass support [#609]
"},{"location":"CHANGELOG/#0316-2022-12-09","title":"0.3.16 - 2022-12-09","text":" - avoid AlreadyDisposedException [#585]
- Fix kotlin jvm target option [#586]
- Improve code style [#587]
- Prevent Recursion problem [#594]
- Improve version management [#595]
- Fix completion adds superfluous equal to field_name [#596]
"},{"location":"CHANGELOG/#0315","title":"0.3.15","text":" - Fix NotFound getDataclassParameters error [#573]
"},{"location":"CHANGELOG/#0314","title":"0.3.14","text":" - Support IntelliJ IDEA 2022.3 [#519]
"},{"location":"CHANGELOG/#0313","title":"0.3.13","text":""},{"location":"CHANGELOG/#features","title":"Features","text":" - Support IntelliJ IDEA 2022.2.2 [#517]
"},{"location":"CHANGELOG/#0312","title":"0.3.12","text":""},{"location":"CHANGELOG/#features_1","title":"Features","text":""},{"location":"CHANGELOG/#0311","title":"0.3.11","text":""},{"location":"CHANGELOG/#features_2","title":"Features","text":" - Support IntelliJ IDEA 2022.1 [#436]
"},{"location":"CHANGELOG/#bugfixes","title":"BugFixes","text":" - Fix Null Pointer Exception in PydanticTypeCheckerInspection [#431]
"},{"location":"CHANGELOG/#0310","title":"0.3.10","text":""},{"location":"CHANGELOG/#features_3","title":"Features","text":" - Support IntelliJ IDEA 2021.3 [#407]
"},{"location":"CHANGELOG/#bugfixes_1","title":"BugFixes","text":" - Fix a typo in the settings [#408]
"},{"location":"CHANGELOG/#039","title":"0.3.9","text":""},{"location":"CHANGELOG/#features_4","title":"Features","text":" - Support PyCharm 2021.3 [#400]
"},{"location":"CHANGELOG/#038","title":"0.3.8","text":""},{"location":"CHANGELOG/#features_5","title":"Features","text":" - PyCharm API changes [#350] by @alek-sun
- Thanks to @alek-sun
"},{"location":"CHANGELOG/#037","title":"0.3.7","text":""},{"location":"CHANGELOG/#bugfixes_2","title":"BugFixes","text":" - Improve resolving ancestor pydantic models [#369]
- Fix false positive detection of \"extra fields not permitted\" [#368]
"},{"location":"CHANGELOG/#036","title":"0.3.6","text":""},{"location":"CHANGELOG/#bugfixes_3","title":"BugFixes","text":" - Fix PydanticDataclassTypeProvider.kt error [#366]
- Fix Outdated Stub in index error on PydanticAnnotator.kt [#363]
- Fix NullPointerException in PydanticTypeCheckerInspection.kt [#362]
"},{"location":"CHANGELOG/#035","title":"0.3.5","text":""},{"location":"CHANGELOG/#features_6","title":"Features","text":" - Support PyCharm 2021.2 [#355]
- PyCharm 2021.2.1 API changes [#345] by @lada-gagina
- Thanks to @lada-gagina
"},{"location":"CHANGELOG/#034","title":"0.3.4","text":""},{"location":"CHANGELOG/#features_7","title":"Features","text":" - Support ignore-init-method-arguments [#328]
- Support error for extra attribute with extra = 'forbid' option [#324]
"},{"location":"CHANGELOG/#bugfixes_4","title":"BugFixes","text":" - Fix default value by variable for Field is not recognized [#323]
"},{"location":"CHANGELOG/#033","title":"0.3.3","text":""},{"location":"CHANGELOG/#bugfixes_5","title":"BugFixes","text":" - Ignore invalid alias name [#307]
- Fix wrong call parameter with **kwargs [#306]
"},{"location":"CHANGELOG/#032","title":"0.3.2","text":""},{"location":"CHANGELOG/#bugfixes_6","title":"BugFixes","text":" - Fix wrong call parameters when init is defined [#298]
- Fix wrong an error for a duplicate in config [#297]
"},{"location":"CHANGELOG/#031","title":"0.3.1","text":""},{"location":"CHANGELOG/#features_8","title":"Features","text":" - Improve resolving reference [#293]
- Improve coding style [#292]
- Support GenericModel [#289]
- Support frozen on config [#288]
- Fix format [#287]
- Improve handling pydantic version [#286]
- Support config parameters on class kwargs [#285]
"},{"location":"CHANGELOG/#030","title":"0.3.0","text":""},{"location":"CHANGELOG/#features_9","title":"Features","text":" - Support extra init args on baseSetting [#276]
- Support PyCharm 2021.1 [#273]
- Improve supporting dynamic model [#271]
"},{"location":"CHANGELOG/#021","title":"0.2.1","text":""},{"location":"CHANGELOG/#features_10","title":"Features","text":" - Support regex (Field, constr) [#262]
"},{"location":"CHANGELOG/#020","title":"0.2.0","text":""},{"location":"CHANGELOG/#bugfixes_7","title":"BugFixes","text":" - Support
import typing
[#258] - Fix DisposalException [#252]
- Support Annotated [#241]
"},{"location":"CHANGELOG/#0120","title":"0.1.20","text":""},{"location":"CHANGELOG/#features_11","title":"Features","text":" - Show Field() as parameter info for a default value when set default_factory [#240]
"},{"location":"CHANGELOG/#0119","title":"0.1.19","text":""},{"location":"CHANGELOG/#bugfixes_8","title":"BugFixes","text":" - Fix custom root inspection [#232]
"},{"location":"CHANGELOG/#0118","title":"0.1.18","text":""},{"location":"CHANGELOG/#features_12","title":"Features","text":" - Support custom root field [#227]
"},{"location":"CHANGELOG/#0117","title":"0.1.17","text":""},{"location":"CHANGELOG/#features_13","title":"Features","text":" - Support keep_untouched[#216]
"},{"location":"CHANGELOG/#bugfixes_9","title":"BugFixes","text":""},{"location":"CHANGELOG/#0116","title":"0.1.16","text":""},{"location":"CHANGELOG/#bugfixes_10","title":"BugFixes","text":" - Fix inserting argument [#204]
"},{"location":"CHANGELOG/#0115","title":"0.1.15","text":""},{"location":"CHANGELOG/#bugfixes_11","title":"BugFixes","text":" - Fix config service error [#202]
"},{"location":"CHANGELOG/#0114","title":"0.1.14","text":""},{"location":"CHANGELOG/#bugfixes_12","title":"BugFixes","text":" - Fix detecting validators decorated methods [#196]
- Remove stub deletion error [#190]
"},{"location":"CHANGELOG/#0113","title":"0.1.13","text":""},{"location":"CHANGELOG/#features_14","title":"Features","text":""},{"location":"CHANGELOG/#0112","title":"0.1.12","text":""},{"location":"CHANGELOG/#features_15","title":"Features","text":" - Improve build config [#180]
"},{"location":"CHANGELOG/#0111","title":"0.1.11","text":""},{"location":"CHANGELOG/#features_16","title":"Features","text":" - Support dynamic model [#175]
"},{"location":"CHANGELOG/#0110","title":"0.1.10","text":""},{"location":"CHANGELOG/#bugfixes_13","title":"BugFixes","text":" - Fix inserting arguments [#160]
"},{"location":"CHANGELOG/#019","title":"0.1.9","text":""},{"location":"CHANGELOG/#bugfixes_14","title":"BugFixes","text":" - Fix compatibility issues [#145]
"},{"location":"CHANGELOG/#018","title":"0.1.8","text":""},{"location":"CHANGELOG/#features_17","title":"Features","text":" - Support inserting arguments [#144]
"},{"location":"CHANGELOG/#017","title":"0.1.7","text":""},{"location":"CHANGELOG/#features_18","title":"Features","text":" - Update jvm version [#133]
"},{"location":"CHANGELOG/#bugfixes_15","title":"BugFixes","text":" - Fix handling project [#137]
- Fix invalid cache for pydantic version [#132]
- Fix invalid completion in callable expression [#130]
"},{"location":"CHANGELOG/#016","title":"0.1.6","text":""},{"location":"CHANGELOG/#features_19","title":"Features","text":" - Support conlist [#129]
- Fix acceptable types for collections [#127]
- Improve initializer and add package manager listener [#126]
- Fix invalid self parameter when inherits from non-pydantic model [#125]
- Add mock sdk for unittest [#124]
- Fix types of methods and functions [#123]
"},{"location":"CHANGELOG/#015","title":"0.1.5","text":""},{"location":"CHANGELOG/#features_20","title":"Features","text":" - Support a collection on parsable-type and acceptable-type [#120]
"},{"location":"CHANGELOG/#bugfixes_16","title":"BugFixes","text":" - Fix an error when project is disposed [#121]
- Fix type-map edge case for parsable-type and acceptable-type [#118]
"},{"location":"CHANGELOG/#014","title":"0.1.4","text":""},{"location":"CHANGELOG/#bugfixes_17","title":"BugFixes","text":" - Fix type provider for dataclass [#114]
"},{"location":"CHANGELOG/#features_21","title":"Features","text":""},{"location":"CHANGELOG/#013","title":"0.1.3","text":""},{"location":"CHANGELOG/#features_22","title":"Features","text":" - Add documents and link to documents [#105, #106, #107, #108]
- Support acceptable type [#104]
- Support parsable type highlight level [#103]
"},{"location":"CHANGELOG/#012","title":"0.1.2","text":""},{"location":"CHANGELOG/#bugfixes_18","title":"BugFixes","text":" - Fix type checker [#102]
- Fix an invalid warning when a field type is any [#101]
- Fix plugin build settings [#100]
"},{"location":"CHANGELOG/#011","title":"0.1.1","text":""},{"location":"CHANGELOG/#features_23","title":"Features","text":" - Support parsable type [#96]
"},{"location":"CHANGELOG/#010","title":"0.1.0","text":""},{"location":"CHANGELOG/#features_24","title":"Features","text":" - PyCharm treats pydantic.dataclasses.dataclass as third-party dataclass. [#98]
"},{"location":"CHANGELOG/#0030","title":"0.0.30","text":""},{"location":"CHANGELOG/#bugfixes_19","title":"BugFixes","text":" - Fix invalid warn on no public attribute [#95]
"},{"location":"CHANGELOG/#0029","title":"0.0.29","text":""},{"location":"CHANGELOG/#features_25","title":"Features","text":" - Inspect untyped fields [#93]
- Add config panel [#92]
"},{"location":"CHANGELOG/#0028","title":"0.0.28","text":""},{"location":"CHANGELOG/#features-bugfixes","title":"Features, BugFixes","text":" - Support positional arguments for dataclasses [#91]
- Fix field names treated with incorrect scope [#90]
"},{"location":"CHANGELOG/#0027","title":"0.0.27","text":""},{"location":"CHANGELOG/#features_26","title":"Features","text":" - Support to inspect read-only property [#86]
"},{"location":"CHANGELOG/#0026","title":"0.0.26","text":""},{"location":"CHANGELOG/#features_27","title":"Features","text":" - Support to inspect from_orm [#85]
- Improve to handle Config [#85]
"},{"location":"CHANGELOG/#0025","title":"0.0.25","text":""},{"location":"CHANGELOG/#features_28","title":"Features","text":" - Add auto-completion for config fields [#84]
- Support allow_population_by_field_name [#82]
"},{"location":"CHANGELOG/#0024","title":"0.0.24","text":""},{"location":"CHANGELOG/#bugfixes_20","title":"BugFixes","text":" - Fix inspection on namedtuple [#81]
"},{"location":"CHANGELOG/#0023","title":"0.0.23","text":""},{"location":"CHANGELOG/#features_29","title":"Features","text":" - Ignore protected and private fields [#79]
"},{"location":"CHANGELOG/#0022","title":"0.0.22","text":""},{"location":"CHANGELOG/#features-bugfixes_1","title":"Features, BugFixes","text":" - Fix first parameter type of a validator method [#76]
- Fix auto-completion for Fields [#75]
- Improve to insert validate methods [#74]
"},{"location":"CHANGELOG/#0021","title":"0.0.21","text":""},{"location":"CHANGELOG/#features-bugfixes_2","title":"Features, BugFixes","text":" - Support root_validator [#72]
- Support Field for v1 [#71, #73]
"},{"location":"CHANGELOG/#0020","title":"0.0.20","text":""},{"location":"CHANGELOG/#features-bugfixes_3","title":"Features, BugFixes","text":" - Support all features by parameters [#67]
- Fix to handle models which have init or new methods [#67]
"},{"location":"CHANGELOG/#0019","title":"0.0.19","text":""},{"location":"CHANGELOG/#bugfixes_21","title":"BugFixes","text":" - Fix wrong warning message for cls initialization [#66]
"},{"location":"CHANGELOG/#0018","title":"0.0.18","text":""},{"location":"CHANGELOG/#features_30","title":"Features","text":" - Support alias on Schema [#64]
"},{"location":"CHANGELOG/#0017","title":"0.0.17","text":""},{"location":"CHANGELOG/#bugfixes_22","title":"BugFixes","text":" - Fix removing fields on non-subclasses of pydantic.BaseModel and pydantic.dataclasses.dataclass [#62]
"},{"location":"CHANGELOG/#0016","title":"0.0.16","text":""},{"location":"CHANGELOG/#features-bugfixes_4","title":"Features, BugFixes","text":" - Remove fields on auto-completion of subclasses of pydantic.BaseModel and pydantic.dataclasses.dataclass [#61]
- Change default value \"...\" to None on auto-completion [#60]
- Add types and default values to popup of auto-completion [#54]
- Fix class imported path on auto-completion [#54]
"},{"location":"CHANGELOG/#0015","title":"0.0.15","text":""},{"location":"CHANGELOG/#features_31","title":"Features","text":" - Improve autocompletion for signature subclasses of pydantic.BaseModel and pydantic.dataclasses.dataclass [#51]
- Update kotlin version to 1.3.50 [#50]
- Support to detect types by default value on Schema [#49]
- Improve inner logic [#47, #52]
"},{"location":"CHANGELOG/#0014","title":"0.0.14","text":""},{"location":"CHANGELOG/#features_32","title":"Features","text":" - Support default values [#46]
- Ignore warning for self argument with @validator [#45]
- Support pydantic.dataclasses.dataclass [#43]
- Search related-fields by class attributes and keyword arguments of init. with Ctrl+B and Cmd+B [#42]
"},{"location":"CHANGELOG/#0013","title":"0.0.13","text":""},{"location":"CHANGELOG/#features-bugfixes_5","title":"Features, BugFixes","text":" - Fix to check a type of fields without a type-hint [#39]
- No arguments required for BaseSettings [#38]
"},{"location":"CHANGELOG/#0012","title":"0.0.12","text":""},{"location":"CHANGELOG/#features_33","title":"Features","text":" - Support refactoring fields by a keyword argument [#34]
- Support refactoring super-classes and inheritor-classes [#34]
- Support ellipsis(...) in fields [#34]
- Support Schema in fields [#31]
"},{"location":"development/","title":"Development","text":""},{"location":"development/#building-the-plugin","title":"Building the plugin","text":"You can build and run the plugin either via the command line or through IntelliJ IDEA:
"},{"location":"development/#shell-on-linux-macos-and-powershell","title":"Shell on Linux, macOS and PowerShell","text":"./gradlew buildPlugin\n
"},{"location":"development/#command-prompt-on-windows","title":"Command Prompt on Windows","text":"gradlew buildPlugin\n
"},{"location":"development/#jetbrains-ide-on-any-platform","title":"JetBrains IDE on any platform","text":"Official documentation
"},{"location":"development/#running-the-ide-with-the-built-plugin","title":"Running the IDE with the built plugin","text":"./gradlew runIde\n
"},{"location":"development/#license-for-testsrccomjetbrains","title":"License For testSrc/com/jetbrains","text":"These files are copied to testSrc/com/jetbrains
from IntelliJ IDEA Community Edition The files are licensed under the Apache License, Version 2.0. http://www.apache.org/licenses/LICENSE-2.0
"},{"location":"ignore-init-arguments/","title":"Ignore __init__
method arguments","text":"Info
This feature is in version 0.3.4 or later
You can write __init__
method on a model for adding some logic.
However, default arguments on __init__
method will be overridden, And you will lose autocompletion for __init__
methods by the plugin.
ignore-init-method-arguments
option resolves this problem. The option ignore arguments on __init__
method.
The option has to be defined in pyproject.toml
[tool.pydantic-pycharm-plugin]\nignore-init-method-arguments = true\n
Info
This feature is in version 0.4.9 or later
If a third-party library provides a model that extends BaseModel, it may override the __init__
method, as in __init__(self, **kwargs)
. If this is the case, the plugin user should set ignore-init-method-arguments = true
to ignore the __init__
method argument. But it is difficult to tell if the library is using BaseModel or not.
The plugin ignore the __init__
method if argument is only **kwargs
. the option is provided as ignore-init-method-keyword-arguments
. This option is enabled by default, so if you create a model that inherits from BaseModel with a method like __init__(self, **kwargs)
defined, ignore this init
argument.
If you want to disable this option, please put the following setting in pyproject.toml
.
[tool.pydantic-pycharm-plugin].\nignore-init-method-keyword-arguments = true\n
"},{"location":"ignore-init-keyword-arguments/","title":"Ignore __init__
method arguments","text":"Info
This feature is in version 0.4.8 or later
You can write __init__
method on a model for adding some logic.
However, default arguments on __init__
method will be overridden, And you will lose autocompletion for __init__
methods by the plugin.
ignore-init-method-arguments
option resolves this problem. The option ignore arguments on __init__
method.
The option has to be defined in pyproject.toml
[tool.pydantic-pycharm-plugin]\nignore-init-method-keyword-arguments = false\n
"},{"location":"install/","title":"Installation","text":"The plugin requires PyCharm 2020.2 or later (include other JetBrains IDEs)
"},{"location":"install/#marketplace","title":"MarketPlace","text":"The plugin is in Jetbrains repository (Pydantic Plugin Page)
You can install the stable version on PyCharm's Marketplace
(Preference -> Plugins -> Marketplace) Official Documentation
"},{"location":"install/#complied-binary","title":"Complied binary","text":"The 'Releases' section of this repository contains a compiled version of the plugin: pydantic-pycharm-plugin.zip(latest)
After downloading this file, you can install the plugin from disk by following the JetBrains instructions here.
"},{"location":"install/#source","title":"Source","text":"Alternatively, you can clone this repository and follow the instructions under the \"Building the plugin\" heading below to build from source. The build process will create the file build/distributions/pydantic-pycharm-plugin.zip
. This file can be installed as a PyCharm plugin from disk following the same instructions.
"},{"location":"mypy-compatible/","title":"Mypy Compatible","text":"Info
This feature is in version 0.1.4 or later
This plugin is compatible with the pydantic-mypy plugin, which is included in pydantic package.
If you set supported features in mypy.ini then, the pycharm plugin performs the same inspects.
"},{"location":"mypy-compatible/#support-features","title":"Support features","text":" - init_typed
- warn_untyped_fields
"},{"location":"mypy-compatible/#init_typed","title":"init_typed","text":"If enabled, include the field types as type hints in the generated signature for the init method. This means that you'll get errors if you pass an argument that is not already the right type to init, even if parsing could safely convert the type.
"},{"location":"mypy-compatible/#warn_untyped_fields","title":"warn_untyped_fields","text":"If enabled, raise an error whenever a field is declared on a model without explicitly specifying its type.
"},{"location":"mypy-compatible/#settings","title":"Settings","text":"You can toggle these features in PyCharm's Settings.
Tips
If there is mypy.ini in your project, this plugin use values in mypy.ini
"},{"location":"type-checker-for-pydantic/","title":"Type checker for Pydnatic","text":"Warning
Experimental feature
Info
In version 0.1.1, This feature is broken. Please use it in 0.1.2 or later.
Tips
**This plugin supports type-checking to pydantic with a built-in type checker. Plus, this type-checker supplies a special feature to Pydnatic. **
This plugin provides a type-checker for pydantic.
You can use the type-checker on PyCharm's Settings (Preference -> Editor -> Inspections -> Type checker compatible with Pydantic
)
This type-checker inherits from PyCharm's built-in type checker (aka Type checker
).
Please disable Type checker
when you enable Type checker compatible with Pydantic.
Don't use this type checker with a builtin type checker same time.
"},{"location":"type-checker-for-pydantic/#parsable-type","title":"Parsable Type","text":"Pydantic has lots of support for coercing types. However, PyCharm gives a message saying only Expected type \"x,\" got \"y\" instead:
When you set parsable-type on a type, then the message will be changed to Field is of type \"x\", \"y\" may not be parsable to \"x\"
"},{"location":"type-checker-for-pydantic/#set-parsable-type-in-pyprojecttoml","title":"Set parsable-type in pyproject.toml","text":"You should create pyproject.toml
in your project root. And, you define parsable-type like a example.
exapmle: pyproject.toml
[tool.pydantic-pycharm-plugin.parsable-types]\n\n# str field may parse int and float\nstr = [\"int\", \"float\"]\n\n# datetime.datetime field may parse int\n\"datetime.datetime\" = [ \"int\" ]\n\n# your_module.your_type field may parse str\n\"your_module.your_type\" = [ \"str\" ]\n\n[tool.pydantic-pycharm-plugin]\n# You can set higlith level (default is \"warning\")\n# You can select it from \"warning\", \"weak_warning\", \"disable\" \nparsable-type-highlight = \"warning\" \n\n## If you set acceptable-type-highlight then, you have to set it at same depth.\nacceptable-type-highlight = \"disable\" \n
"},{"location":"type-checker-for-pydantic/#acceptable-type","title":"Acceptable Type","text":"Info
This feature is in version 0.1.3 or later.
Pydantic can always parse a few types to other types. For example, int
to str
. It always succeeds. You can set it as an acceptable type. The message is Field is of type 'x', 'y' is set as an acceptable type in pyproject.toml
. Also,You may want to disable the message.You can do it, by setting \"disable\" on acceptable-type-highlight
.
"},{"location":"type-checker-for-pydantic/#set-acceptable-type-in-pyprojecttoml","title":"Set acceptable-type in pyproject.toml","text":"You should create pyproject.toml
in your project root. And, you define acceptable-type like a example.
exapmle: pyproject.toml
[tool.pydantic-pycharm-plugin.acceptable-types]\n\n# str field accepts to parse int and float\nstr = [\"int\", \"float\"]\n\n# datetime.datetime field may parse int\n\"datetime.datetime\" = [ \"int\" ]\n\n[tool.pydantic-pycharm-plugin]\n# You can set higlith level (default is \"weak_warning\")\n# You can select it from \"warning\", \"weak_warning\", \"disable\" \nacceptable-type-highlight = \"disable\" \n\n# If you set parsable-type-highlight then, you have to set it at same depth.\nparsable-type-highlight = \"warning\" \n
"}]}
\ No newline at end of file
+{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Pydantic PyCharm Plugin","text":"A JetBrains PyCharm plugin for pydantic
.
"},{"location":"#interview","title":"Interview","text":"I got interviewed about this plugin for JetBrains' PyCharm Blog.
"},{"location":"#sponsors","title":"Sponsors","text":""},{"location":"#features","title":"Features","text":""},{"location":"#implemented","title":"Implemented","text":""},{"location":"#pydanticbasemodel","title":"pydantic.BaseModel","text":" - Model-specific
__init__
-signature inspection and autocompletion for subclasses of pydantic.BaseModel
- Model-specific
__init__
-arguments type-checking for subclasses of pydantic.BaseModel
- Refactor support for renaming fields for subclasses of
BaseModel
- (If the field name is refactored from the model definition or
__init__
call keyword arguments, PyCharm will present a dialog offering the choice to automatically rename the keyword where it occurs in a model initialization call.) - Search related-fields by class attributes and keyword arguments of
__init__
with Ctrl+B
and Cmd+B
- Provide an inspection for type-checking which is compatible with pydantic. the inspection supports
parsable-type
. the detail is at Inspection for type-checking section - Insert unfilled arguments with a QuickFix for subclasses of
pydantic.BaseModel
- Support typing.Annotated (PEP 593)
- Regex arguments in
Field
and constr
are treated as Python's regex string literals - Config/ConfigDict support
- Auto-completion for Config/ConfigDict
- Read Model config such
frozen=True
from Config/ConfigDict - validator/field_validator support
- respect first argument is
cls
of the method - Auto-completion for field name arguments of validator/field_validator
- Associate validator/field_validator with field
- Support refactoring/jumping
- Validate field name on validator arguments
"},{"location":"#pydanticgenericsgenericmodel","title":"pydantic.generics.GenericModel","text":" - Support same features as
pydantic.BaseModel
- (This plugin version 0.3.1 or later)
"},{"location":"#pydanticdataclassesdataclass","title":"pydantic.dataclasses.dataclass","text":" - Support same features as
pydantic.BaseModel
- (After PyCharm 2020.1 and this plugin version 0.1.0, PyCharm treats
pydantic.dataclasses.dataclass
as third-party dataclass.)
"},{"location":"#pydanticcreate_model-experimental","title":"pydantic.create_model [experimental]","text":" - Support minimum features for a model which is created by create_model
"},{"location":"#sqlmodelsqlmodel","title":"sqlmodel.SQLModel","text":" - Support same features as
pydantic.BaseModel
- (This plugin version 0.3.12 or later)
"},{"location":"#supported-pydantic-major-versions","title":"Supported Pydantic major versions","text":""},{"location":"#demo","title":"Demo","text":""},{"location":"#quick-installation","title":"Quick Installation","text":"The plugin is in Jetbrains repository (Pydantic Plugin Page)
You can install the stable version on PyCharm's Marketplace
(Preference -> Plugins -> Marketplace) Official Documentation
The plugin requires PyCharm 2020.2 or later (include other JetBrains IDEs)
"},{"location":"#contribute","title":"Contribute","text":"We are waiting for your contributions to pydantic-pycharm-plugin
.
"},{"location":"#links","title":"Links","text":""},{"location":"#jetbrains-plugin-page","title":"JetBrains Plugin Page","text":"Pydantic Plugin Page
"},{"location":"#motivation","title":"Motivation","text":"Auto-completion when instantiating BaseModel objects #650
"},{"location":"#other-pycharm-plugin-projects","title":"Other PyCharm plugin projects","text":"Poetry PyCharm Plugin
"},{"location":"#this-project-is-currently-in-an-experimental-phase","title":"This project is currently in an experimental phase","text":""},{"location":"CHANGELOG/","title":"Changelog","text":""},{"location":"CHANGELOG/#unreleased","title":"Unreleased","text":""},{"location":"CHANGELOG/#0413-2024-04-15","title":"0.4.13 - 2024-04-15","text":" - Fix unresolved ClassVar attribute error [#919]
"},{"location":"CHANGELOG/#0412-2024-03-14","title":"0.4.12 - 2024-03-14","text":" - Skip multi resolve item when is in dumb mode [#885]
- Fix
@model_validator(mode=\"before\")
causes \"Problematic nesting of decorators\" inspection false positive [#882] - Support 241 EAP [#879]
- Inspect undefined field [#858]
"},{"location":"CHANGELOG/#0411-2024-01-12","title":"0.4.11 - 2024-01-12","text":" - Improve annotated default detection for v2 [#857]
- Improve annotated default detection [#856]
- Fix named argument as positional in popup [#855]
- (\ud83c\udf81) Add icon [#849]
"},{"location":"CHANGELOG/#0410-2023-12-07","title":"0.4.10 - 2023-12-07","text":" - Support PyCharm 2023.3 [#840]
"},{"location":"CHANGELOG/#049-2023-10-12","title":"0.4.9 - 2023-10-12","text":" - Fix False positive for non-decorator use of validator [#818]
- Support 2023.3 EAP [#813]
"},{"location":"CHANGELOG/#048-2023-09-14","title":"0.4.8 - 2023-09-14","text":" - Improve RootModel inspection [#783]
- Fix populate_by_name [#779]
- Ignore
__init__
method if parameter is only only **kwargs
arguments. [#798] - Fixed problem refactoring unrelated fields [#800]
"},{"location":"CHANGELOG/#047-2023-08-07","title":"0.4.7 - 2023-08-07","text":" - Fix false positive \"root cannot be mixed with other fields\" -- ty\u2026 [#780]
- treat model validator as an instance method when mode='after' [#779]
- Fix NullPointerException of getExternalDocumentationUrl [#778]
- Fix false positive validator asterisk [#777]
"},{"location":"CHANGELOG/#046-232-2023-07-20","title":"0.4.6-232 - 2023-07-20","text":" - Associating fields with validator fields for 232 [#762]
- Add validator field argument completion for 232 [#758]
"},{"location":"CHANGELOG/#045-232-2023-07-17","title":"0.4.5-232 - 2023-07-17","text":" - Add migration guide url for 232 [#752]
- Update v2 external document url for 232 [#749]
- Support ConfigDict for 232 [#747]
"},{"location":"CHANGELOG/#044-232-2023-07-14","title":"0.4.4-232 - 2023-07-14","text":" - Support pydantic v2 validators for 232 [#737]
"},{"location":"CHANGELOG/#043-232-2023-06-26","title":"0.4.3-232 - 2023-06-26","text":" - Support Kotlin 1.8.20 [#719]
- Update build.yml [#724]
- Support 232 EAP [#717]
- Add error message for root model in v2 [#696]
- Add official document link [#697]
"},{"location":"CHANGELOG/#043-2023-06-26","title":"0.4.3 - 2023-06-26","text":" - Add error message for root model in v2 [#696]
- Add official document link [#697]
"},{"location":"CHANGELOG/#042-231-2023-03-22","title":"0.4.2-231 - 2023-03-22","text":""},{"location":"CHANGELOG/#042-2023-03-21","title":"0.4.2 - 2023-03-21","text":""},{"location":"CHANGELOG/#041-231-2023-03-02","title":"0.4.1-231 - 2023-03-02","text":" - Support 2023.1 EAP [#633]
"},{"location":"CHANGELOG/#040-2023-03-02","title":"0.4.0 - 2023-03-02","text":" - Fix wrong inspections when a model has a call method [#655]
- Reduce unnecessary resolve in type providers [#656]
- Optimize resolving pydantic class [#658]
- Improve dynamic model field detection [#659]
- Improve test coverage [#660]
- Use multiResolveCalleeFunction instead of getResolvedPsiElements [#661]
"},{"location":"CHANGELOG/#0317-2022-12-16","title":"0.3.17 - 2022-12-16","text":" - Support Union operator [#602]
- Ignore forbid for double star arguments [#603]
- Improve dataclass default Value detection [#604]
- Add inspection for default factory [#605]
- Improve insert arguments [#607]
- Fix None default value on Field function[#608]
- Improve dataclass support [#609]
"},{"location":"CHANGELOG/#0316-2022-12-09","title":"0.3.16 - 2022-12-09","text":" - avoid AlreadyDisposedException [#585]
- Fix kotlin jvm target option [#586]
- Improve code style [#587]
- Prevent Recursion problem [#594]
- Improve version management [#595]
- Fix completion adds superfluous equal to field_name [#596]
"},{"location":"CHANGELOG/#0315","title":"0.3.15","text":" - Fix NotFound getDataclassParameters error [#573]
"},{"location":"CHANGELOG/#0314","title":"0.3.14","text":" - Support IntelliJ IDEA 2022.3 [#519]
"},{"location":"CHANGELOG/#0313","title":"0.3.13","text":""},{"location":"CHANGELOG/#features","title":"Features","text":" - Support IntelliJ IDEA 2022.2.2 [#517]
"},{"location":"CHANGELOG/#0312","title":"0.3.12","text":""},{"location":"CHANGELOG/#features_1","title":"Features","text":""},{"location":"CHANGELOG/#0311","title":"0.3.11","text":""},{"location":"CHANGELOG/#features_2","title":"Features","text":" - Support IntelliJ IDEA 2022.1 [#436]
"},{"location":"CHANGELOG/#bugfixes","title":"BugFixes","text":" - Fix Null Pointer Exception in PydanticTypeCheckerInspection [#431]
"},{"location":"CHANGELOG/#0310","title":"0.3.10","text":""},{"location":"CHANGELOG/#features_3","title":"Features","text":" - Support IntelliJ IDEA 2021.3 [#407]
"},{"location":"CHANGELOG/#bugfixes_1","title":"BugFixes","text":" - Fix a typo in the settings [#408]
"},{"location":"CHANGELOG/#039","title":"0.3.9","text":""},{"location":"CHANGELOG/#features_4","title":"Features","text":" - Support PyCharm 2021.3 [#400]
"},{"location":"CHANGELOG/#038","title":"0.3.8","text":""},{"location":"CHANGELOG/#features_5","title":"Features","text":" - PyCharm API changes [#350] by @alek-sun
- Thanks to @alek-sun
"},{"location":"CHANGELOG/#037","title":"0.3.7","text":""},{"location":"CHANGELOG/#bugfixes_2","title":"BugFixes","text":" - Improve resolving ancestor pydantic models [#369]
- Fix false positive detection of \"extra fields not permitted\" [#368]
"},{"location":"CHANGELOG/#036","title":"0.3.6","text":""},{"location":"CHANGELOG/#bugfixes_3","title":"BugFixes","text":" - Fix PydanticDataclassTypeProvider.kt error [#366]
- Fix Outdated Stub in index error on PydanticAnnotator.kt [#363]
- Fix NullPointerException in PydanticTypeCheckerInspection.kt [#362]
"},{"location":"CHANGELOG/#035","title":"0.3.5","text":""},{"location":"CHANGELOG/#features_6","title":"Features","text":" - Support PyCharm 2021.2 [#355]
- PyCharm 2021.2.1 API changes [#345] by @lada-gagina
- Thanks to @lada-gagina
"},{"location":"CHANGELOG/#034","title":"0.3.4","text":""},{"location":"CHANGELOG/#features_7","title":"Features","text":" - Support ignore-init-method-arguments [#328]
- Support error for extra attribute with extra = 'forbid' option [#324]
"},{"location":"CHANGELOG/#bugfixes_4","title":"BugFixes","text":" - Fix default value by variable for Field is not recognized [#323]
"},{"location":"CHANGELOG/#033","title":"0.3.3","text":""},{"location":"CHANGELOG/#bugfixes_5","title":"BugFixes","text":" - Ignore invalid alias name [#307]
- Fix wrong call parameter with **kwargs [#306]
"},{"location":"CHANGELOG/#032","title":"0.3.2","text":""},{"location":"CHANGELOG/#bugfixes_6","title":"BugFixes","text":" - Fix wrong call parameters when init is defined [#298]
- Fix wrong an error for a duplicate in config [#297]
"},{"location":"CHANGELOG/#031","title":"0.3.1","text":""},{"location":"CHANGELOG/#features_8","title":"Features","text":" - Improve resolving reference [#293]
- Improve coding style [#292]
- Support GenericModel [#289]
- Support frozen on config [#288]
- Fix format [#287]
- Improve handling pydantic version [#286]
- Support config parameters on class kwargs [#285]
"},{"location":"CHANGELOG/#030","title":"0.3.0","text":""},{"location":"CHANGELOG/#features_9","title":"Features","text":" - Support extra init args on baseSetting [#276]
- Support PyCharm 2021.1 [#273]
- Improve supporting dynamic model [#271]
"},{"location":"CHANGELOG/#021","title":"0.2.1","text":""},{"location":"CHANGELOG/#features_10","title":"Features","text":" - Support regex (Field, constr) [#262]
"},{"location":"CHANGELOG/#020","title":"0.2.0","text":""},{"location":"CHANGELOG/#bugfixes_7","title":"BugFixes","text":" - Support
import typing
[#258] - Fix DisposalException [#252]
- Support Annotated [#241]
"},{"location":"CHANGELOG/#0120","title":"0.1.20","text":""},{"location":"CHANGELOG/#features_11","title":"Features","text":" - Show Field() as parameter info for a default value when set default_factory [#240]
"},{"location":"CHANGELOG/#0119","title":"0.1.19","text":""},{"location":"CHANGELOG/#bugfixes_8","title":"BugFixes","text":" - Fix custom root inspection [#232]
"},{"location":"CHANGELOG/#0118","title":"0.1.18","text":""},{"location":"CHANGELOG/#features_12","title":"Features","text":" - Support custom root field [#227]
"},{"location":"CHANGELOG/#0117","title":"0.1.17","text":""},{"location":"CHANGELOG/#features_13","title":"Features","text":" - Support keep_untouched[#216]
"},{"location":"CHANGELOG/#bugfixes_9","title":"BugFixes","text":""},{"location":"CHANGELOG/#0116","title":"0.1.16","text":""},{"location":"CHANGELOG/#bugfixes_10","title":"BugFixes","text":" - Fix inserting argument [#204]
"},{"location":"CHANGELOG/#0115","title":"0.1.15","text":""},{"location":"CHANGELOG/#bugfixes_11","title":"BugFixes","text":" - Fix config service error [#202]
"},{"location":"CHANGELOG/#0114","title":"0.1.14","text":""},{"location":"CHANGELOG/#bugfixes_12","title":"BugFixes","text":" - Fix detecting validators decorated methods [#196]
- Remove stub deletion error [#190]
"},{"location":"CHANGELOG/#0113","title":"0.1.13","text":""},{"location":"CHANGELOG/#features_14","title":"Features","text":""},{"location":"CHANGELOG/#0112","title":"0.1.12","text":""},{"location":"CHANGELOG/#features_15","title":"Features","text":" - Improve build config [#180]
"},{"location":"CHANGELOG/#0111","title":"0.1.11","text":""},{"location":"CHANGELOG/#features_16","title":"Features","text":" - Support dynamic model [#175]
"},{"location":"CHANGELOG/#0110","title":"0.1.10","text":""},{"location":"CHANGELOG/#bugfixes_13","title":"BugFixes","text":" - Fix inserting arguments [#160]
"},{"location":"CHANGELOG/#019","title":"0.1.9","text":""},{"location":"CHANGELOG/#bugfixes_14","title":"BugFixes","text":" - Fix compatibility issues [#145]
"},{"location":"CHANGELOG/#018","title":"0.1.8","text":""},{"location":"CHANGELOG/#features_17","title":"Features","text":" - Support inserting arguments [#144]
"},{"location":"CHANGELOG/#017","title":"0.1.7","text":""},{"location":"CHANGELOG/#features_18","title":"Features","text":" - Update jvm version [#133]
"},{"location":"CHANGELOG/#bugfixes_15","title":"BugFixes","text":" - Fix handling project [#137]
- Fix invalid cache for pydantic version [#132]
- Fix invalid completion in callable expression [#130]
"},{"location":"CHANGELOG/#016","title":"0.1.6","text":""},{"location":"CHANGELOG/#features_19","title":"Features","text":" - Support conlist [#129]
- Fix acceptable types for collections [#127]
- Improve initializer and add package manager listener [#126]
- Fix invalid self parameter when inherits from non-pydantic model [#125]
- Add mock sdk for unittest [#124]
- Fix types of methods and functions [#123]
"},{"location":"CHANGELOG/#015","title":"0.1.5","text":""},{"location":"CHANGELOG/#features_20","title":"Features","text":" - Support a collection on parsable-type and acceptable-type [#120]
"},{"location":"CHANGELOG/#bugfixes_16","title":"BugFixes","text":" - Fix an error when project is disposed [#121]
- Fix type-map edge case for parsable-type and acceptable-type [#118]
"},{"location":"CHANGELOG/#014","title":"0.1.4","text":""},{"location":"CHANGELOG/#bugfixes_17","title":"BugFixes","text":" - Fix type provider for dataclass [#114]
"},{"location":"CHANGELOG/#features_21","title":"Features","text":""},{"location":"CHANGELOG/#013","title":"0.1.3","text":""},{"location":"CHANGELOG/#features_22","title":"Features","text":" - Add documents and link to documents [#105, #106, #107, #108]
- Support acceptable type [#104]
- Support parsable type highlight level [#103]
"},{"location":"CHANGELOG/#012","title":"0.1.2","text":""},{"location":"CHANGELOG/#bugfixes_18","title":"BugFixes","text":" - Fix type checker [#102]
- Fix an invalid warning when a field type is any [#101]
- Fix plugin build settings [#100]
"},{"location":"CHANGELOG/#011","title":"0.1.1","text":""},{"location":"CHANGELOG/#features_23","title":"Features","text":" - Support parsable type [#96]
"},{"location":"CHANGELOG/#010","title":"0.1.0","text":""},{"location":"CHANGELOG/#features_24","title":"Features","text":" - PyCharm treats pydantic.dataclasses.dataclass as third-party dataclass. [#98]
"},{"location":"CHANGELOG/#0030","title":"0.0.30","text":""},{"location":"CHANGELOG/#bugfixes_19","title":"BugFixes","text":" - Fix invalid warn on no public attribute [#95]
"},{"location":"CHANGELOG/#0029","title":"0.0.29","text":""},{"location":"CHANGELOG/#features_25","title":"Features","text":" - Inspect untyped fields [#93]
- Add config panel [#92]
"},{"location":"CHANGELOG/#0028","title":"0.0.28","text":""},{"location":"CHANGELOG/#features-bugfixes","title":"Features, BugFixes","text":" - Support positional arguments for dataclasses [#91]
- Fix field names treated with incorrect scope [#90]
"},{"location":"CHANGELOG/#0027","title":"0.0.27","text":""},{"location":"CHANGELOG/#features_26","title":"Features","text":" - Support to inspect read-only property [#86]
"},{"location":"CHANGELOG/#0026","title":"0.0.26","text":""},{"location":"CHANGELOG/#features_27","title":"Features","text":" - Support to inspect from_orm [#85]
- Improve to handle Config [#85]
"},{"location":"CHANGELOG/#0025","title":"0.0.25","text":""},{"location":"CHANGELOG/#features_28","title":"Features","text":" - Add auto-completion for config fields [#84]
- Support allow_population_by_field_name [#82]
"},{"location":"CHANGELOG/#0024","title":"0.0.24","text":""},{"location":"CHANGELOG/#bugfixes_20","title":"BugFixes","text":" - Fix inspection on namedtuple [#81]
"},{"location":"CHANGELOG/#0023","title":"0.0.23","text":""},{"location":"CHANGELOG/#features_29","title":"Features","text":" - Ignore protected and private fields [#79]
"},{"location":"CHANGELOG/#0022","title":"0.0.22","text":""},{"location":"CHANGELOG/#features-bugfixes_1","title":"Features, BugFixes","text":" - Fix first parameter type of a validator method [#76]
- Fix auto-completion for Fields [#75]
- Improve to insert validate methods [#74]
"},{"location":"CHANGELOG/#0021","title":"0.0.21","text":""},{"location":"CHANGELOG/#features-bugfixes_2","title":"Features, BugFixes","text":" - Support root_validator [#72]
- Support Field for v1 [#71, #73]
"},{"location":"CHANGELOG/#0020","title":"0.0.20","text":""},{"location":"CHANGELOG/#features-bugfixes_3","title":"Features, BugFixes","text":" - Support all features by parameters [#67]
- Fix to handle models which have init or new methods [#67]
"},{"location":"CHANGELOG/#0019","title":"0.0.19","text":""},{"location":"CHANGELOG/#bugfixes_21","title":"BugFixes","text":" - Fix wrong warning message for cls initialization [#66]
"},{"location":"CHANGELOG/#0018","title":"0.0.18","text":""},{"location":"CHANGELOG/#features_30","title":"Features","text":" - Support alias on Schema [#64]
"},{"location":"CHANGELOG/#0017","title":"0.0.17","text":""},{"location":"CHANGELOG/#bugfixes_22","title":"BugFixes","text":" - Fix removing fields on non-subclasses of pydantic.BaseModel and pydantic.dataclasses.dataclass [#62]
"},{"location":"CHANGELOG/#0016","title":"0.0.16","text":""},{"location":"CHANGELOG/#features-bugfixes_4","title":"Features, BugFixes","text":" - Remove fields on auto-completion of subclasses of pydantic.BaseModel and pydantic.dataclasses.dataclass [#61]
- Change default value \"...\" to None on auto-completion [#60]
- Add types and default values to popup of auto-completion [#54]
- Fix class imported path on auto-completion [#54]
"},{"location":"CHANGELOG/#0015","title":"0.0.15","text":""},{"location":"CHANGELOG/#features_31","title":"Features","text":" - Improve autocompletion for signature subclasses of pydantic.BaseModel and pydantic.dataclasses.dataclass [#51]
- Update kotlin version to 1.3.50 [#50]
- Support to detect types by default value on Schema [#49]
- Improve inner logic [#47, #52]
"},{"location":"CHANGELOG/#0014","title":"0.0.14","text":""},{"location":"CHANGELOG/#features_32","title":"Features","text":" - Support default values [#46]
- Ignore warning for self argument with @validator [#45]
- Support pydantic.dataclasses.dataclass [#43]
- Search related-fields by class attributes and keyword arguments of init. with Ctrl+B and Cmd+B [#42]
"},{"location":"CHANGELOG/#0013","title":"0.0.13","text":""},{"location":"CHANGELOG/#features-bugfixes_5","title":"Features, BugFixes","text":" - Fix to check a type of fields without a type-hint [#39]
- No arguments required for BaseSettings [#38]
"},{"location":"CHANGELOG/#0012","title":"0.0.12","text":""},{"location":"CHANGELOG/#features_33","title":"Features","text":" - Support refactoring fields by a keyword argument [#34]
- Support refactoring super-classes and inheritor-classes [#34]
- Support ellipsis(...) in fields [#34]
- Support Schema in fields [#31]
"},{"location":"development/","title":"Development","text":""},{"location":"development/#building-the-plugin","title":"Building the plugin","text":"You can build and run the plugin either via the command line or through IntelliJ IDEA:
"},{"location":"development/#shell-on-linux-macos-and-powershell","title":"Shell on Linux, macOS and PowerShell","text":"./gradlew buildPlugin\n
"},{"location":"development/#command-prompt-on-windows","title":"Command Prompt on Windows","text":"gradlew buildPlugin\n
"},{"location":"development/#jetbrains-ide-on-any-platform","title":"JetBrains IDE on any platform","text":"Official documentation
"},{"location":"development/#running-the-ide-with-the-built-plugin","title":"Running the IDE with the built plugin","text":"./gradlew runIde\n
"},{"location":"development/#license-for-testsrccomjetbrains","title":"License For testSrc/com/jetbrains","text":"These files are copied to testSrc/com/jetbrains
from IntelliJ IDEA Community Edition The files are licensed under the Apache License, Version 2.0. http://www.apache.org/licenses/LICENSE-2.0
"},{"location":"ignore-init-arguments/","title":"Ignore __init__
method arguments","text":"Info
This feature is in version 0.3.4 or later
You can write __init__
method on a model for adding some logic.
However, default arguments on __init__
method will be overridden, And you will lose autocompletion for __init__
methods by the plugin.
ignore-init-method-arguments
option resolves this problem. The option ignore arguments on __init__
method.
The option has to be defined in pyproject.toml
[tool.pydantic-pycharm-plugin]\nignore-init-method-arguments = true\n
Info
This feature is in version 0.4.9 or later
If a third-party library provides a model that extends BaseModel, it may override the __init__
method, as in __init__(self, **kwargs)
. If this is the case, the plugin user should set ignore-init-method-arguments = true
to ignore the __init__
method argument. But it is difficult to tell if the library is using BaseModel or not.
The plugin ignore the __init__
method if argument is only **kwargs
. the option is provided as ignore-init-method-keyword-arguments
. This option is enabled by default, so if you create a model that inherits from BaseModel with a method like __init__(self, **kwargs)
defined, ignore this init
argument.
If you want to disable this option, please put the following setting in pyproject.toml
.
[tool.pydantic-pycharm-plugin].\nignore-init-method-keyword-arguments = true\n
"},{"location":"ignore-init-keyword-arguments/","title":"Ignore __init__
method arguments","text":"Info
This feature is in version 0.4.8 or later
You can write __init__
method on a model for adding some logic.
However, default arguments on __init__
method will be overridden, And you will lose autocompletion for __init__
methods by the plugin.
ignore-init-method-arguments
option resolves this problem. The option ignore arguments on __init__
method.
The option has to be defined in pyproject.toml
[tool.pydantic-pycharm-plugin]\nignore-init-method-keyword-arguments = false\n
"},{"location":"install/","title":"Installation","text":"The plugin requires PyCharm 2020.2 or later (include other JetBrains IDEs)
"},{"location":"install/#marketplace","title":"MarketPlace","text":"The plugin is in Jetbrains repository (Pydantic Plugin Page)
You can install the stable version on PyCharm's Marketplace
(Preference -> Plugins -> Marketplace) Official Documentation
"},{"location":"install/#complied-binary","title":"Complied binary","text":"The 'Releases' section of this repository contains a compiled version of the plugin: pydantic-pycharm-plugin.zip(latest)
After downloading this file, you can install the plugin from disk by following the JetBrains instructions here.
"},{"location":"install/#source","title":"Source","text":"Alternatively, you can clone this repository and follow the instructions under the \"Building the plugin\" heading below to build from source. The build process will create the file build/distributions/pydantic-pycharm-plugin.zip
. This file can be installed as a PyCharm plugin from disk following the same instructions.
"},{"location":"mypy-compatible/","title":"Mypy Compatible","text":"Info
This feature is in version 0.1.4 or later
This plugin is compatible with the pydantic-mypy plugin, which is included in pydantic package.
If you set supported features in mypy.ini then, the pycharm plugin performs the same inspects.
"},{"location":"mypy-compatible/#support-features","title":"Support features","text":" - init_typed
- warn_untyped_fields
"},{"location":"mypy-compatible/#init_typed","title":"init_typed","text":"If enabled, include the field types as type hints in the generated signature for the init method. This means that you'll get errors if you pass an argument that is not already the right type to init, even if parsing could safely convert the type.
"},{"location":"mypy-compatible/#warn_untyped_fields","title":"warn_untyped_fields","text":"If enabled, raise an error whenever a field is declared on a model without explicitly specifying its type.
"},{"location":"mypy-compatible/#settings","title":"Settings","text":"You can toggle these features in PyCharm's Settings.
Tips
If there is mypy.ini in your project, this plugin use values in mypy.ini
"},{"location":"type-checker-for-pydantic/","title":"Type checker for Pydnatic","text":"Warning
Experimental feature
Info
In version 0.1.1, This feature is broken. Please use it in 0.1.2 or later.
Tips
**This plugin supports type-checking to pydantic with a built-in type checker. Plus, this type-checker supplies a special feature to Pydnatic. **
This plugin provides a type-checker for pydantic.
You can use the type-checker on PyCharm's Settings (Preference -> Editor -> Inspections -> Type checker compatible with Pydantic
)
This type-checker inherits from PyCharm's built-in type checker (aka Type checker
).
Please disable Type checker
when you enable Type checker compatible with Pydantic.
Don't use this type checker with a builtin type checker same time.
"},{"location":"type-checker-for-pydantic/#parsable-type","title":"Parsable Type","text":"Pydantic has lots of support for coercing types. However, PyCharm gives a message saying only Expected type \"x,\" got \"y\" instead:
When you set parsable-type on a type, then the message will be changed to Field is of type \"x\", \"y\" may not be parsable to \"x\"
"},{"location":"type-checker-for-pydantic/#set-parsable-type-in-pyprojecttoml","title":"Set parsable-type in pyproject.toml","text":"You should create pyproject.toml
in your project root. And, you define parsable-type like a example.
exapmle: pyproject.toml
[tool.pydantic-pycharm-plugin.parsable-types]\n\n# str field may parse int and float\nstr = [\"int\", \"float\"]\n\n# datetime.datetime field may parse int\n\"datetime.datetime\" = [ \"int\" ]\n\n# your_module.your_type field may parse str\n\"your_module.your_type\" = [ \"str\" ]\n\n[tool.pydantic-pycharm-plugin]\n# You can set higlith level (default is \"warning\")\n# You can select it from \"warning\", \"weak_warning\", \"disable\" \nparsable-type-highlight = \"warning\" \n\n## If you set acceptable-type-highlight then, you have to set it at same depth.\nacceptable-type-highlight = \"disable\" \n
"},{"location":"type-checker-for-pydantic/#acceptable-type","title":"Acceptable Type","text":"Info
This feature is in version 0.1.3 or later.
Pydantic can always parse a few types to other types. For example, int
to str
. It always succeeds. You can set it as an acceptable type. The message is Field is of type 'x', 'y' is set as an acceptable type in pyproject.toml
. Also,You may want to disable the message.You can do it, by setting \"disable\" on acceptable-type-highlight
.
"},{"location":"type-checker-for-pydantic/#set-acceptable-type-in-pyprojecttoml","title":"Set acceptable-type in pyproject.toml","text":"You should create pyproject.toml
in your project root. And, you define acceptable-type like a example.
exapmle: pyproject.toml
[tool.pydantic-pycharm-plugin.acceptable-types]\n\n# str field accepts to parse int and float\nstr = [\"int\", \"float\"]\n\n# datetime.datetime field may parse int\n\"datetime.datetime\" = [ \"int\" ]\n\n[tool.pydantic-pycharm-plugin]\n# You can set higlith level (default is \"weak_warning\")\n# You can select it from \"warning\", \"weak_warning\", \"disable\" \nacceptable-type-highlight = \"disable\" \n\n# If you set parsable-type-highlight then, you have to set it at same depth.\nparsable-type-highlight = \"warning\" \n
"}]}
\ No newline at end of file
diff --git a/sitemap.xml b/sitemap.xml
index 5bb1309c..9e6080ec 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -2,42 +2,42 @@
https://koxudaxi.github.io/pydantic-pycharm-plugin/
- 2024-04-15
+ 2024-04-22
daily
https://koxudaxi.github.io/pydantic-pycharm-plugin/CHANGELOG/
- 2024-04-15
+ 2024-04-22
daily
https://koxudaxi.github.io/pydantic-pycharm-plugin/development/
- 2024-04-15
+ 2024-04-22
daily
https://koxudaxi.github.io/pydantic-pycharm-plugin/ignore-init-arguments/
- 2024-04-15
+ 2024-04-22
daily
https://koxudaxi.github.io/pydantic-pycharm-plugin/ignore-init-keyword-arguments/
- 2024-04-15
+ 2024-04-22
daily
https://koxudaxi.github.io/pydantic-pycharm-plugin/install/
- 2024-04-15
+ 2024-04-22
daily
https://koxudaxi.github.io/pydantic-pycharm-plugin/mypy-compatible/
- 2024-04-15
+ 2024-04-22
daily
https://koxudaxi.github.io/pydantic-pycharm-plugin/type-checker-for-pydantic/
- 2024-04-15
+ 2024-04-22
daily
\ No newline at end of file
diff --git a/sitemap.xml.gz b/sitemap.xml.gz
index 6b184a4f..82a27d33 100644
Binary files a/sitemap.xml.gz and b/sitemap.xml.gz differ