From 096ccc9e30cdec0337eb7a0da603e0299d9df0d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=A7=91=F0=9F=8F=BB=E2=80=8D=F0=9F=92=BB=20Romain=20M?= =?UTF-8?q?arcadier?= Date: Wed, 3 Aug 2022 13:20:56 +0200 Subject: [PATCH] add pyright test to pacmak suite --- packages/jsii-pacmak/lib/targets/python.ts | 83 +-- packages/jsii-pacmak/package.json | 3 +- .../__snapshots__/examples.test.js.snap | 20 +- .../prerelease-identifiers.test.js.snap | 24 + .../__snapshots__/target-python.test.js.snap | 693 +++++++++--------- .../test/generated-code/harness.ts | 44 +- .../generated-code/python-pyright.test.ts | 80 ++ yarn.lock | 5 + 8 files changed, 561 insertions(+), 391 deletions(-) create mode 100644 packages/jsii-pacmak/test/generated-code/python-pyright.test.ts diff --git a/packages/jsii-pacmak/lib/targets/python.ts b/packages/jsii-pacmak/lib/targets/python.ts index b25b5f4bb9..b7097fce15 100644 --- a/packages/jsii-pacmak/lib/targets/python.ts +++ b/packages/jsii-pacmak/lib/targets/python.ts @@ -627,7 +627,6 @@ abstract class BaseMethod implements PythonBase { const decorators = new Array(); if (this.jsName !== undefined) { - // "# type: ignore[misc]" needed because mypy does not know how to check decorated declarations decorators.push(`@jsii.member(jsii_name="${this.jsName}")`); } @@ -640,10 +639,7 @@ abstract class BaseMethod implements PythonBase { } if (decorators.length > 0) { - // "# type: ignore[misc]" needed because mypy does not know how to check decorated declarations - for (const decorator of decorators - .join(' # type: ignore[misc]\n') - .split('\n')) { + for (const decorator of decorators) { code.line(decorator); } } @@ -655,14 +651,7 @@ abstract class BaseMethod implements PythonBase { ), ); - openSignature( - code, - 'def', - this.pythonName, - pythonParams, - false, - returnType, - ); + openSignature(code, 'def', this.pythonName, pythonParams, returnType); this.generator.emitDocString(code, this.apiLocation, this.docs, { arguments: documentableArgs, documentableItem: `method-${this.pythonName}`, @@ -895,8 +884,7 @@ abstract class BaseProperty implements PythonBase { const { renderAbstract = true, forceEmitBody = false } = opts ?? {}; const pythonType = toTypeName(this.type).pythonType(context); - // "# type: ignore[misc]" is needed because mypy cannot check decorated things - code.line(`@${this.decorator} # type: ignore[misc]`); + code.line(`@${this.decorator}`); code.line(`@jsii.member(jsii_name="${this.jsName}")`); if (renderAbstract && this.abstract) { code.line('@abc.abstractmethod'); @@ -906,8 +894,12 @@ abstract class BaseProperty implements PythonBase { 'def', this.pythonName, [this.implicitParameter], - true, pythonType, + // PyRight and MyPY both special-case @property, but not custom implementations such as our @classproperty... + // MyPY reports on the re-declaration, but PyRight reports on the initial declaration (duh!) + this.isStatic && !this.immutable + ? 'pyright: ignore [reportGeneralTypeIssues]' + : undefined, ); this.generator.emitDocString(code, this.apiLocation, this.docs, { documentableItem: `prop-${this.pythonName}`, @@ -927,6 +919,8 @@ abstract class BaseProperty implements PythonBase { if (!this.immutable) { code.line(); + // PyRight and MyPY both special-case @property, but not custom implementations such as our @classproperty... + // MyPY reports on the re-declaration, but PyRight reports on the initial declaration (duh!) code.line( `@${this.pythonName}.setter${ this.isStatic ? ' # type: ignore[no-redef]' : '' @@ -940,7 +934,6 @@ abstract class BaseProperty implements PythonBase { 'def', this.pythonName, [this.implicitParameter, `value: ${pythonType}`], - false, 'None', ); if ( @@ -1129,16 +1122,16 @@ class Struct extends BasePythonClassType { ? [implicitParameter, '*', ...kwargs] : [implicitParameter]; - openSignature(code, 'def', '__init__', constructorArguments, false, 'None'); + openSignature(code, 'def', '__init__', constructorArguments, 'None'); this.emitConstructorDocstring(code); // Re-type struct arguments that were passed as "dict". Do this before validating argument types... for (const member of members.filter((m) => m.isStruct(this.generator))) { // Note that "None" is NOT an instance of dict (that's convenient!) - const typeName = toTypeName(member.type.type).pythonType({ - ...context, - typeAnnotation: false, - }); + const typeName = toPythonFullName( + (member.type.type as spec.NamedTypeReference).fqn, + context.assembly, + ); code.openBlock(`if isinstance(${member.pythonName}, dict)`); code.line(`${member.pythonName} = ${typeName}(**${member.pythonName})`); code.closeBlock(); @@ -1193,7 +1186,7 @@ class Struct extends BasePythonClassType { const pythonType = member.typeAnnotation(context); code.line('@builtins.property'); - openSignature(code, 'def', member.pythonName, ['self'], true, pythonType); + openSignature(code, 'def', member.pythonName, ['self'], pythonType); member.emitDocString(code); // NOTE: No parameter to validate here, this is a getter. code.line( @@ -2170,6 +2163,12 @@ class Package { ); code.line(`requires = [${buildTools.map((x) => `"${x}"`).join(', ')}]`); code.line('build-backend = "setuptools.build_meta"'); + code.line(); + code.line('[tool.pyright]'); + code.line('defineConstant = { DEBUG = true }',); + code.line('pythonVersion = "3.7"'); + code.line('pythonPlatform = "All"'); + code.line('reportSelfClsParameterName = false'); code.closeFile('pyproject.toml'); // We also need to write out a MANIFEST.in to ensure that all of our required @@ -2994,16 +2993,16 @@ function openSignature( keyword: 'def', name: string, params: readonly string[], - trailingComma: boolean, returnType: string, + comment?: string, ): void; function openSignature( code: CodeMaker, keyword: 'class' | 'def', name: string, params: readonly string[], - trailingComma = false, returnType?: string, + lineComment?: string, ) { const prefix = `${keyword} ${name}`; const suffix = returnType ? ` -> ${returnType}` : ''; @@ -3015,10 +3014,10 @@ function openSignature( const join = ', '; const { elementsSize, joinSize } = totalSizeOf(params, join); - const hasComments = !params.some((param) => /# .+$/.exec(param)); + const hasComments = params.some((param) => /#\s*.+$/.exec(param) != null); if ( - hasComments && + !hasComments && TARGET_LINE_LENGTH > code.currentIndentLength + prefix.length + @@ -3027,27 +3026,20 @@ function openSignature( suffix.length + 2 ) { - code.openBlock(`${prefix}(${params.join(join)})${suffix}`); + code.indent( + `${prefix}(${params.join(join)})${suffix}:${ + lineComment ? ` # ${lineComment}` : '' + }`, + ); return; } code.indent(`${prefix}(`); - if ( - !hasComments && - TARGET_LINE_LENGTH > - code.currentIndentLength + - elementsSize + - joinSize + - (trailingComma ? 1 : 0) - ) { - code.line(`${params.join(join)}${trailingComma ? ',' : ''}`); - } else { - for (const param of params) { - code.line(param.replace(/(\s*# .+)?$/, ',$1')); - } + for (const param of params) { + code.line(param.replace(/(\s*# .+)?$/, ',$1')); } code.unindent(false); - code.openBlock(`)${suffix}`); + code.indent(`)${suffix}:${lineComment ? ` # ${lineComment}` : ''}`); } /** @@ -3063,7 +3055,7 @@ function emitParameterTypeChecks( typedEntity: string, ): void { const paramInfo = params.map((param) => { - const [name] = param.split(/\s*[:=]\s*/, 1); + const [name] = param.split(/\s*[:=#]\s*/, 1); if (name === '*') { return { kwargsMark: true }; } else if (name.startsWith('*')) { @@ -3094,14 +3086,17 @@ function emitParameterTypeChecks( } let expectedType = `${typesVar}[${JSON.stringify(name)}]`; + let comment = ''; if (is_rest) { // This is a vararg, so the value will appear as a tuple. expectedType = `typing.Tuple[${expectedType}, ...]`; + // Need to ignore reportGeneralTypeIssues because pyright incorrectly parses that as a type annotation 😒 + comment = ' # pyright: ignore [reportGeneralTypeIssues]'; } code.line( `check_type(argname=${JSON.stringify( `argument ${name}`, - )}, value=${name}, expected_type=${expectedType})`, + )}, value=${name}, expected_type=${expectedType})${comment}`, ); } if (openedBlock) { diff --git a/packages/jsii-pacmak/package.json b/packages/jsii-pacmak/package.json index 4f302ba65a..697609fee2 100644 --- a/packages/jsii-pacmak/package.json +++ b/packages/jsii-pacmak/package.json @@ -62,7 +62,8 @@ "@types/semver": "^7.3.10", "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", - "jsii-calc": "^3.20.120" + "jsii-calc": "^3.20.120", + "pyright": "^1.1.265" }, "keywords": [ "jsii", diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/examples.test.js.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/examples.test.js.snap index d4a153b75e..d124fce42b 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/examples.test.js.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/examples.test.js.snap @@ -1150,6 +1150,12 @@ exports[`diamond-struct-parameter.ts: /python/pyproject.toml 1`] = ` requires = ["setuptools~=62.1.0", "wheel~=0.37.1"] build-backend = "setuptools.build_meta" +[tool.pyright] +defineConstant = { DEBUG = true } +pythonVersion = "3.7" +pythonPlatform = "All" +reportSelfClsParameterName = false + `; exports[`diamond-struct-parameter.ts: /python/setup.py 1`] = ` @@ -1235,7 +1241,7 @@ from ._jsii import * class Consumer(metaclass=jsii.JSIIMeta, jsii_type="testpkg.Consumer"): - @jsii.member(jsii_name="consumeBaz") # type: ignore[misc] + @jsii.member(jsii_name="consumeBaz") @builtins.classmethod def consume_baz( cls, @@ -2467,6 +2473,12 @@ exports[`nested-types.ts: /python/pyproject.toml 1`] = ` requires = ["setuptools~=62.1.0", "wheel~=0.37.1"] build-backend = "setuptools.build_meta" +[tool.pyright] +defineConstant = { DEBUG = true } +pythonVersion = "3.7" +pythonPlatform = "All" +reportSelfClsParameterName = false + `; exports[`nested-types.ts: /python/setup.py 1`] = ` @@ -2595,7 +2607,7 @@ class Namespace1(metaclass=jsii.JSIIMeta, jsii_type="testpkg.Namespace1"): @jsii.interface(jsii_type="testpkg.Namespace1.IBar") class IBar(typing_extensions.Protocol): - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="bar") def bar(self) -> builtins.str: ... @@ -2608,7 +2620,7 @@ class Namespace1(metaclass=jsii.JSIIMeta, jsii_type="testpkg.Namespace1"): class _IBarProxy: __jsii_type__: typing.ClassVar[str] = "testpkg.Namespace1.IBar" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="bar") def bar(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "bar")) @@ -2637,7 +2649,7 @@ class Namespace2(metaclass=jsii.JSIIMeta, jsii_type="testpkg.Namespace2"): def __init__(self) -> None: jsii.create(self.__class__, self, []) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="done") def done(self) -> builtins.bool: return typing.cast(builtins.bool, jsii.get(self, "done")) diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/prerelease-identifiers.test.js.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/prerelease-identifiers.test.js.snap index 8f555c5f7b..3a02b3b4e0 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/prerelease-identifiers.test.js.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/prerelease-identifiers.test.js.snap @@ -419,6 +419,12 @@ exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /python/pyproject.toml 1 requires = ["setuptools~=62.1.0", "wheel~=0.37.1"] build-backend = "setuptools.build_meta" +[tool.pyright] +defineConstant = { DEBUG = true } +pythonVersion = "3.7" +pythonPlatform = "All" +reportSelfClsParameterName = false + `; exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /python/setup.py 1`] = ` @@ -931,6 +937,12 @@ exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /python/pyproject.tom requires = ["setuptools~=62.1.0", "wheel~=0.37.1"] build-backend = "setuptools.build_meta" +[tool.pyright] +defineConstant = { DEBUG = true } +pythonVersion = "3.7" +pythonPlatform = "All" +reportSelfClsParameterName = false + `; exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /python/setup.py 1`] = ` @@ -1423,6 +1435,12 @@ exports[`foo@2.0.0-rc.42: /python/pyproject.toml 1`] = ` requires = ["setuptools~=62.1.0", "wheel~=0.37.1"] build-backend = "setuptools.build_meta" +[tool.pyright] +defineConstant = { DEBUG = true } +pythonVersion = "3.7" +pythonPlatform = "All" +reportSelfClsParameterName = false + `; exports[`foo@2.0.0-rc.42: /python/setup.py 1`] = ` @@ -1912,6 +1930,12 @@ exports[`foo@4.5.6-pre.1337: /python/pyproject.toml 1`] = ` requires = ["setuptools~=62.1.0", "wheel~=0.37.1"] build-backend = "setuptools.build_meta" +[tool.pyright] +defineConstant = { DEBUG = true } +pythonVersion = "3.7" +pythonPlatform = "All" +reportSelfClsParameterName = false + `; exports[`foo@4.5.6-pre.1337: /python/setup.py 1`] = ` diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.js.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.js.snap index 611dbc084c..eae82c7d32 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.js.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.js.snap @@ -246,6 +246,12 @@ exports[`Generated code for "@scope/jsii-calc-base": /python/pyproject.t requires = ["setuptools~=62.1.0", "wheel~=0.37.1"] build-backend = "setuptools.build_meta" +[tool.pyright] +defineConstant = { DEBUG = true } +pythonVersion = "3.7" +pythonPlatform = "All" +reportSelfClsParameterName = false + `; exports[`Generated code for "@scope/jsii-calc-base": /python/setup.py 1`] = ` @@ -435,7 +441,7 @@ class StaticConsumer( def __init__(self) -> None: jsii.create(self.__class__, self, []) - @jsii.member(jsii_name="consume") # type: ignore[misc] + @jsii.member(jsii_name="consume") @builtins.classmethod def consume(cls, *args: typing.Any) -> None: ''' @@ -443,7 +449,7 @@ class StaticConsumer( ''' if __debug__: type_hints = typing.get_type_hints(StaticConsumer.consume) - check_type(argname="argument args", value=args, expected_type=typing.Tuple[type_hints["args"], ...]) + check_type(argname="argument args", value=args, expected_type=typing.Tuple[type_hints["args"], ...]) # pyright: ignore [reportGeneralTypeIssues] return typing.cast(None, jsii.sinvoke(cls, "consume", [*args])) @@ -738,6 +744,12 @@ exports[`Generated code for "@scope/jsii-calc-base-of-base": /python/pyp requires = ["setuptools~=62.1.0", "wheel~=0.37.1"] build-backend = "setuptools.build_meta" +[tool.pyright] +defineConstant = { DEBUG = true } +pythonVersion = "3.7" +pythonPlatform = "All" +reportSelfClsParameterName = false + `; exports[`Generated code for "@scope/jsii-calc-base-of-base": /python/setup.py 1`] = ` @@ -844,7 +856,7 @@ class StaticConsumer( metaclass=jsii.JSIIMeta, jsii_type="@scope/jsii-calc-base-of-base.StaticConsumer", ): - @jsii.member(jsii_name="consume") # type: ignore[misc] + @jsii.member(jsii_name="consume") @builtins.classmethod def consume(cls, *_args: typing.Any) -> None: ''' @@ -852,7 +864,7 @@ class StaticConsumer( ''' if __debug__: type_hints = typing.get_type_hints(StaticConsumer.consume) - check_type(argname="argument _args", value=_args, expected_type=typing.Tuple[type_hints["_args"], ...]) + check_type(argname="argument _args", value=_args, expected_type=typing.Tuple[type_hints["_args"], ...]) # pyright: ignore [reportGeneralTypeIssues] return typing.cast(None, jsii.sinvoke(cls, "consume", [*_args])) @@ -1202,6 +1214,12 @@ exports[`Generated code for "@scope/jsii-calc-lib": /python/pyproject.to requires = ["setuptools~=62.1.0", "wheel~=0.37.1"] build-backend = "setuptools.build_meta" +[tool.pyright] +defineConstant = { DEBUG = true } +pythonVersion = "3.7" +pythonPlatform = "All" +reportSelfClsParameterName = false + `; exports[`Generated code for "@scope/jsii-calc-lib": /python/setup.py 1`] = ` @@ -1469,7 +1487,7 @@ class IDoublable(typing_extensions.Protocol): :stability: deprecated ''' - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="doubleValue") def double_value(self) -> jsii.Number: ''' @@ -1486,7 +1504,7 @@ class _IDoublableProxy: __jsii_type__: typing.ClassVar[str] = "@scope/jsii-calc-lib.IDoublable" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="doubleValue") def double_value(self) -> jsii.Number: ''' @@ -1562,7 +1580,7 @@ class IThreeLevelsInterface( class _IThreeLevelsInterfaceProxy( - jsii.proxy_for(scope.jsii_calc_base.IBaseInterface) # type: ignore[misc] + jsii.proxy_for(scope.jsii_calc_base.IBaseInterface), # type: ignore[misc] ): '''(deprecated) Interface that inherits from packages 2 levels up the tree. @@ -1683,7 +1701,7 @@ class NumericValue( ''' return typing.cast(builtins.str, jsii.invoke(self, "toString", [])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="value") @abc.abstractmethod def value(self) -> jsii.Number: @@ -1695,9 +1713,10 @@ class NumericValue( class _NumericValueProxy( - NumericValue, jsii.proxy_for(scope.jsii_calc_base.Base) # type: ignore[misc] + NumericValue, + jsii.proxy_for(scope.jsii_calc_base.Base), # type: ignore[misc] ): - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="value") def value(self) -> jsii.Number: '''(deprecated) The value. @@ -1723,7 +1742,7 @@ class Operation( def __init__(self) -> None: jsii.create(self.__class__, self, []) - @jsii.member(jsii_name="toString") # type: ignore[misc] + @jsii.member(jsii_name="toString") @abc.abstractmethod def to_string(self) -> builtins.str: '''(deprecated) String representation of the value. @@ -1734,7 +1753,8 @@ class Operation( class _OperationProxy( - Operation, jsii.proxy_for(NumericValue) # type: ignore[misc] + Operation, + jsii.proxy_for(NumericValue), # type: ignore[misc] ): @jsii.member(jsii_name="toString") def to_string(self) -> builtins.str: @@ -1846,7 +1866,7 @@ class Number( check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.create(self.__class__, self, [value]) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="doubleValue") def double_value(self) -> jsii.Number: '''(deprecated) The number multiplied by 2. @@ -1855,7 +1875,7 @@ class Number( ''' return typing.cast(jsii.Number, jsii.get(self, "doubleValue")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="value") def value(self) -> jsii.Number: '''(deprecated) The number. @@ -1945,7 +1965,7 @@ class IReflectable(typing_extensions.Protocol): :stability: deprecated ''' - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="entries") def entries(self) -> typing.List["ReflectableEntry"]: ''' @@ -1961,7 +1981,7 @@ class _IReflectableProxy: __jsii_type__: typing.ClassVar[str] = "@scope/jsii-calc-lib.submodule.IReflectable" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="entries") def entries(self) -> typing.List["ReflectableEntry"]: ''' @@ -1997,7 +2017,7 @@ class NestingClass( ''' jsii.create(self.__class__, self, []) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="property") def property(self) -> builtins.str: ''' @@ -2481,6 +2501,12 @@ exports[`Generated code for "jsii-calc": /python/pyproject.toml 1`] = ` requires = ["setuptools~=62.1.0", "wheel~=0.37.1"] build-backend = "setuptools.build_meta" +[tool.pyright] +defineConstant = { DEBUG = true } +pythonVersion = "3.7" +pythonPlatform = "All" +reportSelfClsParameterName = false + `; exports[`Generated code for "jsii-calc": /python/setup.py 1`] = ` @@ -2643,7 +2669,7 @@ class AbstractClassBase( def __init__(self) -> None: jsii.create(self.__class__, self, []) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="abstractProperty") @abc.abstractmethod def abstract_property(self) -> builtins.str: @@ -2651,7 +2677,7 @@ class AbstractClassBase( class _AbstractClassBaseProxy(AbstractClassBase): - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="abstractProperty") def abstract_property(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "abstractProperty")) @@ -2675,7 +2701,7 @@ class AbstractClassReturner( def give_me_interface(self) -> "IInterfaceImplementedByAbstractClass": return typing.cast("IInterfaceImplementedByAbstractClass", jsii.invoke(self, "giveMeInterface", [])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="returnAbstractFromProperty") def return_abstract_from_property(self) -> AbstractClassBase: return typing.cast(AbstractClassBase, jsii.get(self, "returnAbstractFromProperty")) @@ -2690,7 +2716,7 @@ class AbstractSuite( def __init__(self) -> None: jsii.create(self.__class__, self, []) - @jsii.member(jsii_name="someMethod") # type: ignore[misc] + @jsii.member(jsii_name="someMethod") @abc.abstractmethod def _some_method(self, str: builtins.str) -> builtins.str: ''' @@ -2709,7 +2735,7 @@ class AbstractSuite( check_type(argname="argument seed", value=seed, expected_type=type_hints["seed"]) return typing.cast(builtins.str, jsii.invoke(self, "workItAll", [seed])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="property") @abc.abstractmethod def _property(self) -> builtins.str: @@ -2732,7 +2758,7 @@ class _AbstractSuiteProxy(AbstractSuite): check_type(argname="argument str", value=str, expected_type=type_hints["str"]) return typing.cast(builtins.str, jsii.invoke(self, "someMethod", [str])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="property") def _property(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "property")) @@ -2782,12 +2808,12 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): check_type(argname="argument value", value=value, expected_type=type_hints["value"]) return typing.cast("StringEnum", jsii.invoke(self, "enumMethod", [value])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="enumPropertyValue") def enum_property_value(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.get(self, "enumPropertyValue")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="anyArrayProperty") def any_array_property(self) -> typing.List[typing.Any]: return typing.cast(typing.List[typing.Any], jsii.get(self, "anyArrayProperty")) @@ -2799,7 +2825,7 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "anyArrayProperty", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="anyMapProperty") def any_map_property(self) -> typing.Mapping[builtins.str, typing.Any]: return typing.cast(typing.Mapping[builtins.str, typing.Any], jsii.get(self, "anyMapProperty")) @@ -2811,7 +2837,7 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "anyMapProperty", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="anyProperty") def any_property(self) -> typing.Any: return typing.cast(typing.Any, jsii.get(self, "anyProperty")) @@ -2823,7 +2849,7 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "anyProperty", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="arrayProperty") def array_property(self) -> typing.List[builtins.str]: return typing.cast(typing.List[builtins.str], jsii.get(self, "arrayProperty")) @@ -2835,7 +2861,7 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "arrayProperty", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="booleanProperty") def boolean_property(self) -> builtins.bool: return typing.cast(builtins.bool, jsii.get(self, "booleanProperty")) @@ -2847,7 +2873,7 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "booleanProperty", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="dateProperty") def date_property(self) -> datetime.datetime: return typing.cast(datetime.datetime, jsii.get(self, "dateProperty")) @@ -2859,7 +2885,7 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "dateProperty", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="enumProperty") def enum_property(self) -> "AllTypesEnum": return typing.cast("AllTypesEnum", jsii.get(self, "enumProperty")) @@ -2871,7 +2897,7 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "enumProperty", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="jsonProperty") def json_property(self) -> typing.Mapping[typing.Any, typing.Any]: return typing.cast(typing.Mapping[typing.Any, typing.Any], jsii.get(self, "jsonProperty")) @@ -2883,7 +2909,7 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "jsonProperty", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="mapProperty") def map_property(self) -> typing.Mapping[builtins.str, scope.jsii_calc_lib.Number]: return typing.cast(typing.Mapping[builtins.str, scope.jsii_calc_lib.Number], jsii.get(self, "mapProperty")) @@ -2898,7 +2924,7 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "mapProperty", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="numberProperty") def number_property(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.get(self, "numberProperty")) @@ -2910,7 +2936,7 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "numberProperty", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="stringProperty") def string_property(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "stringProperty")) @@ -2922,7 +2948,7 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "stringProperty", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="unionArrayProperty") def union_array_property( self, @@ -2939,7 +2965,7 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "unionArrayProperty", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="unionMapProperty") def union_map_property( self, @@ -2956,7 +2982,7 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "unionMapProperty", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="unionProperty") def union_property( self, @@ -2973,7 +2999,7 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "unionProperty", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="unknownArrayProperty") def unknown_array_property(self) -> typing.List[typing.Any]: return typing.cast(typing.List[typing.Any], jsii.get(self, "unknownArrayProperty")) @@ -2985,7 +3011,7 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "unknownArrayProperty", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="unknownMapProperty") def unknown_map_property(self) -> typing.Mapping[builtins.str, typing.Any]: return typing.cast(typing.Mapping[builtins.str, typing.Any], jsii.get(self, "unknownMapProperty")) @@ -3000,7 +3026,7 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "unknownMapProperty", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="unknownProperty") def unknown_property(self) -> typing.Any: return typing.cast(typing.Any, jsii.get(self, "unknownProperty")) @@ -3012,7 +3038,7 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "unknownProperty", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="optionalEnumValue") def optional_enum_value(self) -> typing.Optional["StringEnum"]: return typing.cast(typing.Optional["StringEnum"], jsii.get(self, "optionalEnumValue")) @@ -3113,12 +3139,12 @@ class AmbiguousParameters( jsii.create(self.__class__, self, [scope_, props_]) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="props") def props(self) -> "StructParameterType": return typing.cast("StructParameterType", jsii.get(self, "props")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="scope") def scope(self) -> "Bell": return typing.cast("Bell", jsii.get(self, "scope")) @@ -3190,7 +3216,7 @@ class BaseClass(metaclass=jsii.JSIIAbstractClass, jsii_type="jsii-calc.BaseClass def method(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.invoke(self, "method", [])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="property") def property(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "property")) @@ -3237,13 +3263,13 @@ class BinaryOperation( '''Say hello!''' return typing.cast(builtins.str, jsii.invoke(self, "hello", [])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="lhs") def lhs(self) -> scope.jsii_calc_lib.NumericValue: '''Left-hand side operand.''' return typing.cast(scope.jsii_calc_lib.NumericValue, jsii.get(self, "lhs")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="rhs") def rhs(self) -> scope.jsii_calc_lib.NumericValue: '''Right-hand side operand.''' @@ -3251,7 +3277,8 @@ class BinaryOperation( class _BinaryOperationProxy( - BinaryOperation, jsii.proxy_for(scope.jsii_calc_lib.Operation) # type: ignore[misc] + BinaryOperation, + jsii.proxy_for(scope.jsii_calc_lib.Operation), # type: ignore[misc] ): pass @@ -3272,7 +3299,7 @@ class BurriedAnonymousObject( def check(self) -> builtins.bool: return typing.cast(builtins.bool, jsii.invoke(self, "check", [])) - @jsii.member(jsii_name="giveItBack") # type: ignore[misc] + @jsii.member(jsii_name="giveItBack") @abc.abstractmethod def give_it_back(self, value: typing.Any) -> typing.Any: '''Implement this method and have it return it's parameter. @@ -3386,19 +3413,19 @@ class Calculator( '''Returns teh value of the union property (if defined).''' return typing.cast(jsii.Number, jsii.invoke(self, "readUnionValue", [])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="expression") def expression(self) -> scope.jsii_calc_lib.NumericValue: '''Returns the expression.''' return typing.cast(scope.jsii_calc_lib.NumericValue, jsii.get(self, "expression")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="operationsLog") def operations_log(self) -> typing.List[scope.jsii_calc_lib.NumericValue]: '''A log of all operations.''' return typing.cast(typing.List[scope.jsii_calc_lib.NumericValue], jsii.get(self, "operationsLog")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="operationsMap") def operations_map( self, @@ -3406,7 +3433,7 @@ class Calculator( '''A map of per operation name of all operations performed.''' return typing.cast(typing.Mapping[builtins.str, typing.List[scope.jsii_calc_lib.NumericValue]], jsii.get(self, "operationsMap")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="curr") def curr(self) -> scope.jsii_calc_lib.NumericValue: '''The current value.''' @@ -3419,7 +3446,7 @@ class Calculator( check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "curr", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="maxValue") def max_value(self) -> typing.Optional[jsii.Number]: '''The maximum value allows in this calculator.''' @@ -3432,7 +3459,7 @@ class Calculator( check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "maxValue", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="unionProperty") def union_property( self, @@ -3529,19 +3556,19 @@ class ClassWithCollections( check_type(argname="argument array", value=array, expected_type=type_hints["array"]) jsii.create(self.__class__, self, [map, array]) - @jsii.member(jsii_name="createAList") # type: ignore[misc] + @jsii.member(jsii_name="createAList") @builtins.classmethod def create_a_list(cls) -> typing.List[builtins.str]: return typing.cast(typing.List[builtins.str], jsii.sinvoke(cls, "createAList", [])) - @jsii.member(jsii_name="createAMap") # type: ignore[misc] + @jsii.member(jsii_name="createAMap") @builtins.classmethod def create_a_map(cls) -> typing.Mapping[builtins.str, builtins.str]: return typing.cast(typing.Mapping[builtins.str, builtins.str], jsii.sinvoke(cls, "createAMap", [])) - @jsii.python.classproperty # type: ignore[misc] + @jsii.python.classproperty @jsii.member(jsii_name="staticArray") - def static_array(cls) -> typing.List[builtins.str]: + def static_array(cls) -> typing.List[builtins.str]: # pyright: ignore [reportGeneralTypeIssues] return typing.cast(typing.List[builtins.str], jsii.sget(cls, "staticArray")) @static_array.setter # type: ignore[no-redef] @@ -3551,9 +3578,9 @@ class ClassWithCollections( check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.sset(cls, "staticArray", value) - @jsii.python.classproperty # type: ignore[misc] + @jsii.python.classproperty @jsii.member(jsii_name="staticMap") - def static_map(cls) -> typing.Mapping[builtins.str, builtins.str]: + def static_map(cls) -> typing.Mapping[builtins.str, builtins.str]: # pyright: ignore [reportGeneralTypeIssues] return typing.cast(typing.Mapping[builtins.str, builtins.str], jsii.sget(cls, "staticMap")) @static_map.setter # type: ignore[no-redef] @@ -3563,7 +3590,7 @@ class ClassWithCollections( check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.sset(cls, "staticMap", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="array") def array(self) -> typing.List[builtins.str]: return typing.cast(typing.List[builtins.str], jsii.get(self, "array")) @@ -3575,7 +3602,7 @@ class ClassWithCollections( check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "array", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="map") def map(self) -> typing.Mapping[builtins.str, builtins.str]: return typing.cast(typing.Mapping[builtins.str, builtins.str], jsii.get(self, "map")) @@ -3621,22 +3648,22 @@ class ClassWithContainerTypes( jsii.create(self.__class__, self, [array, record, obj, props]) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="array") def array(self) -> typing.List["DummyObj"]: return typing.cast(typing.List["DummyObj"], jsii.get(self, "array")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="obj") def obj(self) -> typing.Mapping[builtins.str, "DummyObj"]: return typing.cast(typing.Mapping[builtins.str, "DummyObj"], jsii.get(self, "obj")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="record") def record(self) -> typing.Mapping[builtins.str, "DummyObj"]: return typing.cast(typing.Mapping[builtins.str, "DummyObj"], jsii.get(self, "record")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="props") def props(self) -> typing.Optional["ContainerProps"]: return typing.cast(typing.Optional["ContainerProps"], jsii.get(self, "props")) @@ -3683,7 +3710,7 @@ class ClassWithJavaReservedWords( check_type(argname="argument assert_", value=assert_, expected_type=type_hints["assert_"]) return typing.cast(builtins.str, jsii.invoke(self, "import", [assert_])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="int") def int(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "int")) @@ -3696,7 +3723,7 @@ class ClassWithMutableObjectLiteralProperty( def __init__(self) -> None: jsii.create(self.__class__, self, []) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="mutableObject") def mutable_object(self) -> "IMutableObjectLiteral": return typing.cast("IMutableObjectLiteral", jsii.get(self, "mutableObject")) @@ -3718,17 +3745,17 @@ class ConfusingToJackson( :see: https://github.com/aws/aws-cdk/issues/4080 ''' - @jsii.member(jsii_name="makeInstance") # type: ignore[misc] + @jsii.member(jsii_name="makeInstance") @builtins.classmethod def make_instance(cls) -> "ConfusingToJackson": return typing.cast("ConfusingToJackson", jsii.sinvoke(cls, "makeInstance", [])) - @jsii.member(jsii_name="makeStructInstance") # type: ignore[misc] + @jsii.member(jsii_name="makeStructInstance") @builtins.classmethod def make_struct_instance(cls) -> "ConfusingToJacksonStruct": return typing.cast("ConfusingToJacksonStruct", jsii.sinvoke(cls, "makeStructInstance", [])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="unionProperty") def union_property( self, @@ -3804,37 +3831,37 @@ class Constructors(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Constructors"): def __init__(self) -> None: jsii.create(self.__class__, self, []) - @jsii.member(jsii_name="hiddenInterface") # type: ignore[misc] + @jsii.member(jsii_name="hiddenInterface") @builtins.classmethod def hidden_interface(cls) -> "IPublicInterface": return typing.cast("IPublicInterface", jsii.sinvoke(cls, "hiddenInterface", [])) - @jsii.member(jsii_name="hiddenInterfaces") # type: ignore[misc] + @jsii.member(jsii_name="hiddenInterfaces") @builtins.classmethod def hidden_interfaces(cls) -> typing.List["IPublicInterface"]: return typing.cast(typing.List["IPublicInterface"], jsii.sinvoke(cls, "hiddenInterfaces", [])) - @jsii.member(jsii_name="hiddenSubInterfaces") # type: ignore[misc] + @jsii.member(jsii_name="hiddenSubInterfaces") @builtins.classmethod def hidden_sub_interfaces(cls) -> typing.List["IPublicInterface"]: return typing.cast(typing.List["IPublicInterface"], jsii.sinvoke(cls, "hiddenSubInterfaces", [])) - @jsii.member(jsii_name="makeClass") # type: ignore[misc] + @jsii.member(jsii_name="makeClass") @builtins.classmethod def make_class(cls) -> "PublicClass": return typing.cast("PublicClass", jsii.sinvoke(cls, "makeClass", [])) - @jsii.member(jsii_name="makeInterface") # type: ignore[misc] + @jsii.member(jsii_name="makeInterface") @builtins.classmethod def make_interface(cls) -> "IPublicInterface": return typing.cast("IPublicInterface", jsii.sinvoke(cls, "makeInterface", [])) - @jsii.member(jsii_name="makeInterface2") # type: ignore[misc] + @jsii.member(jsii_name="makeInterface2") @builtins.classmethod def make_interface2(cls) -> "IPublicInterface2": return typing.cast("IPublicInterface2", jsii.sinvoke(cls, "makeInterface2", [])) - @jsii.member(jsii_name="makeInterfaces") # type: ignore[misc] + @jsii.member(jsii_name="makeInterfaces") @builtins.classmethod def make_interfaces(cls) -> typing.List["IPublicInterface"]: return typing.cast(typing.List["IPublicInterface"], jsii.sinvoke(cls, "makeInterfaces", [])) @@ -3871,7 +3898,7 @@ class ConsumerCanRingBell( def __init__(self) -> None: jsii.create(self.__class__, self, []) - @jsii.member(jsii_name="staticImplementedByObjectLiteral") # type: ignore[misc] + @jsii.member(jsii_name="staticImplementedByObjectLiteral") @builtins.classmethod def static_implemented_by_object_literal( cls, @@ -3888,7 +3915,7 @@ class ConsumerCanRingBell( check_type(argname="argument ringer", value=ringer, expected_type=type_hints["ringer"]) return typing.cast(builtins.bool, jsii.sinvoke(cls, "staticImplementedByObjectLiteral", [ringer])) - @jsii.member(jsii_name="staticImplementedByPrivateClass") # type: ignore[misc] + @jsii.member(jsii_name="staticImplementedByPrivateClass") @builtins.classmethod def static_implemented_by_private_class( cls, @@ -3905,7 +3932,7 @@ class ConsumerCanRingBell( check_type(argname="argument ringer", value=ringer, expected_type=type_hints["ringer"]) return typing.cast(builtins.bool, jsii.sinvoke(cls, "staticImplementedByPrivateClass", [ringer])) - @jsii.member(jsii_name="staticImplementedByPublicClass") # type: ignore[misc] + @jsii.member(jsii_name="staticImplementedByPublicClass") @builtins.classmethod def static_implemented_by_public_class(cls, ringer: "IBellRinger") -> builtins.bool: '''...if the interface is implemented using a public class. @@ -3919,7 +3946,7 @@ class ConsumerCanRingBell( check_type(argname="argument ringer", value=ringer, expected_type=type_hints["ringer"]) return typing.cast(builtins.bool, jsii.sinvoke(cls, "staticImplementedByPublicClass", [ringer])) - @jsii.member(jsii_name="staticWhenTypedAsClass") # type: ignore[misc] + @jsii.member(jsii_name="staticWhenTypedAsClass") @builtins.classmethod def static_when_typed_as_class(cls, ringer: "IConcreteBellRinger") -> builtins.bool: '''If the parameter is a concrete class instead of an interface. @@ -4168,17 +4195,17 @@ class DefaultedConstructorArgument( check_type(argname="argument arg3", value=arg3, expected_type=type_hints["arg3"]) jsii.create(self.__class__, self, [arg1, arg2, arg3]) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="arg1") def arg1(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.get(self, "arg1")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="arg3") def arg3(self) -> datetime.datetime: return typing.cast(datetime.datetime, jsii.get(self, "arg3")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="arg2") def arg2(self) -> typing.Optional[builtins.str]: return typing.cast(typing.Optional[builtins.str], jsii.get(self, "arg2")) @@ -4194,13 +4221,13 @@ class Demonstrate982(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Demonstrate98 def __init__(self) -> None: jsii.create(self.__class__, self, []) - @jsii.member(jsii_name="takeThis") # type: ignore[misc] + @jsii.member(jsii_name="takeThis") @builtins.classmethod def take_this(cls) -> "ChildStruct982": '''It's dangerous to go alone!''' return typing.cast("ChildStruct982", jsii.sinvoke(cls, "takeThis", [])) - @jsii.member(jsii_name="takeThisToo") # type: ignore[misc] + @jsii.member(jsii_name="takeThisToo") @builtins.classmethod def take_this_too(cls) -> "ParentStruct982": '''It's dangerous to go alone!''' @@ -4242,7 +4269,7 @@ class DeprecatedClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DeprecatedCl ''' return typing.cast(None, jsii.invoke(self, "method", [])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="readonlyProperty") def readonly_property(self) -> builtins.str: ''' @@ -4252,7 +4279,7 @@ class DeprecatedClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DeprecatedCl ''' return typing.cast(builtins.str, jsii.get(self, "readonlyProperty")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: ''' @@ -4792,7 +4819,7 @@ class DisappointingCollectionSource( This source of collections is disappointing - it'll always give you nothing :( ''' - @jsii.python.classproperty # type: ignore[misc] + @jsii.python.classproperty @jsii.member(jsii_name="maybeList") def MAYBE_LIST(cls) -> typing.Optional[typing.List[builtins.str]]: '''Some List of strings, maybe? @@ -4801,7 +4828,7 @@ class DisappointingCollectionSource( ''' return typing.cast(typing.Optional[typing.List[builtins.str]], jsii.sget(cls, "maybeList")) - @jsii.python.classproperty # type: ignore[misc] + @jsii.python.classproperty @jsii.member(jsii_name="maybeMap") def MAYBE_MAP(cls) -> typing.Optional[typing.Mapping[builtins.str, jsii.Number]]: '''Some Map of strings to numbers, maybe? @@ -4933,7 +4960,7 @@ class DontComplainAboutVariadicAfterOptional( if __debug__: type_hints = typing.get_type_hints(DontComplainAboutVariadicAfterOptional.optional_and_variadic) check_type(argname="argument optional", value=optional, expected_type=type_hints["optional"]) - check_type(argname="argument things", value=things, expected_type=typing.Tuple[type_hints["things"], ...]) + check_type(argname="argument things", value=things, expected_type=typing.Tuple[type_hints["things"], ...]) # pyright: ignore [reportGeneralTypeIssues] return typing.cast(builtins.str, jsii.invoke(self, "optionalAndVariadic", [optional, *things])) @@ -4987,7 +5014,7 @@ class DynamicPropertyBearer( check_type(argname="argument value_store", value=value_store, expected_type=type_hints["value_store"]) jsii.create(self.__class__, self, [value_store]) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="dynamicProperty") def dynamic_property(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "dynamicProperty")) @@ -4999,7 +5026,7 @@ class DynamicPropertyBearer( check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "dynamicProperty", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="valueStore") def value_store(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "valueStore")) @@ -5039,7 +5066,7 @@ class DynamicPropertyBearerChild( check_type(argname="argument new_value", value=new_value, expected_type=type_hints["new_value"]) return typing.cast(builtins.str, jsii.invoke(self, "overrideValue", [new_value])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="originalValue") def original_value(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "originalValue")) @@ -5066,7 +5093,7 @@ class Entropy(metaclass=jsii.JSIIAbstractClass, jsii_type="jsii-calc.Entropy"): ''' return typing.cast(builtins.str, jsii.invoke(self, "increase", [])) - @jsii.member(jsii_name="repeat") # type: ignore[misc] + @jsii.member(jsii_name="repeat") @abc.abstractmethod def repeat(self, word: builtins.str) -> builtins.str: '''Implement this method such that it returns \`\`word\`\`. @@ -5097,12 +5124,12 @@ typing.cast(typing.Any, Entropy).__jsii_proxy_class__ = lambda : _EntropyProxy class EnumDispenser(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.EnumDispenser"): - @jsii.member(jsii_name="randomIntegerLikeEnum") # type: ignore[misc] + @jsii.member(jsii_name="randomIntegerLikeEnum") @builtins.classmethod def random_integer_like_enum(cls) -> AllTypesEnum: return typing.cast(AllTypesEnum, jsii.sinvoke(cls, "randomIntegerLikeEnum", [])) - @jsii.member(jsii_name="randomStringLikeEnum") # type: ignore[misc] + @jsii.member(jsii_name="randomStringLikeEnum") @builtins.classmethod def random_string_like_enum(cls) -> "StringEnum": return typing.cast("StringEnum", jsii.sinvoke(cls, "randomStringLikeEnum", [])) @@ -5115,7 +5142,7 @@ class EraseUndefinedHashValues( def __init__(self) -> None: jsii.create(self.__class__, self, []) - @jsii.member(jsii_name="doesKeyExist") # type: ignore[misc] + @jsii.member(jsii_name="doesKeyExist") @builtins.classmethod def does_key_exist( cls, @@ -5136,13 +5163,13 @@ class EraseUndefinedHashValues( check_type(argname="argument key", value=key, expected_type=type_hints["key"]) return typing.cast(builtins.bool, jsii.sinvoke(cls, "doesKeyExist", [opts, key])) - @jsii.member(jsii_name="prop1IsNull") # type: ignore[misc] + @jsii.member(jsii_name="prop1IsNull") @builtins.classmethod def prop1_is_null(cls) -> typing.Mapping[builtins.str, typing.Any]: '''We expect "prop1" to be erased.''' return typing.cast(typing.Mapping[builtins.str, typing.Any], jsii.sinvoke(cls, "prop1IsNull", [])) - @jsii.member(jsii_name="prop2IsUndefined") # type: ignore[misc] + @jsii.member(jsii_name="prop2IsUndefined") @builtins.classmethod def prop2_is_undefined(cls) -> typing.Mapping[builtins.str, typing.Any]: '''We expect "prop2" to be erased.''' @@ -5229,7 +5256,7 @@ class ExperimentalClass( ''' return typing.cast(None, jsii.invoke(self, "method", [])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="readonlyProperty") def readonly_property(self) -> builtins.str: ''' @@ -5237,7 +5264,7 @@ class ExperimentalClass( ''' return typing.cast(builtins.str, jsii.get(self, "readonlyProperty")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: ''' @@ -5322,7 +5349,7 @@ class ExportedBaseClass( check_type(argname="argument success", value=success, expected_type=type_hints["success"]) jsii.create(self.__class__, self, [success]) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="success") def success(self) -> builtins.bool: return typing.cast(builtins.bool, jsii.get(self, "success")) @@ -5401,7 +5428,7 @@ class ExternalClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ExternalClass" ''' return typing.cast(None, jsii.invoke(self, "method", [])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="readonlyProperty") def readonly_property(self) -> builtins.str: ''' @@ -5409,7 +5436,7 @@ class ExternalClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ExternalClass" ''' return typing.cast(builtins.str, jsii.get(self, "readonlyProperty")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: ''' @@ -5585,7 +5612,7 @@ class GiveMeStructs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.GiveMeStructs" return typing.cast(jsii.Number, jsii.invoke(self, "readFirstNumber", [first])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="structLiteral") def struct_literal(self) -> scope.jsii_calc_lib.StructWithOnlyOptionals: return typing.cast(scope.jsii_calc_lib.StructWithOnlyOptionals, jsii.get(self, "structLiteral")) @@ -5680,7 +5707,7 @@ typing.cast(typing.Any, IAnonymousImplementationProvider).__jsii_proxy_class__ = @jsii.interface(jsii_type="jsii-calc.IAnonymouslyImplementMe") class IAnonymouslyImplementMe(typing_extensions.Protocol): - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="value") def value(self) -> jsii.Number: ... @@ -5693,7 +5720,7 @@ class IAnonymouslyImplementMe(typing_extensions.Protocol): class _IAnonymouslyImplementMeProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IAnonymouslyImplementMe" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="value") def value(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.get(self, "value")) @@ -5708,7 +5735,7 @@ typing.cast(typing.Any, IAnonymouslyImplementMe).__jsii_proxy_class__ = lambda : @jsii.interface(jsii_type="jsii-calc.IAnotherPublicInterface") class IAnotherPublicInterface(typing_extensions.Protocol): - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="a") def a(self) -> builtins.str: ... @@ -5721,7 +5748,7 @@ class IAnotherPublicInterface(typing_extensions.Protocol): class _IAnotherPublicInterfaceProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IAnotherPublicInterface" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="a") def a(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "a")) @@ -5825,7 +5852,7 @@ class IDeprecatedInterface(typing_extensions.Protocol): :stability: deprecated ''' - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: ''' @@ -5858,7 +5885,7 @@ class _IDeprecatedInterfaceProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IDeprecatedInterface" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: ''' @@ -5894,7 +5921,7 @@ class IExperimentalInterface(typing_extensions.Protocol): :stability: experimental ''' - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: ''' @@ -5921,7 +5948,7 @@ class _IExperimentalInterfaceProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IExperimentalInterface" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: ''' @@ -5949,12 +5976,12 @@ typing.cast(typing.Any, IExperimentalInterface).__jsii_proxy_class__ = lambda : @jsii.interface(jsii_type="jsii-calc.IExtendsPrivateInterface") class IExtendsPrivateInterface(typing_extensions.Protocol): - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="moreThings") def more_things(self) -> typing.List[builtins.str]: ... - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="private") def private(self) -> builtins.str: ... @@ -5967,12 +5994,12 @@ class IExtendsPrivateInterface(typing_extensions.Protocol): class _IExtendsPrivateInterfaceProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IExtendsPrivateInterface" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="moreThings") def more_things(self) -> typing.List[builtins.str]: return typing.cast(typing.List[builtins.str], jsii.get(self, "moreThings")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="private") def private(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "private")) @@ -5994,7 +6021,7 @@ class IExternalInterface(typing_extensions.Protocol): :external: true ''' - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: ''' @@ -6021,7 +6048,7 @@ class _IExternalInterfaceProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IExternalInterface" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: ''' @@ -6066,7 +6093,7 @@ class IFriendlier(scope.jsii_calc_lib.IFriendly, typing_extensions.Protocol): class _IFriendlierProxy( - jsii.proxy_for(scope.jsii_calc_lib.IFriendly) # type: ignore[misc] + jsii.proxy_for(scope.jsii_calc_lib.IFriendly), # type: ignore[misc] ): '''Even friendlier classes can implement this interface.''' @@ -6091,7 +6118,7 @@ typing.cast(typing.Any, IFriendlier).__jsii_proxy_class__ = lambda : _IFriendlie @jsii.interface(jsii_type="jsii-calc.IIndirectlyImplemented") class IIndirectlyImplemented(typing_extensions.Protocol): - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="property") def property(self) -> builtins.str: ... @@ -6104,7 +6131,7 @@ class IIndirectlyImplemented(typing_extensions.Protocol): class _IIndirectlyImplementedProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IIndirectlyImplemented" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="property") def property(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "property")) @@ -6121,7 +6148,7 @@ typing.cast(typing.Any, IIndirectlyImplemented).__jsii_proxy_class__ = lambda : class IInterfaceImplementedByAbstractClass(typing_extensions.Protocol): '''awslabs/jsii#220 Abstract return type.''' - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="propFromInterface") def prop_from_interface(self) -> builtins.str: ... @@ -6132,7 +6159,7 @@ class _IInterfaceImplementedByAbstractClassProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IInterfaceImplementedByAbstractClass" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="propFromInterface") def prop_from_interface(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "propFromInterface")) @@ -6161,7 +6188,7 @@ typing.cast(typing.Any, IInterfaceWithInternal).__jsii_proxy_class__ = lambda : @jsii.interface(jsii_type="jsii-calc.IInterfaceWithMethods") class IInterfaceWithMethods(typing_extensions.Protocol): - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="value") def value(self) -> builtins.str: ... @@ -6174,7 +6201,7 @@ class IInterfaceWithMethods(typing_extensions.Protocol): class _IInterfaceWithMethodsProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IInterfaceWithMethods" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="value") def value(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "value")) @@ -6231,12 +6258,12 @@ typing.cast(typing.Any, IInterfaceWithOptionalMethodArguments).__jsii_proxy_clas @jsii.interface(jsii_type="jsii-calc.IInterfaceWithProperties") class IInterfaceWithProperties(typing_extensions.Protocol): - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="readOnlyString") def read_only_string(self) -> builtins.str: ... - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="readWriteString") def read_write_string(self) -> builtins.str: ... @@ -6249,12 +6276,12 @@ class IInterfaceWithProperties(typing_extensions.Protocol): class _IInterfaceWithPropertiesProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IInterfaceWithProperties" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="readOnlyString") def read_only_string(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "readOnlyString")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="readWriteString") def read_write_string(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "readWriteString")) @@ -6275,7 +6302,7 @@ class IInterfaceWithPropertiesExtension( IInterfaceWithProperties, typing_extensions.Protocol, ): - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="foo") def foo(self) -> jsii.Number: ... @@ -6286,11 +6313,11 @@ class IInterfaceWithPropertiesExtension( class _IInterfaceWithPropertiesExtensionProxy( - jsii.proxy_for(IInterfaceWithProperties) # type: ignore[misc] + jsii.proxy_for(IInterfaceWithProperties), # type: ignore[misc] ): __jsii_type__: typing.ClassVar[str] = "jsii-calc.IInterfaceWithPropertiesExtension" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="foo") def foo(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.get(self, "foo")) @@ -6308,7 +6335,7 @@ typing.cast(typing.Any, IInterfaceWithPropertiesExtension).__jsii_proxy_class__ @jsii.interface(jsii_type="jsii-calc.IJSII417PublicBaseOfBase") class IJSII417PublicBaseOfBase(typing_extensions.Protocol): - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="hasRoot") def has_root(self) -> builtins.bool: ... @@ -6321,7 +6348,7 @@ class IJSII417PublicBaseOfBase(typing_extensions.Protocol): class _IJSII417PublicBaseOfBaseProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IJSII417PublicBaseOfBase" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="hasRoot") def has_root(self) -> builtins.bool: return typing.cast(builtins.bool, jsii.get(self, "hasRoot")) @@ -6336,7 +6363,7 @@ typing.cast(typing.Any, IJSII417PublicBaseOfBase).__jsii_proxy_class__ = lambda @jsii.interface(jsii_type="jsii-calc.IJavaReservedWordsInAnInterface") class IJavaReservedWordsInAnInterface(typing_extensions.Protocol): - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="while") def while_(self) -> builtins.str: ... @@ -6549,7 +6576,7 @@ class IJavaReservedWordsInAnInterface(typing_extensions.Protocol): class _IJavaReservedWordsInAnInterfaceProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IJavaReservedWordsInAnInterface" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="while") def while_(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "while")) @@ -6803,7 +6830,7 @@ typing.cast(typing.Any, IJsii496).__jsii_proxy_class__ = lambda : _IJsii496Proxy @jsii.interface(jsii_type="jsii-calc.IMutableObjectLiteral") class IMutableObjectLiteral(typing_extensions.Protocol): - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="value") def value(self) -> builtins.str: ... @@ -6816,7 +6843,7 @@ class IMutableObjectLiteral(typing_extensions.Protocol): class _IMutableObjectLiteralProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IMutableObjectLiteral" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="value") def value(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "value")) @@ -6834,7 +6861,7 @@ typing.cast(typing.Any, IMutableObjectLiteral).__jsii_proxy_class__ = lambda : _ @jsii.interface(jsii_type="jsii-calc.INonInternalInterface") class INonInternalInterface(IAnotherPublicInterface, typing_extensions.Protocol): - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="b") def b(self) -> builtins.str: ... @@ -6843,7 +6870,7 @@ class INonInternalInterface(IAnotherPublicInterface, typing_extensions.Protocol) def b(self, value: builtins.str) -> None: ... - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="c") def c(self) -> builtins.str: ... @@ -6854,11 +6881,11 @@ class INonInternalInterface(IAnotherPublicInterface, typing_extensions.Protocol) class _INonInternalInterfaceProxy( - jsii.proxy_for(IAnotherPublicInterface) # type: ignore[misc] + jsii.proxy_for(IAnotherPublicInterface), # type: ignore[misc] ): __jsii_type__: typing.ClassVar[str] = "jsii-calc.INonInternalInterface" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="b") def b(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "b")) @@ -6870,7 +6897,7 @@ class _INonInternalInterfaceProxy( check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "b", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="c") def c(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "c")) @@ -6890,7 +6917,7 @@ typing.cast(typing.Any, INonInternalInterface).__jsii_proxy_class__ = lambda : _ class IObjectWithProperty(typing_extensions.Protocol): '''Make sure that setters are properly called on objects with interfaces.''' - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="property") def property(self) -> builtins.str: ... @@ -6909,7 +6936,7 @@ class _IObjectWithPropertyProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IObjectWithProperty" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="property") def property(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "property")) @@ -6953,7 +6980,7 @@ typing.cast(typing.Any, IOptionalMethod).__jsii_proxy_class__ = lambda : _IOptio @jsii.interface(jsii_type="jsii-calc.IPrivatelyImplemented") class IPrivatelyImplemented(typing_extensions.Protocol): - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="success") def success(self) -> builtins.bool: ... @@ -6962,7 +6989,7 @@ class IPrivatelyImplemented(typing_extensions.Protocol): class _IPrivatelyImplementedProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IPrivatelyImplemented" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="success") def success(self) -> builtins.bool: return typing.cast(builtins.bool, jsii.get(self, "success")) @@ -7041,7 +7068,7 @@ typing.cast(typing.Any, IRandomNumberGenerator).__jsii_proxy_class__ = lambda : class IReturnJsii976(typing_extensions.Protocol): '''Returns a subclass of a known class which implements an interface.''' - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="foo") def foo(self) -> jsii.Number: ... @@ -7052,7 +7079,7 @@ class _IReturnJsii976Proxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IReturnJsii976" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="foo") def foo(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.get(self, "foo")) @@ -7063,7 +7090,7 @@ typing.cast(typing.Any, IReturnJsii976).__jsii_proxy_class__ = lambda : _IReturn @jsii.interface(jsii_type="jsii-calc.IReturnsNumber") class IReturnsNumber(typing_extensions.Protocol): - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="numberProp") def number_prop(self) -> scope.jsii_calc_lib.Number: ... @@ -7076,7 +7103,7 @@ class IReturnsNumber(typing_extensions.Protocol): class _IReturnsNumberProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IReturnsNumber" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="numberProp") def number_prop(self) -> scope.jsii_calc_lib.Number: return typing.cast(scope.jsii_calc_lib.Number, jsii.get(self, "numberProp")) @@ -7091,7 +7118,7 @@ typing.cast(typing.Any, IReturnsNumber).__jsii_proxy_class__ = lambda : _IReturn @jsii.interface(jsii_type="jsii-calc.IStableInterface") class IStableInterface(typing_extensions.Protocol): - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: ... @@ -7108,7 +7135,7 @@ class IStableInterface(typing_extensions.Protocol): class _IStableInterfaceProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.IStableInterface" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) @@ -7181,7 +7208,7 @@ class ImplementInternalInterface( def __init__(self) -> None: jsii.create(self.__class__, self, []) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="prop") def prop(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "prop")) @@ -7198,7 +7225,7 @@ class Implementation(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Implementatio def __init__(self) -> None: jsii.create(self.__class__, self, []) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="value") def value(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.get(self, "value")) @@ -7233,7 +7260,7 @@ class ImplementsPrivateInterface( def __init__(self) -> None: jsii.create(self.__class__, self, []) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="private") def private(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "private")) @@ -7314,22 +7341,22 @@ class InterfaceCollections( See: https://github.com/aws/jsii/issues/1196 ''' - @jsii.member(jsii_name="listOfInterfaces") # type: ignore[misc] + @jsii.member(jsii_name="listOfInterfaces") @builtins.classmethod def list_of_interfaces(cls) -> typing.List[IBell]: return typing.cast(typing.List[IBell], jsii.sinvoke(cls, "listOfInterfaces", [])) - @jsii.member(jsii_name="listOfStructs") # type: ignore[misc] + @jsii.member(jsii_name="listOfStructs") @builtins.classmethod def list_of_structs(cls) -> typing.List["StructA"]: return typing.cast(typing.List["StructA"], jsii.sinvoke(cls, "listOfStructs", [])) - @jsii.member(jsii_name="mapOfInterfaces") # type: ignore[misc] + @jsii.member(jsii_name="mapOfInterfaces") @builtins.classmethod def map_of_interfaces(cls) -> typing.Mapping[builtins.str, IBell]: return typing.cast(typing.Mapping[builtins.str, IBell], jsii.sinvoke(cls, "mapOfInterfaces", [])) - @jsii.member(jsii_name="mapOfStructs") # type: ignore[misc] + @jsii.member(jsii_name="mapOfStructs") @builtins.classmethod def map_of_structs(cls) -> typing.Mapping[builtins.str, "StructA"]: return typing.cast(typing.Mapping[builtins.str, "StructA"], jsii.sinvoke(cls, "mapOfStructs", [])) @@ -7338,7 +7365,7 @@ class InterfaceCollections( class InterfacesMaker(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.InterfacesMaker"): '''We can return arrays of interfaces See aws/aws-cdk#2362.''' - @jsii.member(jsii_name="makeInterfaces") # type: ignore[misc] + @jsii.member(jsii_name="makeInterfaces") @builtins.classmethod def make_interfaces( cls, @@ -7401,7 +7428,7 @@ class JSII417PublicBaseOfBase( def __init__(self) -> None: jsii.create(self.__class__, self, []) - @jsii.member(jsii_name="makeInstance") # type: ignore[misc] + @jsii.member(jsii_name="makeInstance") @builtins.classmethod def make_instance(cls) -> "JSII417PublicBaseOfBase": return typing.cast("JSII417PublicBaseOfBase", jsii.sinvoke(cls, "makeInstance", [])) @@ -7410,7 +7437,7 @@ class JSII417PublicBaseOfBase( def foo(self) -> None: return typing.cast(None, jsii.invoke(self, "foo", [])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="hasRoot") def has_root(self) -> builtins.bool: return typing.cast(builtins.bool, jsii.get(self, "hasRoot")) @@ -7451,7 +7478,7 @@ class JSObjectLiteralToNativeClass( def __init__(self) -> None: jsii.create(self.__class__, self, []) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="propA") def prop_a(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "propA")) @@ -7463,7 +7490,7 @@ class JSObjectLiteralToNativeClass( check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "propA", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="propB") def prop_b(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.get(self, "propB")) @@ -7691,7 +7718,7 @@ class JavaReservedWords( def volatile(self) -> None: return typing.cast(None, jsii.invoke(self, "volatile", [])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="while") def while_(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "while")) @@ -7722,7 +7749,7 @@ class JsiiAgent(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.JsiiAgent"): def __init__(self) -> None: jsii.create(self.__class__, self, []) - @jsii.python.classproperty # type: ignore[misc] + @jsii.python.classproperty @jsii.member(jsii_name="value") def value(cls) -> typing.Optional[builtins.str]: '''Returns the value of the JSII_AGENT environment variable.''' @@ -7735,72 +7762,72 @@ class JsonFormatter(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.JsonFormatter" :see: https://github.com/aws/aws-cdk/issues/5066 ''' - @jsii.member(jsii_name="anyArray") # type: ignore[misc] + @jsii.member(jsii_name="anyArray") @builtins.classmethod def any_array(cls) -> typing.Any: return typing.cast(typing.Any, jsii.sinvoke(cls, "anyArray", [])) - @jsii.member(jsii_name="anyBooleanFalse") # type: ignore[misc] + @jsii.member(jsii_name="anyBooleanFalse") @builtins.classmethod def any_boolean_false(cls) -> typing.Any: return typing.cast(typing.Any, jsii.sinvoke(cls, "anyBooleanFalse", [])) - @jsii.member(jsii_name="anyBooleanTrue") # type: ignore[misc] + @jsii.member(jsii_name="anyBooleanTrue") @builtins.classmethod def any_boolean_true(cls) -> typing.Any: return typing.cast(typing.Any, jsii.sinvoke(cls, "anyBooleanTrue", [])) - @jsii.member(jsii_name="anyDate") # type: ignore[misc] + @jsii.member(jsii_name="anyDate") @builtins.classmethod def any_date(cls) -> typing.Any: return typing.cast(typing.Any, jsii.sinvoke(cls, "anyDate", [])) - @jsii.member(jsii_name="anyEmptyString") # type: ignore[misc] + @jsii.member(jsii_name="anyEmptyString") @builtins.classmethod def any_empty_string(cls) -> typing.Any: return typing.cast(typing.Any, jsii.sinvoke(cls, "anyEmptyString", [])) - @jsii.member(jsii_name="anyFunction") # type: ignore[misc] + @jsii.member(jsii_name="anyFunction") @builtins.classmethod def any_function(cls) -> typing.Any: return typing.cast(typing.Any, jsii.sinvoke(cls, "anyFunction", [])) - @jsii.member(jsii_name="anyHash") # type: ignore[misc] + @jsii.member(jsii_name="anyHash") @builtins.classmethod def any_hash(cls) -> typing.Any: return typing.cast(typing.Any, jsii.sinvoke(cls, "anyHash", [])) - @jsii.member(jsii_name="anyNull") # type: ignore[misc] + @jsii.member(jsii_name="anyNull") @builtins.classmethod def any_null(cls) -> typing.Any: return typing.cast(typing.Any, jsii.sinvoke(cls, "anyNull", [])) - @jsii.member(jsii_name="anyNumber") # type: ignore[misc] + @jsii.member(jsii_name="anyNumber") @builtins.classmethod def any_number(cls) -> typing.Any: return typing.cast(typing.Any, jsii.sinvoke(cls, "anyNumber", [])) - @jsii.member(jsii_name="anyRef") # type: ignore[misc] + @jsii.member(jsii_name="anyRef") @builtins.classmethod def any_ref(cls) -> typing.Any: return typing.cast(typing.Any, jsii.sinvoke(cls, "anyRef", [])) - @jsii.member(jsii_name="anyString") # type: ignore[misc] + @jsii.member(jsii_name="anyString") @builtins.classmethod def any_string(cls) -> typing.Any: return typing.cast(typing.Any, jsii.sinvoke(cls, "anyString", [])) - @jsii.member(jsii_name="anyUndefined") # type: ignore[misc] + @jsii.member(jsii_name="anyUndefined") @builtins.classmethod def any_undefined(cls) -> typing.Any: return typing.cast(typing.Any, jsii.sinvoke(cls, "anyUndefined", [])) - @jsii.member(jsii_name="anyZero") # type: ignore[misc] + @jsii.member(jsii_name="anyZero") @builtins.classmethod def any_zero(cls) -> typing.Any: return typing.cast(typing.Any, jsii.sinvoke(cls, "anyZero", [])) - @jsii.member(jsii_name="stringify") # type: ignore[misc] + @jsii.member(jsii_name="stringify") @builtins.classmethod def stringify(cls, value: typing.Any = None) -> typing.Optional[builtins.str]: ''' @@ -7827,7 +7854,7 @@ class LevelOne(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.LevelOne"): jsii.create(self.__class__, self, [props]) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="props") def props(self) -> "LevelOneProps": return typing.cast("LevelOneProps", jsii.get(self, "props")) @@ -7881,7 +7908,7 @@ class LevelOne(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.LevelOne"): :param prop: ''' if isinstance(prop, dict): - prop = PropBooleanValue(**prop) + prop = LevelOne.PropBooleanValue(**prop) if __debug__: type_hints = typing.get_type_hints(LevelOne.PropProperty.__init__) check_type(argname="argument prop", value=prop, expected_type=type_hints["prop"]) @@ -8090,7 +8117,7 @@ class MethodNamedProperty( def property(self) -> builtins.str: return typing.cast(builtins.str, jsii.invoke(self, "property", [])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="elite") def elite(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.get(self, "elite")) @@ -8140,7 +8167,7 @@ class Multiply( '''String representation of the value.''' return typing.cast(builtins.str, jsii.invoke(self, "toString", [])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="value") def value(self) -> jsii.Number: '''The value.''' @@ -8151,7 +8178,7 @@ class NestedClassInstance( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.NestedClassInstance", ): - @jsii.member(jsii_name="makeInstance") # type: ignore[misc] + @jsii.member(jsii_name="makeInstance") @builtins.classmethod def make_instance( cls, @@ -8228,7 +8255,7 @@ class NodeStandardLibrary( ''' return typing.cast(builtins.str, jsii.invoke(self, "fsReadFileSync", [])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="osPlatform") def os_platform(self) -> builtins.str: '''Returns the current os.platform() from the "os" node module.''' @@ -8284,7 +8311,7 @@ class NullShouldBeTreatedAsUndefined( def verify_property_is_undefined(self) -> None: return typing.cast(None, jsii.invoke(self, "verifyPropertyIsUndefined", [])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="changeMeToUndefined") def change_me_to_undefined(self) -> typing.Optional[builtins.str]: return typing.cast(typing.Optional[builtins.str], jsii.get(self, "changeMeToUndefined")) @@ -8377,7 +8404,7 @@ class NumberGenerator(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.NumberGenera def next_times100(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.invoke(self, "nextTimes100", [])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="generator") def generator(self) -> IRandomNumberGenerator: return typing.cast(IRandomNumberGenerator, jsii.get(self, "generator")) @@ -8432,7 +8459,7 @@ class ObjectWithPropertyProvider( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ObjectWithPropertyProvider", ): - @jsii.member(jsii_name="provide") # type: ignore[misc] + @jsii.member(jsii_name="provide") @builtins.classmethod def provide(cls) -> IObjectWithProperty: return typing.cast(IObjectWithProperty, jsii.sinvoke(cls, "provide", [])) @@ -8505,17 +8532,17 @@ class OptionalConstructorArgument( check_type(argname="argument arg3", value=arg3, expected_type=type_hints["arg3"]) jsii.create(self.__class__, self, [arg1, arg2, arg3]) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="arg1") def arg1(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.get(self, "arg1")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="arg2") def arg2(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "arg2")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="arg3") def arg3(self) -> typing.Optional[datetime.datetime]: return typing.cast(typing.Optional[datetime.datetime], jsii.get(self, "arg3")) @@ -8567,12 +8594,12 @@ class OptionalStructConsumer( jsii.create(self.__class__, self, [optional_struct]) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="parameterWasUndefined") def parameter_was_undefined(self) -> builtins.bool: return typing.cast(builtins.bool, jsii.get(self, "parameterWasUndefined")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="fieldValue") def field_value(self) -> typing.Optional[builtins.str]: return typing.cast(typing.Optional[builtins.str], jsii.get(self, "fieldValue")) @@ -8601,12 +8628,12 @@ class OverridableProtectedMember( def value_from_protected(self) -> builtins.str: return typing.cast(builtins.str, jsii.invoke(self, "valueFromProtected", [])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="overrideReadOnly") def _override_read_only(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "overrideReadOnly")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="overrideReadWrite") def _override_read_write(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "overrideReadWrite")) @@ -8680,7 +8707,7 @@ class PartiallyInitializedThisConsumer( def __init__(self) -> None: jsii.create(self.__class__, self, []) - @jsii.member(jsii_name="consumePartiallyInitializedThis") # type: ignore[misc] + @jsii.member(jsii_name="consumePartiallyInitializedThis") @abc.abstractmethod def consume_partially_initialized_this( self, @@ -8758,13 +8785,13 @@ class Power( check_type(argname="argument pow", value=pow, expected_type=type_hints["pow"]) jsii.create(self.__class__, self, [base, pow]) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="base") def base(self) -> scope.jsii_calc_lib.NumericValue: '''The base of the power.''' return typing.cast(scope.jsii_calc_lib.NumericValue, jsii.get(self, "base")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="expression") def expression(self) -> scope.jsii_calc_lib.NumericValue: '''The expression that this operation consists of. @@ -8773,7 +8800,7 @@ class Power( ''' return typing.cast(scope.jsii_calc_lib.NumericValue, jsii.get(self, "expression")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="pow") def pow(self) -> scope.jsii_calc_lib.NumericValue: '''The number of times to multiply.''' @@ -8789,12 +8816,12 @@ class PropertyNamedProperty( def __init__(self) -> None: jsii.create(self.__class__, self, []) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="property") def property(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "property")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="yetAnoterOne") def yet_anoter_one(self) -> builtins.bool: return typing.cast(builtins.bool, jsii.get(self, "yetAnoterOne")) @@ -8968,7 +8995,7 @@ class ReferenceEnumFromScopedPackage( check_type(argname="argument value", value=value, expected_type=type_hints["value"]) return typing.cast(None, jsii.invoke(self, "saveFoo", [value])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="foo") def foo(self) -> typing.Optional[scope.jsii_calc_lib.EnumFromScopedModule]: return typing.cast(typing.Optional[scope.jsii_calc_lib.EnumFromScopedModule], jsii.get(self, "foo")) @@ -8998,7 +9025,7 @@ class ReturnsPrivateImplementationOfInterface( def __init__(self) -> None: jsii.create(self.__class__, self, []) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="privateImplementation") def private_implementation(self) -> IPrivatelyImplemented: return typing.cast(IPrivatelyImplemented, jsii.get(self, "privateImplementation")) @@ -9064,7 +9091,7 @@ class RootStructValidator( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.RootStructValidator", ): - @jsii.member(jsii_name="validate") # type: ignore[misc] + @jsii.member(jsii_name="validate") @builtins.classmethod def validate( cls, @@ -9318,12 +9345,12 @@ class SomeTypeJsii976(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.SomeTypeJsii def __init__(self) -> None: jsii.create(self.__class__, self, []) - @jsii.member(jsii_name="returnAnonymous") # type: ignore[misc] + @jsii.member(jsii_name="returnAnonymous") @builtins.classmethod def return_anonymous(cls) -> typing.Any: return typing.cast(typing.Any, jsii.sinvoke(cls, "returnAnonymous", [])) - @jsii.member(jsii_name="returnReturn") # type: ignore[misc] + @jsii.member(jsii_name="returnReturn") @builtins.classmethod def return_return(cls) -> IReturnJsii976: return typing.cast(IReturnJsii976, jsii.sinvoke(cls, "returnReturn", [])) @@ -9349,12 +9376,12 @@ class StableClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StableClass"): def method(self) -> None: return typing.cast(None, jsii.invoke(self, "method", [])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="readonlyProperty") def readonly_property(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "readonlyProperty")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) @@ -9414,14 +9441,14 @@ class StaticContext(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StaticContext" https://github.com/awslabs/aws-cdk/issues/2304 ''' - @jsii.member(jsii_name="canAccessStaticContext") # type: ignore[misc] + @jsii.member(jsii_name="canAccessStaticContext") @builtins.classmethod def can_access_static_context(cls) -> builtins.bool: return typing.cast(builtins.bool, jsii.sinvoke(cls, "canAccessStaticContext", [])) - @jsii.python.classproperty # type: ignore[misc] + @jsii.python.classproperty @jsii.member(jsii_name="staticVariable") - def static_variable(cls) -> builtins.bool: + def static_variable(cls) -> builtins.bool: # pyright: ignore [reportGeneralTypeIssues] return typing.cast(builtins.bool, jsii.sget(cls, "staticVariable")) @static_variable.setter # type: ignore[no-redef] @@ -9446,12 +9473,12 @@ class StaticHelloParent( def __init__(self) -> None: jsii.create(self.__class__, self, []) - @jsii.member(jsii_name="method") # type: ignore[misc] + @jsii.member(jsii_name="method") @builtins.classmethod def method(cls) -> None: return typing.cast(None, jsii.sinvoke(cls, "method", [])) - @jsii.python.classproperty # type: ignore[misc] + @jsii.python.classproperty @jsii.member(jsii_name="property") def property(cls) -> jsii.Number: return typing.cast(jsii.Number, jsii.sget(cls, "property")) @@ -9467,7 +9494,7 @@ class Statics(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Statics"): check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.create(self.__class__, self, [value]) - @jsii.member(jsii_name="staticMethod") # type: ignore[misc] + @jsii.member(jsii_name="staticMethod") @builtins.classmethod def static_method(cls, name: builtins.str) -> builtins.str: '''Jsdocs for static method. @@ -9483,32 +9510,32 @@ class Statics(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Statics"): def just_method(self) -> builtins.str: return typing.cast(builtins.str, jsii.invoke(self, "justMethod", [])) - @jsii.python.classproperty # type: ignore[misc] + @jsii.python.classproperty @jsii.member(jsii_name="BAR") def BAR(cls) -> jsii.Number: '''Constants may also use all-caps.''' return typing.cast(jsii.Number, jsii.sget(cls, "BAR")) - @jsii.python.classproperty # type: ignore[misc] + @jsii.python.classproperty @jsii.member(jsii_name="ConstObj") def CONST_OBJ(cls) -> "DoubleTrouble": return typing.cast("DoubleTrouble", jsii.sget(cls, "ConstObj")) - @jsii.python.classproperty # type: ignore[misc] + @jsii.python.classproperty @jsii.member(jsii_name="Foo") def FOO(cls) -> builtins.str: '''Jsdocs for static property.''' return typing.cast(builtins.str, jsii.sget(cls, "Foo")) - @jsii.python.classproperty # type: ignore[misc] + @jsii.python.classproperty @jsii.member(jsii_name="zooBar") def ZOO_BAR(cls) -> typing.Mapping[builtins.str, builtins.str]: '''Constants can also use camelCase.''' return typing.cast(typing.Mapping[builtins.str, builtins.str], jsii.sget(cls, "zooBar")) - @jsii.python.classproperty # type: ignore[misc] + @jsii.python.classproperty @jsii.member(jsii_name="instance") - def instance(cls) -> "Statics": + def instance(cls) -> "Statics": # pyright: ignore [reportGeneralTypeIssues] '''Jsdocs for static getter. Jsdocs for static setter. @@ -9522,9 +9549,9 @@ class Statics(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Statics"): check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.sset(cls, "instance", value) - @jsii.python.classproperty # type: ignore[misc] + @jsii.python.classproperty @jsii.member(jsii_name="nonConstStatic") - def non_const_static(cls) -> jsii.Number: + def non_const_static(cls) -> jsii.Number: # pyright: ignore [reportGeneralTypeIssues] return typing.cast(jsii.Number, jsii.sget(cls, "nonConstStatic")) @non_const_static.setter # type: ignore[no-redef] @@ -9534,7 +9561,7 @@ class Statics(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Statics"): check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.sset(cls, "nonConstStatic", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="value") def value(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "value")) @@ -9551,7 +9578,7 @@ class StripInternal(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StripInternal" def __init__(self) -> None: jsii.create(self.__class__, self, []) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="youSeeMe") def you_see_me(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "youSeeMe")) @@ -9752,7 +9779,7 @@ class StructPassing(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StructPassing" def __init__(self) -> None: jsii.create(self.__class__, self, []) - @jsii.member(jsii_name="howManyVarArgsDidIPass") # type: ignore[misc] + @jsii.member(jsii_name="howManyVarArgsDidIPass") @builtins.classmethod def how_many_var_args_did_i_pass( cls, @@ -9766,10 +9793,10 @@ class StructPassing(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StructPassing" if __debug__: type_hints = typing.get_type_hints(StructPassing.how_many_var_args_did_i_pass) check_type(argname="argument _positional", value=_positional, expected_type=type_hints["_positional"]) - check_type(argname="argument inputs", value=inputs, expected_type=typing.Tuple[type_hints["inputs"], ...]) + check_type(argname="argument inputs", value=inputs, expected_type=typing.Tuple[type_hints["inputs"], ...]) # pyright: ignore [reportGeneralTypeIssues] return typing.cast(jsii.Number, jsii.sinvoke(cls, "howManyVarArgsDidIPass", [_positional, *inputs])) - @jsii.member(jsii_name="roundTrip") # type: ignore[misc] + @jsii.member(jsii_name="roundTrip") @builtins.classmethod def round_trip( cls, @@ -9799,7 +9826,7 @@ class StructUnionConsumer( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StructUnionConsumer", ): - @jsii.member(jsii_name="isStructA") # type: ignore[misc] + @jsii.member(jsii_name="isStructA") @builtins.classmethod def is_struct_a( cls, @@ -9813,7 +9840,7 @@ class StructUnionConsumer( check_type(argname="argument struct", value=struct, expected_type=type_hints["struct"]) return typing.cast(builtins.bool, jsii.sinvoke(cls, "isStructA", [struct])) - @jsii.member(jsii_name="isStructB") # type: ignore[misc] + @jsii.member(jsii_name="isStructB") @builtins.classmethod def is_struct_b( cls, @@ -9966,7 +9993,7 @@ class Sum( def __init__(self) -> None: jsii.create(self.__class__, self, []) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="expression") def expression(self) -> scope.jsii_calc_lib.NumericValue: '''The expression that this operation consists of. @@ -9975,7 +10002,7 @@ class Sum( ''' return typing.cast(scope.jsii_calc_lib.NumericValue, jsii.get(self, "expression")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="parts") def parts(self) -> typing.List[scope.jsii_calc_lib.NumericValue]: '''The parts to sum.''' @@ -10068,18 +10095,18 @@ class SupportsNiceJavaBuilderWithRequiredProps( jsii.create(self.__class__, self, [id_, props]) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="bar") def bar(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.get(self, "bar")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="id") def id(self) -> jsii.Number: '''some identifier of your choice.''' return typing.cast(jsii.Number, jsii.get(self, "id")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="propId") def prop_id(self) -> typing.Optional[builtins.str]: return typing.cast(typing.Optional[builtins.str], jsii.get(self, "propId")) @@ -10156,12 +10183,12 @@ class SyncVirtualMethods( check_type(argname="argument value", value=value, expected_type=type_hints["value"]) return typing.cast(None, jsii.invoke(self, "writeA", [value])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="readonlyProperty") def readonly_property(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "readonlyProperty")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="a") def a(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.get(self, "a")) @@ -10173,7 +10200,7 @@ class SyncVirtualMethods( check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "a", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="callerIsProperty") def caller_is_property(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.get(self, "callerIsProperty")) @@ -10185,7 +10212,7 @@ class SyncVirtualMethods( check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "callerIsProperty", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="otherProperty") def other_property(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "otherProperty")) @@ -10197,7 +10224,7 @@ class SyncVirtualMethods( check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "otherProperty", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="theProperty") def the_property(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "theProperty")) @@ -10209,7 +10236,7 @@ class SyncVirtualMethods( check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "theProperty", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="valueOfOtherProperty") def value_of_other_property(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "valueOfOtherProperty")) @@ -10261,13 +10288,13 @@ class TestStructWithEnum( return typing.cast(builtins.bool, jsii.invoke(self, "isStringEnumB", [input])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="structWithFoo") def struct_with_foo(self) -> StructWithEnum: '''Returns \`\`foo: StringEnum.A\`\`.''' return typing.cast(StructWithEnum, jsii.get(self, "structWithFoo")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="structWithFooBar") def struct_with_foo_bar(self) -> StructWithEnum: '''Returns \`\`foo: StringEnum.C\`\` and \`\`bar: AllTypesEnum.MY_ENUM_VALUE\`\`.''' @@ -10374,7 +10401,7 @@ class TwoMethodsWithSimilarCapitalization( ''' return typing.cast(builtins.str, jsii.invoke(self, "toIsOString", [])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="fooBar") def foo_bar(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.get(self, "fooBar")) @@ -10386,7 +10413,7 @@ class UmaskCheck(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.UmaskCheck"): :see: https://github.com/aws/jsii/issues/1765 ''' - @jsii.member(jsii_name="mode") # type: ignore[misc] + @jsii.member(jsii_name="mode") @builtins.classmethod def mode(cls) -> jsii.Number: '''This should return 0o644 (-rw-r--r--).''' @@ -10409,14 +10436,15 @@ class UnaryOperation( check_type(argname="argument operand", value=operand, expected_type=type_hints["operand"]) jsii.create(self.__class__, self, [operand]) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="operand") def operand(self) -> scope.jsii_calc_lib.NumericValue: return typing.cast(scope.jsii_calc_lib.NumericValue, jsii.get(self, "operand")) class _UnaryOperationProxy( - UnaryOperation, jsii.proxy_for(scope.jsii_calc_lib.Operation) # type: ignore[misc] + UnaryOperation, + jsii.proxy_for(scope.jsii_calc_lib.Operation), # type: ignore[misc] ): pass @@ -10489,12 +10517,12 @@ class UpcasingReflectable( check_type(argname="argument delegate", value=delegate, expected_type=type_hints["delegate"]) jsii.create(self.__class__, self, [delegate]) - @jsii.python.classproperty # type: ignore[misc] + @jsii.python.classproperty @jsii.member(jsii_name="reflector") def REFLECTOR(cls) -> scope.jsii_calc_lib.custom_submodule_name.Reflector: return typing.cast(scope.jsii_calc_lib.custom_submodule_name.Reflector, jsii.sget(cls, "reflector")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="entries") def entries( self, @@ -10565,7 +10593,7 @@ class UsesInterfaceWithProperties( check_type(argname="argument value", value=value, expected_type=type_hints["value"]) return typing.cast(builtins.str, jsii.invoke(self, "writeAndRead", [value])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="obj") def obj(self) -> IInterfaceWithProperties: return typing.cast(IInterfaceWithProperties, jsii.get(self, "obj")) @@ -10588,7 +10616,7 @@ class VariadicInvoker(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.VariadicInvo ''' if __debug__: type_hints = typing.get_type_hints(VariadicInvoker.as_array) - check_type(argname="argument values", value=values, expected_type=typing.Tuple[type_hints["values"], ...]) + check_type(argname="argument values", value=values, expected_type=typing.Tuple[type_hints["values"], ...]) # pyright: ignore [reportGeneralTypeIssues] return typing.cast(typing.List[jsii.Number], jsii.invoke(self, "asArray", [*values])) @@ -10599,7 +10627,7 @@ class VariadicMethod(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.VariadicMetho ''' if __debug__: type_hints = typing.get_type_hints(VariadicMethod.__init__) - check_type(argname="argument prefix", value=prefix, expected_type=typing.Tuple[type_hints["prefix"], ...]) + check_type(argname="argument prefix", value=prefix, expected_type=typing.Tuple[type_hints["prefix"], ...]) # pyright: ignore [reportGeneralTypeIssues] jsii.create(self.__class__, self, [*prefix]) @jsii.member(jsii_name="asArray") @@ -10615,7 +10643,7 @@ class VariadicMethod(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.VariadicMetho if __debug__: type_hints = typing.get_type_hints(VariadicMethod.as_array) check_type(argname="argument first", value=first, expected_type=type_hints["first"]) - check_type(argname="argument others", value=others, expected_type=typing.Tuple[type_hints["others"], ...]) + check_type(argname="argument others", value=others, expected_type=typing.Tuple[type_hints["others"], ...]) # pyright: ignore [reportGeneralTypeIssues] return typing.cast(typing.List[jsii.Number], jsii.invoke(self, "asArray", [first, *others])) @@ -10695,12 +10723,12 @@ class VoidCallback( def call_me(self) -> None: return typing.cast(None, jsii.invoke(self, "callMe", [])) - @jsii.member(jsii_name="overrideMe") # type: ignore[misc] + @jsii.member(jsii_name="overrideMe") @abc.abstractmethod def _override_me(self) -> None: ... - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="methodWasCalled") def method_was_called(self) -> builtins.bool: return typing.cast(builtins.bool, jsii.get(self, "methodWasCalled")) @@ -10730,7 +10758,7 @@ class WithPrivatePropertyInConstructor( check_type(argname="argument private_field", value=private_field, expected_type=type_hints["private_field"]) jsii.create(self.__class__, self, [private_field]) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="success") def success(self) -> builtins.bool: return typing.cast(builtins.bool, jsii.get(self, "success")) @@ -10745,7 +10773,7 @@ class AbstractClass( def __init__(self) -> None: jsii.create(self.__class__, self, []) - @jsii.member(jsii_name="abstractMethod") # type: ignore[misc] + @jsii.member(jsii_name="abstractMethod") @abc.abstractmethod def abstract_method(self, name: builtins.str) -> builtins.str: ''' @@ -10757,14 +10785,15 @@ class AbstractClass( def non_abstract_method(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.invoke(self, "nonAbstractMethod", [])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="propFromInterface") def prop_from_interface(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "propFromInterface")) class _AbstractClassProxy( - AbstractClass, jsii.proxy_for(AbstractClassBase) # type: ignore[misc] + AbstractClass, + jsii.proxy_for(AbstractClassBase), # type: ignore[misc] ): @jsii.member(jsii_name="abstractMethod") def abstract_method(self, name: builtins.str) -> builtins.str: @@ -10804,7 +10833,7 @@ class Add(BinaryOperation, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Add"): '''String representation of the value.''' return typing.cast(builtins.str, jsii.invoke(self, "toString", [])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="value") def value(self) -> jsii.Number: '''The value.''' @@ -10837,7 +10866,7 @@ class Bell(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Bell"): def ring(self) -> None: return typing.cast(None, jsii.invoke(self, "ring", [])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="rung") def rung(self) -> builtins.bool: return typing.cast(builtins.bool, jsii.get(self, "rung")) @@ -10902,7 +10931,7 @@ class ClassThatImplementsTheInternalInterface( def __init__(self) -> None: jsii.create(self.__class__, self, []) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="a") def a(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "a")) @@ -10914,7 +10943,7 @@ class ClassThatImplementsTheInternalInterface( check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "a", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="b") def b(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "b")) @@ -10926,7 +10955,7 @@ class ClassThatImplementsTheInternalInterface( check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "b", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="c") def c(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "c")) @@ -10938,7 +10967,7 @@ class ClassThatImplementsTheInternalInterface( check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "c", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="d") def d(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "d")) @@ -10959,7 +10988,7 @@ class ClassThatImplementsThePrivateInterface( def __init__(self) -> None: jsii.create(self.__class__, self, []) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="a") def a(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "a")) @@ -10971,7 +11000,7 @@ class ClassThatImplementsThePrivateInterface( check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "a", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="b") def b(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "b")) @@ -10983,7 +11012,7 @@ class ClassThatImplementsThePrivateInterface( check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "b", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="c") def c(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "c")) @@ -10995,7 +11024,7 @@ class ClassThatImplementsThePrivateInterface( check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "c", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="e") def e(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "e")) @@ -11015,7 +11044,7 @@ class ClassWithPrivateConstructorAndAutomaticProperties( ): '''Class that implements interface properties automatically, but using a private constructor.''' - @jsii.member(jsii_name="create") # type: ignore[misc] + @jsii.member(jsii_name="create") @builtins.classmethod def create( cls, @@ -11032,12 +11061,12 @@ class ClassWithPrivateConstructorAndAutomaticProperties( check_type(argname="argument read_write_string", value=read_write_string, expected_type=type_hints["read_write_string"]) return typing.cast("ClassWithPrivateConstructorAndAutomaticProperties", jsii.sinvoke(cls, "create", [read_only_string, read_write_string])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="readOnlyString") def read_only_string(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "readOnlyString")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="readWriteString") def read_write_string(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "readWriteString")) @@ -11082,20 +11111,20 @@ class IInterfaceThatShouldNotBeADataType( ): '''Even though this interface has only properties, it is disqualified from being a datatype because it inherits from an interface that is not a datatype.''' - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="otherValue") def other_value(self) -> builtins.str: ... class _IInterfaceThatShouldNotBeADataTypeProxy( - jsii.proxy_for(IInterfaceWithMethods) # type: ignore[misc] + jsii.proxy_for(IInterfaceWithMethods), # type: ignore[misc] ): '''Even though this interface has only properties, it is disqualified from being a datatype because it inherits from an interface that is not a datatype.''' __jsii_type__: typing.ClassVar[str] = "jsii-calc.IInterfaceThatShouldNotBeADataType" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="otherValue") def other_value(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "otherValue")) @@ -11106,7 +11135,7 @@ typing.cast(typing.Any, IInterfaceThatShouldNotBeADataType).__jsii_proxy_class__ @jsii.interface(jsii_type="jsii-calc.IJSII417Derived") class IJSII417Derived(IJSII417PublicBaseOfBase, typing_extensions.Protocol): - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="property") def property(self) -> builtins.str: ... @@ -11121,11 +11150,11 @@ class IJSII417Derived(IJSII417PublicBaseOfBase, typing_extensions.Protocol): class _IJSII417DerivedProxy( - jsii.proxy_for(IJSII417PublicBaseOfBase) # type: ignore[misc] + jsii.proxy_for(IJSII417PublicBaseOfBase), # type: ignore[misc] ): __jsii_type__: typing.ClassVar[str] = "jsii-calc.IJSII417Derived" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="property") def property(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "property")) @@ -11178,7 +11207,7 @@ class JSII417Derived( def baz(self) -> None: return typing.cast(None, jsii.invoke(self, "baz", [])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="property") def _property(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "property")) @@ -11217,7 +11246,7 @@ class Negate(UnaryOperation, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Negat '''String representation of the value.''' return typing.cast(builtins.str, jsii.invoke(self, "toString", [])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="value") def value(self) -> jsii.Number: '''The value.''' @@ -11229,12 +11258,12 @@ class StaticHelloChild( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StaticHelloChild", ): - @jsii.member(jsii_name="method") # type: ignore[misc] + @jsii.member(jsii_name="method") @builtins.classmethod def method(cls) -> None: return typing.cast(None, jsii.sinvoke(cls, "method", [])) - @jsii.python.classproperty # type: ignore[misc] + @jsii.python.classproperty @jsii.member(jsii_name="property") def property(cls) -> jsii.Number: return typing.cast(jsii.Number, jsii.sget(cls, "property")) @@ -11263,16 +11292,16 @@ class SupportsNiceJavaBuilder( check_type(argname="argument id", value=id, expected_type=type_hints["id"]) check_type(argname="argument default_bar", value=default_bar, expected_type=type_hints["default_bar"]) check_type(argname="argument props", value=props, expected_type=type_hints["props"]) - check_type(argname="argument rest", value=rest, expected_type=typing.Tuple[type_hints["rest"], ...]) + check_type(argname="argument rest", value=rest, expected_type=typing.Tuple[type_hints["rest"], ...]) # pyright: ignore [reportGeneralTypeIssues] jsii.create(self.__class__, self, [id, default_bar, props, *rest]) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="id") def id(self) -> jsii.Number: '''some identifier.''' return typing.cast(jsii.Number, jsii.get(self, "id")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="rest") def rest(self) -> typing.List[builtins.str]: return typing.cast(typing.List[builtins.str], jsii.get(self, "rest")) @@ -11624,7 +11653,7 @@ class Cdk16625( '''Run this function to verify that everything is working as it should.''' return typing.cast(None, jsii.invoke(self, "test", [])) - @jsii.member(jsii_name="unwrap") # type: ignore[misc] + @jsii.member(jsii_name="unwrap") @abc.abstractmethod def _unwrap(self, gen: _IRandomNumberGenerator_9643a8b9) -> jsii.Number: '''Implement this functin to return \`\`gen.next()\`\`. It is extremely important that the \`\`donotimport\`\` submodule is NEVER explicitly loaded in the testing application (otherwise this test is void). @@ -11753,7 +11782,7 @@ class CompositeOperation( '''String representation of the value.''' return typing.cast(builtins.str, jsii.invoke(self, "toString", [])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="expression") @abc.abstractmethod def expression(self) -> scope.jsii_calc_lib.NumericValue: @@ -11763,13 +11792,13 @@ class CompositeOperation( ''' ... - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="value") def value(self) -> jsii.Number: '''The value.''' return typing.cast(jsii.Number, jsii.get(self, "value")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="decorationPostfixes") def decoration_postfixes(self) -> typing.List[builtins.str]: '''A set of postfixes to include in a decorated .toString().''' @@ -11782,7 +11811,7 @@ class CompositeOperation( check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "decorationPostfixes", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="decorationPrefixes") def decoration_prefixes(self) -> typing.List[builtins.str]: '''A set of prefixes to include in a decorated .toString().''' @@ -11795,7 +11824,7 @@ class CompositeOperation( check_type(argname="argument value", value=value, expected_type=type_hints["value"]) jsii.set(self, "decorationPrefixes", value) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="stringStyle") def string_style(self) -> "CompositeOperation.CompositionStringStyle": '''The .toString() style.''' @@ -11824,7 +11853,7 @@ class _CompositeOperationProxy( CompositeOperation, jsii.proxy_for(scope.jsii_calc_lib.Operation), # type: ignore[misc] ): - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="expression") def expression(self) -> scope.jsii_calc_lib.NumericValue: '''The expression that this operation consists of. @@ -11868,7 +11897,7 @@ class Base( def __init__(self) -> None: jsii.create(self.__class__, self, []) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="prop") def prop(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "prop")) @@ -11922,7 +11951,7 @@ class Foo( def __init__(self) -> None: jsii.create(self.__class__, self, []) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="bar") def bar(self) -> typing.Optional[builtins.str]: return typing.cast(typing.Optional[builtins.str], jsii.get(self, "bar")) @@ -12110,7 +12139,7 @@ class OverrideMe( def __init__(self) -> None: jsii.create(self.__class__, self, []) - @jsii.member(jsii_name="callAbstract") # type: ignore[misc] + @jsii.member(jsii_name="callAbstract") @builtins.classmethod def call_abstract(cls, receiver: "OverrideMe") -> builtins.bool: ''' @@ -12121,7 +12150,7 @@ class OverrideMe( check_type(argname="argument receiver", value=receiver, expected_type=type_hints["receiver"]) return typing.cast(builtins.bool, jsii.sinvoke(cls, "callAbstract", [receiver])) - @jsii.member(jsii_name="implementMe") # type: ignore[misc] + @jsii.member(jsii_name="implementMe") @abc.abstractmethod def implement_me( self, @@ -12196,7 +12225,7 @@ class MyClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.module2530.MyClass") check_type(argname="argument _", value=_, expected_type=type_hints["_"]) jsii.create(self.__class__, self, [_]) - @jsii.member(jsii_name="bar") # type: ignore[misc] + @jsii.member(jsii_name="bar") @builtins.classmethod def bar(cls, _: builtins.bool) -> None: ''' @@ -12246,12 +12275,12 @@ class OnlyStatics( metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.module2617.OnlyStatics", ): - @jsii.member(jsii_name="bar") # type: ignore[misc] + @jsii.member(jsii_name="bar") @builtins.classmethod def bar(cls) -> None: return typing.cast(None, jsii.sinvoke(cls, "bar", [])) - @jsii.member(jsii_name="foo") # type: ignore[misc] + @jsii.member(jsii_name="foo") @builtins.classmethod def foo(cls) -> None: return typing.cast(None, jsii.sinvoke(cls, "foo", [])) @@ -12437,12 +12466,12 @@ class MyClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.module2689.props.MyC def __init__(self) -> None: jsii.create(self.__class__, self, []) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="bar") def bar(self) -> typing.Mapping[builtins.str, scope.jsii_calc_base.BaseProps]: return typing.cast(typing.Mapping[builtins.str, scope.jsii_calc_base.BaseProps], jsii.get(self, "bar")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="foo") def foo(self) -> typing.List[scope.jsii_calc_lib.Number]: return typing.cast(typing.List[scope.jsii_calc_lib.Number], jsii.get(self, "foo")) @@ -12798,7 +12827,7 @@ from .._jsii import * @jsii.interface(jsii_type="jsii-calc.module2700.IFoo") class IFoo(typing_extensions.Protocol): - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="baz") def baz(self) -> jsii.Number: ... @@ -12811,7 +12840,7 @@ class IFoo(typing_extensions.Protocol): class _IFooProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.module2700.IFoo" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="baz") def baz(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.get(self, "baz")) @@ -12833,7 +12862,7 @@ class Base(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.module2700.Base"): def bar(self) -> builtins.str: return typing.cast(builtins.str, jsii.invoke(self, "bar", [])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="baz") def baz(self) -> jsii.Number: return typing.cast(jsii.Number, jsii.get(self, "baz")) @@ -12898,7 +12927,7 @@ class Class2( def __init__(self) -> None: jsii.create(self.__class__, self, []) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="base") def base(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "base")) @@ -12930,7 +12959,7 @@ class IBaz(scope.jsii_calc_base.IBaseInterface, typing_extensions.Protocol): class _IBazProxy( - jsii.proxy_for(scope.jsii_calc_base.IBaseInterface) # type: ignore[misc] + jsii.proxy_for(scope.jsii_calc_base.IBaseInterface), # type: ignore[misc] ): __jsii_type__: typing.ClassVar[str] = "jsii-calc.module2702.IBaz" @@ -12962,18 +12991,18 @@ typing.cast(typing.Any, IConstruct).__jsii_proxy_class__ = lambda : _IConstructP @jsii.interface(jsii_type="jsii-calc.module2702.IFoo") class IFoo(scope.jsii_calc_base.IBaseInterface, typing_extensions.Protocol): - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="iBaseInterface") def i_base_interface(self) -> builtins.str: ... class _IFooProxy( - jsii.proxy_for(scope.jsii_calc_base.IBaseInterface) # type: ignore[misc] + jsii.proxy_for(scope.jsii_calc_base.IBaseInterface), # type: ignore[misc] ): __jsii_type__: typing.ClassVar[str] = "jsii-calc.module2702.IFoo" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="iBaseInterface") def i_base_interface(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "iBaseInterface")) @@ -12990,7 +13019,7 @@ class IResource(IConstruct, typing_extensions.Protocol): class _IResourceProxy( - jsii.proxy_for(IConstruct) # type: ignore[misc] + jsii.proxy_for(IConstruct), # type: ignore[misc] ): __jsii_type__: typing.ClassVar[str] = "jsii-calc.module2702.IResource" @@ -13010,7 +13039,7 @@ class IVpc(IResource, typing_extensions.Protocol): class _IVpcProxy( - jsii.proxy_for(IResource) # type: ignore[misc] + jsii.proxy_for(IResource), # type: ignore[misc] ): __jsii_type__: typing.ClassVar[str] = "jsii-calc.module2702.IVpc" @@ -13214,7 +13243,7 @@ class OnlyStaticMethods( ): '''Test for https://github.com/aws/jsii/issues/2617.''' - @jsii.member(jsii_name="staticMethod") # type: ignore[misc] + @jsii.member(jsii_name="staticMethod") @builtins.classmethod def static_method(cls) -> builtins.str: return typing.cast(builtins.str, jsii.sinvoke(cls, "staticMethod", [])) @@ -13272,7 +13301,7 @@ class ClassWithSelf( check_type(argname="argument self", value=self, expected_type=type_hints["self"]) return typing.cast(builtins.str, jsii.invoke(self_, "method", [self])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="self") def self(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "self")) @@ -13290,7 +13319,7 @@ class ClassWithSelfKwarg( jsii.create(self_.__class__, self_, [props]) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="props") def props(self) -> "StructWithSelf": return typing.cast("StructWithSelf", jsii.get(self, "props")) @@ -13457,27 +13486,27 @@ class MyClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.submodule.MyClass"): return typing.cast(builtins.str, jsii.invoke(self, "methodWithSpecialParam", [param])) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="awesomeness") def awesomeness(self) -> _Awesomeness_d37a24df: return typing.cast(_Awesomeness_d37a24df, jsii.get(self, "awesomeness")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="definedAt") def defined_at(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "definedAt")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="goodness") def goodness(self) -> _Goodness_2df26737: return typing.cast(_Goodness_2df26737, jsii.get(self, "goodness")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="props") def props(self) -> _SomeStruct_91627123: return typing.cast(_SomeStruct_91627123, jsii.get(self, "props")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="allTypes") def all_types(self) -> typing.Optional[_AllTypes_b08307c5]: return typing.cast(typing.Optional[_AllTypes_b08307c5], jsii.get(self, "allTypes")) @@ -13613,7 +13642,7 @@ class InnerClass( def __init__(self) -> None: jsii.create(self.__class__, self, []) - @jsii.python.classproperty # type: ignore[misc] + @jsii.python.classproperty @jsii.member(jsii_name="staticProp") def STATIC_PROP(cls) -> "SomeStruct": return typing.cast("SomeStruct", jsii.sget(cls, "staticProp")) @@ -13631,7 +13660,7 @@ class OuterClass( def __init__(self) -> None: jsii.create(self.__class__, self, []) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="innerClass") def inner_class(self) -> InnerClass: return typing.cast(InnerClass, jsii.get(self, "innerClass")) @@ -13804,7 +13833,7 @@ from ..child import ( class Kwargs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.submodule.isolated.Kwargs"): '''Ensures imports are correctly registered for kwargs lifted properties from super-structs.''' - @jsii.member(jsii_name="method") # type: ignore[misc] + @jsii.member(jsii_name="method") @builtins.classmethod def method( cls, @@ -13853,12 +13882,12 @@ class Namespaced( metaclass=jsii.JSIIAbstractClass, jsii_type="jsii-calc.submodule.nested_submodule.Namespaced", ): - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="definedAt") def defined_at(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "definedAt")) - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="goodness") @abc.abstractmethod def goodness(self) -> _Goodness_2df26737: @@ -13866,7 +13895,7 @@ class Namespaced( class _NamespacedProxy(Namespaced): - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="goodness") def goodness(self) -> _Goodness_2df26737: return typing.cast(_Goodness_2df26737, jsii.get(self, "goodness")) @@ -13907,7 +13936,7 @@ from ...._jsii import * jsii_type="jsii-calc.submodule.nested_submodule.deeplyNested.INamespaced" ) class INamespaced(typing_extensions.Protocol): - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="definedAt") def defined_at(self) -> builtins.str: ... @@ -13916,7 +13945,7 @@ class INamespaced(typing_extensions.Protocol): class _INamespacedProxy: __jsii_type__: typing.ClassVar[str] = "jsii-calc.submodule.nested_submodule.deeplyNested.INamespaced" - @builtins.property # type: ignore[misc] + @builtins.property @jsii.member(jsii_name="definedAt") def defined_at(self) -> builtins.str: return typing.cast(builtins.str, jsii.get(self, "definedAt")) diff --git a/packages/jsii-pacmak/test/generated-code/harness.ts b/packages/jsii-pacmak/test/generated-code/harness.ts index 4026f9e1ac..fa47c312d3 100644 --- a/packages/jsii-pacmak/test/generated-code/harness.ts +++ b/packages/jsii-pacmak/test/generated-code/harness.ts @@ -6,6 +6,13 @@ import * as process from 'process'; import { pacmak, TargetName } from '../../lib'; import { shell } from '../../lib/util'; +export const JSII_TEST_PACKAGES: readonly string[] = [ + '@scope/jsii-calc-base-of-base', + '@scope/jsii-calc-base', + '@scope/jsii-calc-lib', + 'jsii-calc', +]; + const FILE = Symbol('file'); const MISSING = Symbol('missing'); const TARBALL = Symbol('tarball'); @@ -52,12 +59,7 @@ export function verifyGeneratedCodeFor( done(); }); - for (const pkg of [ - '@scope/jsii-calc-base-of-base', - '@scope/jsii-calc-base', - '@scope/jsii-calc-lib', - 'jsii-calc', - ]) { + for (const pkg of JSII_TEST_PACKAGES) { // Extend timeout, because this could be slow (python has more time because of the mypy pass)... jest.setTimeout(timeout); @@ -150,8 +152,16 @@ async function runPacmak( ).resolves.not.toThrowError(); } -async function runMypy(pythonRoot: string): Promise { - const venvRoot = path.join(__dirname, '.venv'); +export async function preparePythonVirtualEnv({ + install = [], + venvDir = __dirname, + systemSitePackages = true, +}: { + install?: readonly string[]; + venvDir?: string; + systemSitePackages?: boolean; +} = {}) { + const venvRoot = path.join(venvDir, '.venv'); const venvBin = path.join( venvRoot, process.platform === 'win32' ? 'Scripts' : 'bin', @@ -176,11 +186,16 @@ async function runMypy(pythonRoot: string): Promise { shell(process.platform === 'win32' ? 'python' : 'python3', [ '-m', 'venv', - '--system-site-packages', // Allow using globally installed packages (saves time & disk space) + ...(systemSitePackages + ? [ + '--system-site-packages', // Allow using globally installed packages (saves time & disk space) + ] + : []), JSON.stringify(venvRoot), ]), ).resolves.not.toThrowError(); - // Install mypy and the jsii runtime in there as needed + + // Install development dependencies as needed... await expect( shell( venvPython, @@ -191,6 +206,8 @@ async function runMypy(pythonRoot: string): Promise { '--no-input', '-r', path.resolve(__dirname, 'requirements-dev.txt'), + // Additional install parameters + ...install, // Note: this resolution is a little ugly, but it's there to avoid creating a dependency cycle JSON.stringify( path.resolve( @@ -202,6 +219,13 @@ async function runMypy(pythonRoot: string): Promise { { env, retry: { maxAttempts: 5 } }, ), ).resolves.not.toThrowError(); + + return { env, venvPython, venvRoot }; +} + +async function runMypy(pythonRoot: string): Promise { + const { env, venvPython } = await preparePythonVirtualEnv(); + // Now run mypy on the Python code return expect( shell( diff --git a/packages/jsii-pacmak/test/generated-code/python-pyright.test.ts b/packages/jsii-pacmak/test/generated-code/python-pyright.test.ts new file mode 100644 index 0000000000..33be613a34 --- /dev/null +++ b/packages/jsii-pacmak/test/generated-code/python-pyright.test.ts @@ -0,0 +1,80 @@ +import { promises as fs } from 'fs'; +import * as os from 'os'; +import * as path from 'path'; + +import { pacmak, TargetName } from '../../lib'; +import { shell } from '../../lib/util'; +import { JSII_TEST_PACKAGES, preparePythonVirtualEnv } from './harness'; + +jest.setTimeout(3_600_000); + +let pythonSource: string; +let venv: { + readonly env: { [name: string]: string }; + readonly venvPython: string; + readonly venvRoot: string; +}; + +beforeAll(async () => { + pythonSource = await fs.mkdtemp( + path.join(os.tmpdir(), 'jsii-pacmak-pyright-'), + ); + + // Generate code for all test packages into a distinct directory for each... + await Promise.all( + JSII_TEST_PACKAGES.map((pkg) => + pacmak({ + codeOnly: true, + inputDirectories: [path.resolve(__dirname, '..', '..', '..', pkg)], + outputDirectory: path.join(pythonSource, pkg), + targets: [TargetName.PYTHON], + }), + ), + ); + + // Prepare virtual env, and install generated packages into it... + venv = await preparePythonVirtualEnv({ + install: JSII_TEST_PACKAGES.flatMap((pkg) => [ + '-e', + JSON.stringify(path.join(pythonSource, pkg, TargetName.PYTHON)), + ]), + venvDir: pythonSource, + systemSitePackages: false, // Interferes with pyright resolutions... + }); + + // Create a pyright project configuration file... + await fs.writeFile( + path.join(pythonSource, 'pyproject.toml'), + [ + '[tool.pyright]', + 'defineConstant = { DEBUG = true }', + 'pythonVersion = "3.7"', + 'pythonPlatform = "All"', + 'reportSelfClsParameterName = false', + `venvPath = ${JSON.stringify(path.dirname(venv.venvRoot))}`, + `venv = ${JSON.stringify(path.basename(venv.venvRoot))}`, + ].join('\n'), + ); +}, 300_000 /* ms -- this can be real slow 😒 */); + +afterAll(async () => { + await fs.rm(pythonSource, { force: true, recursive: true }); + pythonSource = ''; +}); + +test('generated code passes pyright', async () => { + await expect( + shell( + process.execPath, + [ + ...process.execArgv, + JSON.stringify(require.resolve('pyright')), + `--project=${JSON.stringify(pythonSource)}`, + ], + { + cwd: pythonSource, + env: venv.env, + }, + ), + ).resolves.not.toThrowError(); +}); diff --git a/yarn.lock b/yarn.lock index d69f228c23..231279563d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6638,6 +6638,11 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== +pyright@^1.1.265: + version "1.1.265" + resolved "https://registry.yarnpkg.com/pyright/-/pyright-1.1.265.tgz#200124a46b3a1ea191afe20e770e2cfa8a526aa7" + integrity sha512-CHUV46qHE4AKjMXLzBGDvOO9pEDzpQKgnPx3vC/JVEfvvu/RRUGR27GSTDTVVRNXbTjmnWjhRKku1gPPNdDSyg== + q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"