From 781b6b69c4ff4c3f4555520a86c481edcb9832a5 Mon Sep 17 00:00:00 2001 From: Koudai Aono Date: Mon, 9 Oct 2023 03:14:38 +0900 Subject: [PATCH] Support 2023.3 EAP (#813) * Support 2023.3 EAP * Fix unittest * Fix unittest * Bump version --- CHANGELOG.md | 1 + gradle.properties | 4 ++-- testData/typeinspection/dynamicModel.py | 8 ++++---- testData/typeinspectionv18/dataclass.py | 4 ++-- testData/typeinspectionv18/dynamicModel.py | 8 ++++---- testData/typeinspectionv18/genericModel.py | 18 +++++++++--------- testData/typeinspectionv18/sqlModel.py | 2 +- 7 files changed, 23 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ebd148af..d1a23d9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## [Unreleased] +- Support 2023.3 EAP [[#813](https://github.com/koxudaxi/pydantic-pycharm-plugin/pull/813)] ## [0.4.8] - 2023-09-14 diff --git a/gradle.properties b/gradle.properties index 43c61e9a..f831be0f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,11 +8,11 @@ pluginVersion = 0.4.8 # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html pluginSinceBuild = 232 -pluginUntilBuild = 232.* +pluginUntilBuild = 233.* # IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension platformType = PC -platformVersion = 232.7295.8-EAP-SNAPSHOT +platformVersion = 233.9102.128-EAP-SNAPSHOT # Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html # Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22 diff --git a/testData/typeinspection/dynamicModel.py b/testData/typeinspection/dynamicModel.py index 66cf12ab..1a2dfc60 100644 --- a/testData/typeinspection/dynamicModel.py +++ b/testData/typeinspection/dynamicModel.py @@ -8,7 +8,7 @@ class StaticFoobarModel(BaseModel): DynamicFoobarModel(foo='name', bar=123) -DynamicFoobarModel(foo=123, bar='name') +DynamicFoobarModel(foo=123, bar='name') BarModel = create_model( model_name='BarModel', @@ -18,7 +18,7 @@ class StaticFoobarModel(BaseModel): ) BarModel(foo='name', bar=123, apple='green', banana='red') -BarModel(foo=123, bar='name', apple=123, banana=456) +BarModel(foo=123, bar='name', apple=123, banana=456) model_name = 'DynamicBarModel' DynamicBarModel = create_model( @@ -29,12 +29,12 @@ class StaticFoobarModel(BaseModel): ) DynamicBarModel(foo='name', bar=123, apple='green', banana='red') -DynamicBarModel(foo=123, bar='name', apple=123, banana=456) +DynamicBarModel(foo=123, bar='name', apple=123, banana=456) DynamicModifiedBarModel = create_model('DynamicModifiedFoobarModel', foo=(int, ...), bar='abc', __base__=DynamicBarModel) DynamicModifiedBarModel(foo=456, bar='efg', apple='green', banana='red') -DynamicModifiedBarModel(foo='123', bar=456, apple=123, banana=456) +DynamicModifiedBarModel(foo='123', bar=456, apple=123, banana=456) DynamicBrokenModel = create_model( diff --git a/testData/typeinspectionv18/dataclass.py b/testData/typeinspectionv18/dataclass.py index 4dbfe83d..82ed9c6b 100644 --- a/testData/typeinspectionv18/dataclass.py +++ b/testData/typeinspectionv18/dataclass.py @@ -25,10 +25,10 @@ class ChildDataclass(MyDataclass): d: int MyDataclass(a='apple', b=1) -MyDataclass(a=2, b='orange') +MyDataclass(a=2, b='orange') ChildDataclass(a='apple', b=1, c='berry', d=3) -ChildDataclass(a=2, b='orange', c=4, d='cherry') +ChildDataclass(a=2, b='orange', c=4, d='cherry') a: MyDataclass = MyDataclass() diff --git a/testData/typeinspectionv18/dynamicModel.py b/testData/typeinspectionv18/dynamicModel.py index 5bf9265b..e0535a22 100644 --- a/testData/typeinspectionv18/dynamicModel.py +++ b/testData/typeinspectionv18/dynamicModel.py @@ -8,7 +8,7 @@ class StaticFoobarModel(BaseModel): DynamicFoobarModel(foo='name', bar=123) -DynamicFoobarModel(foo=123, bar='name') +DynamicFoobarModel(foo=123, bar='name') BarModel = create_model( __model_name='BarModel', @@ -18,7 +18,7 @@ class StaticFoobarModel(BaseModel): ) BarModel(foo='name', bar=123, apple='green', banana='red') -BarModel(foo=123, bar='name', apple=123, banana=456) +BarModel(foo=123, bar='name', apple=123, banana=456) model_name = 'DynamicBarModel' DynamicBarModel = create_model( @@ -29,9 +29,9 @@ class StaticFoobarModel(BaseModel): ) DynamicBarModel(foo='name', bar=123, apple='green', banana='red') -DynamicBarModel(foo=123, bar='name', apple=123, banana=456) +DynamicBarModel(foo=123, bar='name', apple=123, banana=456) DynamicModifiedBarModel = create_model('DynamicModifiedFoobarModel', foo=(int, ...), bar='abc', __base__=DynamicBarModel) DynamicModifiedBarModel(foo=456, bar='efg', apple='green', banana='red') -DynamicModifiedBarModel(foo='123', bar=456, apple=123, banana=456) +DynamicModifiedBarModel(foo='123', bar=456, apple=123, banana=456) diff --git a/testData/typeinspectionv18/genericModel.py b/testData/typeinspectionv18/genericModel.py index 168c6d85..a47d35d6 100644 --- a/testData/typeinspectionv18/genericModel.py +++ b/testData/typeinspectionv18/genericModel.py @@ -59,7 +59,7 @@ class ChildClass(BaseClass[int, TypeY], Generic[TypeY, TypeZ]): # Replace TypeY by str ChildClass[str, float](x=1, y='y', z=3.1) -ChildClass[float, bytes](x=b'1', y='y', z=1_3) +ChildClass[float, bytes](x=b'1', y='y', z=1_3) DataT = TypeVar('DataT') @@ -78,7 +78,7 @@ def __concrete_name__(cls: Type[Any], params: Tuple[Type[Any], ...]) -> str: Response[str](data=1) -Response[float](data='a') +Response[float](data='a') T = TypeVar('T') @@ -97,7 +97,7 @@ class OuterT(GenericModel, Generic[T]): OuterT[int](outer=1, nested=nested) nested = InnerT[str](inner='a') -OuterT[int](outer='a', nested=nested) +OuterT[int](outer='a', nested=nested) AT = TypeVar('AT') BT = TypeVar('BT') @@ -116,7 +116,7 @@ class Model(GenericModel, Generic[AT, BT]): typevar_model(a=1, b=1) -typevar_model(a='a', b='a') +typevar_model(a='a', b='a') concrete_model = typevar_model[int] concrete_model(a=1, b=1) @@ -142,7 +142,7 @@ class Model(GenericModel, Generic[CT, DT]): Model[int, int](a=[int], b=[2]) -Model[int, int](a=1, b='2') +Model[int, int](a=1, b='2') class Model(GenericModel, Generic[CT, DT, ET, FT]): a: CT @@ -167,7 +167,7 @@ class Model(GenericModel, Generic[CT]): Model[Union[int, float]](a=1) -Model[Union[int, float]](a='1') +Model[Union[int, float]](a='1') class Model(GenericModel, Generic[CT, DT]): a: CT @@ -178,7 +178,7 @@ def x(b: ET) -> ET: Model[x(int), Optional[x(int)]](a=1, b=2) -Model[x(int), Optional[x(int)]](a='1', b='2') +Model[x(int), Optional[x(int)]](a='1', b='2') class Model(GenericModel, Generic[CT, DT]): a: CT @@ -188,7 +188,7 @@ class Model(GenericModel, Generic[CT, DT]): Model[y, Optional[y]](a=1, b=2) -Model[y, Optional[y]](a='1', b='2') +Model[y, Optional[y]](a='1', b='2') class Model(GenericModel, Generic[CT, DT, ET, FT, aaaaaaaaaa]): @@ -196,4 +196,4 @@ class Model(GenericModel, Generic[CT, DT, ET, FT, aaaaaaaaaa]): b: List[aaaaa] c: Dict[ET, aaaaaaaa] -Model[aaaaaaaaaa, List[aaaaaa], Tuple[aaaaaaaaaa], Type[aaaaaaaaaaa]](a=int, b=[2], c={'c': 3}) \ No newline at end of file +Model[aaaaaaaaaa, List[aaaaaa], Tuple[aaaaaaaaaa], Type[aaaaaaaaaaa]](a=int, b=[2], c={'c': 3}) \ No newline at end of file diff --git a/testData/typeinspectionv18/sqlModel.py b/testData/typeinspectionv18/sqlModel.py index 46b3b0b2..57073cde 100644 --- a/testData/typeinspectionv18/sqlModel.py +++ b/testData/typeinspectionv18/sqlModel.py @@ -15,4 +15,4 @@ class Hero(SQLModel, table=True): hero_4 = Hero(secret_name="test") -hero_5 = Hero(name=123, secret_name=456, age="abc") \ No newline at end of file +hero_5 = Hero(name=123, secret_name=456, age="abc") \ No newline at end of file