From e6d1bc161ed426261f39c5ccadfa80a4020e4ffc Mon Sep 17 00:00:00 2001 From: Romain Marcadier Date: Fri, 21 Aug 2020 16:43:15 +0200 Subject: [PATCH] fix(python): generate type-checking code (#1881) There were a number of issues with the generated code that caused it not to properly validate though `mypy`: - Properties and method names could collide with buit-in types - `mypy` is unable to check decorations on decorated declarations - Those must be opted out with `#types: ignore` - `mypy` is unable to check dynamic base classes - Those must be opted out with `#types: ignore` - Impossible protocol conformance through meta-class - Removed `JSClass` and `Referenceable` in favor of `Type` and `Any` - Incorrect inference for the `_values` dictionary in *structs* - Had to add proper type annotation there - Had to add some `assert foo is not Null` in the implementation of non-optional struct property getters, to satisfy type checking Those issues were highlighted in awslabs/cdk8s#194 --- packages/@jsii/python-runtime/pyproject.toml | 4 +- .../src/jsii/_kernel/__init__.py | 27 +- .../python-runtime/src/jsii/_kernel/types.py | 19 +- .../python-runtime/src/jsii/_reference_map.py | 8 +- .../@jsii/python-runtime/src/jsii/_runtime.py | 11 +- packages/jsii-pacmak/.gitignore | 2 + packages/jsii-pacmak/lib/targets/python.ts | 136 +- .../lib/targets/python/type-name.ts | 6 +- .../__snapshots__/jsii-pacmak.test.ts.snap | 2663 ++++++++++------- packages/jsii-pacmak/test/build-test.sh | 2 +- packages/jsii-pacmak/test/jsii-pacmak.test.ts | 110 +- .../test/targets/python/type-name.test.ts | 10 +- 12 files changed, 1729 insertions(+), 1269 deletions(-) diff --git a/packages/@jsii/python-runtime/pyproject.toml b/packages/@jsii/python-runtime/pyproject.toml index cb0113114a..10e317749a 100644 --- a/packages/@jsii/python-runtime/pyproject.toml +++ b/packages/@jsii/python-runtime/pyproject.toml @@ -1,8 +1,8 @@ [build-system] requires = [ "pip~=20.2", - "setuptools~=46.1.3", - "wheel~=0.34.2", + "setuptools~=46.1", + "wheel~=0.34", ] [tool.black] diff --git a/packages/@jsii/python-runtime/src/jsii/_kernel/__init__.py b/packages/@jsii/python-runtime/src/jsii/_kernel/__init__.py index 398888fca6..b11c13c21f 100644 --- a/packages/@jsii/python-runtime/src/jsii/_kernel/__init__.py +++ b/packages/@jsii/python-runtime/src/jsii/_kernel/__init__.py @@ -13,7 +13,6 @@ from jsii import _reference_map from jsii._utils import Singleton from jsii._kernel.providers import BaseProvider, ProcessProvider -from jsii._kernel.types import JSClass, Referenceable from jsii._kernel.types import Callback from jsii._kernel.types import ( EnumRef, @@ -51,10 +50,10 @@ class Object: __jsii_type__ = "Object" -def _get_overides(klass: JSClass, obj: Any) -> List[Override]: +def _get_overides(klass: Type, obj: Any) -> List[Override]: overrides: List[Override] = [] - # We need to inspect each item in the MRO, until we get to our JSClass, at that + # We need to inspect each item in the MRO, until we get to our Type, at that # point we'll bail, because those methods are not the overriden methods, but the # "real" methods. jsii_classes = [klass] + list( @@ -240,9 +239,7 @@ def load(self, name: str, version: str, tarball: str) -> None: self.provider.load(LoadRequest(name=name, version=version, tarball=tarball)) # TODO: Is there a way to say that obj has to be an instance of klass? - def create( - self, klass: JSClass, obj: Any, args: Optional[List[Any]] = None - ) -> ObjRef: + def create(self, klass: Type, obj: Any, args: Optional[List[Any]] = None) -> ObjRef: if args is None: args = [] @@ -271,7 +268,7 @@ def delete(self, ref: ObjRef) -> None: self.provider.delete(DeleteRequest(objref=ref)) @_dereferenced - def get(self, obj: Referenceable, property: str) -> Any: + def get(self, obj: Any, property: str) -> Any: response = self.provider.get( GetRequest(objref=obj.__jsii_ref__, property=property) ) @@ -280,7 +277,7 @@ def get(self, obj: Referenceable, property: str) -> Any: else: return response.value - def set(self, obj: Referenceable, property: str, value: Any) -> None: + def set(self, obj: Any, property: str, value: Any) -> None: response = self.provider.set( SetRequest( objref=obj.__jsii_ref__, @@ -292,12 +289,12 @@ def set(self, obj: Referenceable, property: str, value: Any) -> None: _callback_till_result(self, response, SetResponse) @_dereferenced - def sget(self, klass: JSClass, property: str) -> Any: + def sget(self, klass: Type, property: str) -> Any: return self.provider.sget( StaticGetRequest(fqn=klass.__jsii_type__, property=property) ).value - def sset(self, klass: JSClass, property: str, value: Any) -> None: + def sset(self, klass: Type, property: str, value: Any) -> None: self.provider.sset( StaticSetRequest( fqn=klass.__jsii_type__, @@ -307,9 +304,7 @@ def sset(self, klass: JSClass, property: str, value: Any) -> None: ) @_dereferenced - def invoke( - self, obj: Referenceable, method: str, args: Optional[List[Any]] = None - ) -> Any: + def invoke(self, obj: Any, method: str, args: Optional[List[Any]] = None) -> Any: if args is None: args = [] @@ -327,7 +322,7 @@ def invoke( @_dereferenced def sinvoke( - self, klass: JSClass, method: str, args: Optional[List[Any]] = None + self, klass: Type, method: str, args: Optional[List[Any]] = None ) -> Any: if args is None: args = [] @@ -366,9 +361,7 @@ def sync_complete( response_type=response_type, ) - def ainvoke( - self, obj: Referenceable, method: str, args: Optional[List[Any]] = None - ) -> Any: + def ainvoke(self, obj: Any, method: str, args: Optional[List[Any]] = None) -> Any: if args is None: args = [] diff --git a/packages/@jsii/python-runtime/src/jsii/_kernel/types.py b/packages/@jsii/python-runtime/src/jsii/_kernel/types.py index b50123eed9..8adf783748 100644 --- a/packages/@jsii/python-runtime/src/jsii/_kernel/types.py +++ b/packages/@jsii/python-runtime/src/jsii/_kernel/types.py @@ -1,9 +1,8 @@ from typing import Union, List, Any, Optional, Mapping +from typing_extensions import Protocol import attr -from jsii.compat import Protocol - # TODO: # - HelloResponse @@ -242,19 +241,3 @@ class StatsResponse: StatsResponse, Callback, ] - - -class JSClass(Protocol): - @property - def __jsii_type__(self) -> str: - """ - Returns a str that points to this class inside of the Javascript runtime. - """ - - -class Referenceable(Protocol): - @property - def __jsii_ref__(self) -> ObjRef: - """ - Returns an ObjRef that points to this object on the JS side. - """ diff --git a/packages/@jsii/python-runtime/src/jsii/_reference_map.py b/packages/@jsii/python-runtime/src/jsii/_reference_map.py index 1ad016804f..dacf70c5dd 100644 --- a/packages/@jsii/python-runtime/src/jsii/_reference_map.py +++ b/packages/@jsii/python-runtime/src/jsii/_reference_map.py @@ -1,9 +1,7 @@ # This module exists to break an import cycle between jsii.runtime and jsii.kernel import inspect -from typing import Any, MutableMapping - -from ._kernel.types import JSClass, Referenceable +from typing import Any, MutableMapping, Type _types = {} @@ -12,7 +10,7 @@ _interfaces: MutableMapping[str, Any] = {} -def register_type(klass: JSClass): +def register_type(klass: Type): _types[klass.__jsii_type__] = klass @@ -42,7 +40,7 @@ def __init__(self, types): self._refs = {} self._types = types - def register(self, inst: Referenceable): + def register(self, inst: Any): self._refs[inst.__jsii_ref__.ref] = inst def resolve(self, kernel, ref): diff --git a/packages/@jsii/python-runtime/src/jsii/_runtime.py b/packages/@jsii/python-runtime/src/jsii/_runtime.py index ce4ad33105..c632035556 100644 --- a/packages/@jsii/python-runtime/src/jsii/_runtime.py +++ b/packages/@jsii/python-runtime/src/jsii/_runtime.py @@ -3,10 +3,13 @@ import attr -from jsii import _reference_map -from jsii._compat import importlib_resources -from jsii._kernel import Kernel -from jsii.python import _ClassPropertyMeta +from typing import ClassVar + +from . import _reference_map +from ._compat import importlib_resources +from ._kernel import Kernel +from .python import _ClassPropertyMeta +from ._kernel.types import ObjRef # Yea, a global here is kind of gross, however, there's not really a better way of diff --git a/packages/jsii-pacmak/.gitignore b/packages/jsii-pacmak/.gitignore index af7d0168b4..a72e62b716 100644 --- a/packages/jsii-pacmak/.gitignore +++ b/packages/jsii-pacmak/.gitignore @@ -4,6 +4,8 @@ lib/version.ts .settings target/ +.venv/ + *.js *.d.ts node_modules/ diff --git a/packages/jsii-pacmak/lib/targets/python.ts b/packages/jsii-pacmak/lib/targets/python.ts index 8450c28ca0..6296250ea8 100644 --- a/packages/jsii-pacmak/lib/targets/python.ts +++ b/packages/jsii-pacmak/lib/targets/python.ts @@ -1,6 +1,7 @@ import * as spec from '@jsii/spec'; import { CodeMaker, toSnakeCase } from 'codemaker'; import * as escapeStringRegexp from 'escape-string-regexp'; +import * as fs from 'fs-extra'; import * as reflect from 'jsii-reflect'; import * as path from 'path'; import { Generator, GeneratorOptions } from '../generator'; @@ -30,6 +31,8 @@ import { die, toPythonIdentifier } from './python/util'; // eslint-disable-next-line @typescript-eslint/no-var-requires,@typescript-eslint/no-require-imports const spdxLicenseList = require('spdx-license-list'); +const pythonBuildTools = ['setuptools~=49.3', 'wheel~=0.34']; + export default class Python extends Target { protected readonly generator: PythonGenerator; @@ -44,54 +47,51 @@ export default class Python extends Target { } public async build(sourceDir: string, outDir: string): Promise { + // Create a fresh virtual env + const venv = await fs.mkdtemp(path.join(sourceDir, '.env')); + const venvBin = path.join( + venv, + process.platform === 'win32' ? 'Scripts' : 'bin', + ); + await shell('python3', [ + '-m', + 'venv', + '--system-site-packages', // Allow using globally installed packages (saves time & disk space) + venv, + ]); + const env = { + ...process.env, + PATH: `${venvBin}:${process.env.PATH}`, + VIRTUAL_ENV: venv, + }; + const python = path.join(venvBin, 'python'); + // Install the necessary things + await shell( + python, + ['-m', 'pip', 'install', '--no-input', ...pythonBuildTools, 'twine~=3.2'], + { + cwd: sourceDir, + env, + }, + ); + // Actually package up our code, both as a sdist and a wheel for publishing. - await shell('python3', ['setup.py', 'sdist', '--dist-dir', outDir], { + await shell(python, ['setup.py', 'sdist', '--dist-dir', outDir], { cwd: sourceDir, + env, }); await shell( - 'python3', + python, ['-m', 'pip', 'wheel', '--no-deps', '--wheel-dir', outDir, sourceDir], { cwd: sourceDir, + env, }, ); - if (await isPresent('twine', sourceDir)) { - await shell('twine', ['check', path.join(outDir, '*')], { - cwd: sourceDir, - }); - } else if (await isPresent('pipx', sourceDir)) { - await shell('pipx', ['run', 'twine', 'check', path.join(outDir, '*')], { - cwd: sourceDir, - env: { - ...process.env, - PIPX_HOME: path.join(sourceDir, '.pipx'), - }, - }); - } else { - warn( - 'Unable to validate distribution packages because `twine` is not present. ' + - 'Run `pip3 install twine` to enable distribution package validation.', - ); - } - } -} - -// Approximating existence check using `which`, falling back on `pip3 show`. -async function isPresent(binary: string, sourceDir?: string): Promise { - try { - await shell('which', [binary], { + await shell(python, ['-m', 'twine', 'check', path.join(outDir, '*')], { cwd: sourceDir, + env, }); - return true; - } catch { - try { - const output = await shell('pip3', ['show', binary], { - cwd: sourceDir, - }); - return output.trim() !== ''; - } catch { - return false; - } } } @@ -724,7 +724,8 @@ abstract class BaseProperty implements PythonBase { const { renderAbstract = true, forceEmitBody = false } = opts ?? {}; const pythonType = toTypeName(this.type).pythonType(context); - code.line(`@${this.decorator}`); + // # type: ignore is needed because mypy cannot check decorated things + code.line(`@${this.decorator} # type: ignore`); code.line(`@jsii.member(jsii_name="${this.jsName}")`); if (renderAbstract && this.abstract) { code.line('@abc.abstractmethod'); @@ -754,7 +755,8 @@ abstract class BaseProperty implements PythonBase { if (!this.immutable) { code.line(); - code.line(`@${this.pythonName}.setter`); + // # type: ignore is required because mypy cannot check decorated things + code.line(`@${this.pythonName}.setter # type: ignore`); if (renderAbstract && this.abstract) { code.line('@abc.abstractmethod'); } @@ -795,17 +797,18 @@ class Interface extends BasePythonClassType { // Then, we have to emit a Proxy class which implements our proxy interface. const proxyBases: string[] = this.bases.map( (b) => + // MyPy cannot check dynamic base classes (naturally) `jsii.proxy_for(${toTypeName(b).pythonType({ ...context, typeAnnotation: false, - })})`, + })}) # type: ignore`, ); openSignature(code, 'class', this.getProxyClassName(), proxyBases); this.generator.emitDocString(code, this.docs, { documentableItem: `class-${this.pythonName}`, trailingNewLine: true, }); - code.line(`__jsii_type__ = "${this.fqn}"`); + code.line(`__jsii_type__: typing.ClassVar[str] = "${this.fqn}"`); if (this.members.length > 0) { for (const member of this.members) { @@ -826,7 +829,7 @@ class Interface extends BasePythonClassType { toTypeName(b).pythonType({ ...context, typeAnnotation: false }), ); - params.push('jsii.compat.Protocol'); + params.push('typing_extensions.Protocol'); return params; } @@ -954,7 +957,7 @@ class Struct extends BasePythonClassType { // Required properties, those will always be put into the dict assignDictionary( code, - `${implicitParameter}._values`, + `${implicitParameter}._values: typing.Dict[str, typing.Any]`, members .filter((m) => !m.optional) .map( @@ -1001,20 +1004,29 @@ class Struct extends BasePythonClassType { member.typeAnnotation(context), ); member.emitDocString(code); - code.line(`return self._values.get(${JSON.stringify(member.pythonName)})`); + code.line( + `result = self._values.get(${JSON.stringify(member.pythonName)})`, + ); + if (!member.optional) { + // Add an assertion to maye MyPY happy! + code.line( + `assert result is not None, "Required property '${member.pythonName}' is missing"`, + ); + } + code.line('return result'); code.closeBlock(); } private emitMagicMethods(code: CodeMaker) { code.line(); - code.openBlock('def __eq__(self, rhs) -> bool'); + code.openBlock('def __eq__(self, rhs: typing.Any) -> builtins.bool'); code.line( 'return isinstance(rhs, self.__class__) and rhs._values == self._values', ); code.closeBlock(); code.line(); - code.openBlock('def __ne__(self, rhs) -> bool'); + code.openBlock('def __ne__(self, rhs: typing.Any) -> builtins.bool'); code.line('return not (rhs == self)'); code.closeBlock(); @@ -1179,11 +1191,12 @@ class Class extends BasePythonClassType implements ISortableType { const proxyBases = [this.pythonName]; for (const base of this.abstractBases) { + // MyPy cannot check dynamic base types (naturally) proxyBases.push( `jsii.proxy_for(${toTypeName(base).pythonType({ ...context, typeAnnotation: false, - })})`, + })}) # type: ignore`, ); } @@ -1383,8 +1396,8 @@ class PythonModule implements PythonType { code.line('import typing'); code.line(); code.line('import jsii'); - code.line('import jsii.compat'); code.line('import publication'); + code.line('import typing_extensions'); // Determine if we need to write out the kernel load line. if (this.loadAssembly) { @@ -1780,7 +1793,9 @@ class Package { // TODO: Might be easier to just use a TOML library to write this out. code.openFile('pyproject.toml'); code.line('[build-system]'); - code.line('requires = ["setuptools >= 49.3.1", "wheel >= 0.34.2"]'); + code.line( + `requires = [${pythonBuildTools.map((x) => `"${x}"`).join(', ')}]`, + ); code.line('build-backend = "setuptools.build_meta"'); code.closeFile('pyproject.toml'); @@ -2576,14 +2591,17 @@ function openSignature( const join = ', '; const { elementsSize, joinSize } = totalSizeOf(params, join); + const hasComments = !params.some((param) => /# .+$/.exec(param)); + if ( + hasComments && TARGET_LINE_LENGTH > - code.currentIndentLength + - prefix.length + - elementsSize + - joinSize + - suffix.length + - 2 + code.currentIndentLength + + prefix.length + + elementsSize + + joinSize + + suffix.length + + 2 ) { code.openBlock(`${prefix}(${params.join(join)})${suffix}`); return; @@ -2591,13 +2609,17 @@ function openSignature( code.indent(`${prefix}(`); if ( + !hasComments && TARGET_LINE_LENGTH > - code.currentIndentLength + elementsSize + joinSize + (trailingComma ? 1 : 0) + code.currentIndentLength + + elementsSize + + joinSize + + (trailingComma ? 1 : 0) ) { code.line(`${params.join(join)}${trailingComma ? ',' : ''}`); } else { for (const param of params) { - code.line(`${param},`); + code.line(param.replace(/(\s*# .+)?$/, ',$1')); } } code.unindent(false); diff --git a/packages/jsii-pacmak/lib/targets/python/type-name.ts b/packages/jsii-pacmak/lib/targets/python/type-name.ts index 2659c432ac..d8cb56b020 100644 --- a/packages/jsii-pacmak/lib/targets/python/type-name.ts +++ b/packages/jsii-pacmak/lib/targets/python/type-name.ts @@ -131,7 +131,7 @@ class Dict implements TypeName { } public pythonType(context: NamingContext) { - return `typing.Mapping[str, ${this.#element.pythonType(context)}]`; + return `typing.Mapping[builtins.str, ${this.#element.pythonType(context)}]`; } public requiredImports(context: NamingContext) { @@ -181,10 +181,10 @@ class Optional implements TypeName { } class Primitive implements TypeName { - private static readonly BOOL = new Primitive('bool'); + private static readonly BOOL = new Primitive('builtins.bool'); private static readonly DATE = new Primitive('datetime.datetime'); private static readonly JSII_NUMBER = new Primitive('jsii.Number'); // "jsii" is always already imported! - private static readonly STR = new Primitive('str'); + private static readonly STR = new Primitive('builtins.str'); private static readonly JSON = new Primitive( 'typing.Mapping[typing.Any, typing.Any]', ); diff --git a/packages/jsii-pacmak/test/__snapshots__/jsii-pacmak.test.ts.snap b/packages/jsii-pacmak/test/__snapshots__/jsii-pacmak.test.ts.snap index e2b9cc1fad..bd4d99786a 100644 --- a/packages/jsii-pacmak/test/__snapshots__/jsii-pacmak.test.ts.snap +++ b/packages/jsii-pacmak/test/__snapshots__/jsii-pacmak.test.ts.snap @@ -982,7 +982,7 @@ exports[`Generated code for "@scope/jsii-calc-base": /python/README.md 1 exports[`Generated code for "@scope/jsii-calc-base": /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools >= 49.3.1", "wheel >= 0.34.2"] +requires = ["setuptools~=49.3", "wheel~=0.34"] build-backend = "setuptools.build_meta" `; @@ -1059,8 +1059,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from ._jsii import * @@ -1096,28 +1096,37 @@ class _BaseProxy(Base): name_mapping={"foo": "foo", "bar": "bar"}, ) class BaseProps(scope.jsii_calc_base_of_base.VeryBaseProps): - def __init__(self, *, foo: scope.jsii_calc_base_of_base.Very, bar: str) -> None: + def __init__( + self, + *, + foo: scope.jsii_calc_base_of_base.Very, + bar: builtins.str, + ) -> None: """ :param foo: - :param bar: - """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "foo": foo, "bar": bar, } @builtins.property def foo(self) -> scope.jsii_calc_base_of_base.Very: - return self._values.get("foo") + result = self._values.get("foo") + assert result is not None, "Required property 'foo' is missing" + return result @builtins.property - def bar(self) -> str: - return self._values.get("bar") + def bar(self) -> builtins.str: + result = self._values.get("bar") + assert result is not None, "Required property 'bar' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -1128,7 +1137,8 @@ class BaseProps(scope.jsii_calc_base_of_base.VeryBaseProps): @jsii.interface(jsii_type="@scope/jsii-calc-base.IBaseInterface") class IBaseInterface( - scope.jsii_calc_base_of_base.IVeryBaseInterface, jsii.compat.Protocol + scope.jsii_calc_base_of_base.IVeryBaseInterface, + typing_extensions.Protocol, ): @builtins.staticmethod def __jsii_proxy_class__(): @@ -1140,9 +1150,9 @@ class IBaseInterface( class _IBaseInterfaceProxy( - jsii.proxy_for(scope.jsii_calc_base_of_base.IVeryBaseInterface) + jsii.proxy_for(scope.jsii_calc_base_of_base.IVeryBaseInterface) # type: ignore ): - __jsii_type__ = "@scope/jsii-calc-base.IBaseInterface" + __jsii_type__: typing.ClassVar[str] = "@scope/jsii-calc-base.IBaseInterface" @jsii.member(jsii_name="bar") def bar(self) -> None: @@ -1167,8 +1177,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions import scope.jsii_calc_base_of_base._jsii @@ -2141,7 +2151,7 @@ exports[`Generated code for "@scope/jsii-calc-base-of-base": /python/REA exports[`Generated code for "@scope/jsii-calc-base-of-base": /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools >= 49.3.1", "wheel >= 0.34.2"] +requires = ["setuptools~=49.3", "wheel~=0.34"] build-backend = "setuptools.build_meta" `; @@ -2217,14 +2227,14 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from ._jsii import * @jsii.interface(jsii_type="@scope/jsii-calc-base-of-base.IVeryBaseInterface") -class IVeryBaseInterface(jsii.compat.Protocol): +class IVeryBaseInterface(typing_extensions.Protocol): @builtins.staticmethod def __jsii_proxy_class__(): return _IVeryBaseInterfaceProxy @@ -2235,7 +2245,7 @@ class IVeryBaseInterface(jsii.compat.Protocol): class _IVeryBaseInterfaceProxy: - __jsii_type__ = "@scope/jsii-calc-base-of-base.IVeryBaseInterface" + __jsii_type__: typing.ClassVar[str] = "@scope/jsii-calc-base-of-base.IVeryBaseInterface" @jsii.member(jsii_name="foo") def foo(self) -> None: @@ -2243,7 +2253,8 @@ class _IVeryBaseInterfaceProxy: class StaticConsumer( - metaclass=jsii.JSIIMeta, jsii_type="@scope/jsii-calc-base-of-base.StaticConsumer" + metaclass=jsii.JSIIMeta, + jsii_type="@scope/jsii-calc-base-of-base.StaticConsumer", ): @jsii.member(jsii_name="consume") @builtins.classmethod @@ -2273,18 +2284,20 @@ class VeryBaseProps: """ :param foo: - """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "foo": foo, } @builtins.property def foo(self) -> "Very": - return self._values.get("foo") + result = self._values.get("foo") + assert result is not None, "Required property 'foo' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -2312,8 +2325,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions __jsii_assembly__ = jsii.JSIIAssembly.load( "@scope/jsii-calc-base-of-base", @@ -6128,7 +6141,7 @@ exports[`Generated code for "@scope/jsii-calc-lib": /python/README.md 1` exports[`Generated code for "@scope/jsii-calc-lib": /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools >= 49.3.1", "wheel >= 0.34.2"] +requires = ["setuptools~=49.3", "wheel~=0.34"] build-backend = "setuptools.build_meta" `; @@ -6208,8 +6221,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from ._jsii import * @@ -6239,7 +6252,7 @@ class EnumFromScopedModule(enum.Enum): @jsii.interface(jsii_type="@scope/jsii-calc-lib.IDoublable") -class IDoublable(jsii.compat.Protocol): +class IDoublable(typing_extensions.Protocol): """The general contract for a concrete number. stability @@ -6250,7 +6263,7 @@ class IDoublable(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IDoublableProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="doubleValue") def double_value(self) -> jsii.Number: """ @@ -6267,9 +6280,9 @@ class _IDoublableProxy: :stability: deprecated """ - __jsii_type__ = "@scope/jsii-calc-lib.IDoublable" + __jsii_type__: typing.ClassVar[str] = "@scope/jsii-calc-lib.IDoublable" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="doubleValue") def double_value(self) -> jsii.Number: """ @@ -6280,7 +6293,7 @@ class _IDoublableProxy: @jsii.interface(jsii_type="@scope/jsii-calc-lib.IFriendly") -class IFriendly(jsii.compat.Protocol): +class IFriendly(typing_extensions.Protocol): """Applies to classes that are considered friendly. These classes can be greeted with @@ -6295,7 +6308,7 @@ class IFriendly(jsii.compat.Protocol): return _IFriendlyProxy @jsii.member(jsii_name="hello") - def hello(self) -> str: + def hello(self) -> builtins.str: """Say hello! stability @@ -6314,10 +6327,10 @@ class _IFriendlyProxy: :stability: deprecated """ - __jsii_type__ = "@scope/jsii-calc-lib.IFriendly" + __jsii_type__: typing.ClassVar[str] = "@scope/jsii-calc-lib.IFriendly" @jsii.member(jsii_name="hello") - def hello(self) -> str: + def hello(self) -> builtins.str: """Say hello! stability @@ -6327,7 +6340,10 @@ class _IFriendlyProxy: @jsii.interface(jsii_type="@scope/jsii-calc-lib.IThreeLevelsInterface") -class IThreeLevelsInterface(scope.jsii_calc_base.IBaseInterface, jsii.compat.Protocol): +class IThreeLevelsInterface( + scope.jsii_calc_base.IBaseInterface, + typing_extensions.Protocol, +): """Interface that inherits from packages 2 levels up the tree. Their presence validates that .NET/Java/jsii-reflect can track all fields @@ -6350,7 +6366,9 @@ class IThreeLevelsInterface(scope.jsii_calc_base.IBaseInterface, jsii.compat.Pro ... -class _IThreeLevelsInterfaceProxy(jsii.proxy_for(scope.jsii_calc_base.IBaseInterface)): +class _IThreeLevelsInterfaceProxy( + jsii.proxy_for(scope.jsii_calc_base.IBaseInterface) # type: ignore +): """Interface that inherits from packages 2 levels up the tree. Their presence validates that .NET/Java/jsii-reflect can track all fields @@ -6360,7 +6378,7 @@ class _IThreeLevelsInterfaceProxy(jsii.proxy_for(scope.jsii_calc_base.IBaseInter :stability: deprecated """ - __jsii_type__ = "@scope/jsii-calc-lib.IThreeLevelsInterface" + __jsii_type__: typing.ClassVar[str] = "@scope/jsii-calc-lib.IThreeLevelsInterface" @jsii.member(jsii_name="baz") def baz(self) -> None: @@ -6385,8 +6403,8 @@ class MyFirstStruct: self, *, anumber: jsii.Number, - astring: str, - first_optional: typing.Optional[typing.List[str]] = None, + astring: builtins.str, + first_optional: typing.Optional[typing.List[builtins.str]] = None, ) -> None: """This is the first struct we have created in jsii. @@ -6397,7 +6415,7 @@ class MyFirstStruct: stability :stability: deprecated """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "anumber": anumber, "astring": astring, } @@ -6411,29 +6429,34 @@ class MyFirstStruct: stability :stability: deprecated """ - return self._values.get("anumber") + result = self._values.get("anumber") + assert result is not None, "Required property 'anumber' is missing" + return result @builtins.property - def astring(self) -> str: + def astring(self) -> builtins.str: """A string value. stability :stability: deprecated """ - return self._values.get("astring") + result = self._values.get("astring") + assert result is not None, "Required property 'astring' is missing" + return result @builtins.property - def first_optional(self) -> typing.Optional[typing.List[str]]: + def first_optional(self) -> typing.Optional[typing.List[builtins.str]]: """ stability :stability: deprecated """ - return self._values.get("first_optional") + result = self._values.get("first_optional") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -6455,9 +6478,9 @@ class StructWithOnlyOptionals: def __init__( self, *, - optional1: typing.Optional[str] = None, + optional1: typing.Optional[builtins.str] = None, optional2: typing.Optional[jsii.Number] = None, - optional3: typing.Optional[bool] = None, + optional3: typing.Optional[builtins.bool] = None, ) -> None: """This is a struct with only optional properties. @@ -6468,7 +6491,7 @@ class StructWithOnlyOptionals: stability :stability: deprecated """ - self._values = {} + self._values: typing.Dict[str, typing.Any] = {} if optional1 is not None: self._values["optional1"] = optional1 if optional2 is not None: @@ -6477,13 +6500,14 @@ class StructWithOnlyOptionals: self._values["optional3"] = optional3 @builtins.property - def optional1(self) -> typing.Optional[str]: + def optional1(self) -> typing.Optional[builtins.str]: """The first optional! stability :stability: deprecated """ - return self._values.get("optional1") + result = self._values.get("optional1") + return result @builtins.property def optional2(self) -> typing.Optional[jsii.Number]: @@ -6491,20 +6515,22 @@ class StructWithOnlyOptionals: stability :stability: deprecated """ - return self._values.get("optional2") + result = self._values.get("optional2") + return result @builtins.property - def optional3(self) -> typing.Optional[bool]: + def optional3(self) -> typing.Optional[builtins.bool]: """ stability :stability: deprecated """ - return self._values.get("optional3") + result = self._values.get("optional3") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -6532,7 +6558,7 @@ class Value( jsii.create(Value, self, []) @jsii.member(jsii_name="toString") - def to_string(self) -> str: + def to_string(self) -> builtins.str: """String representation of the value. stability @@ -6540,7 +6566,7 @@ class Value( """ return jsii.invoke(self, "toString", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") @abc.abstractmethod def value(self) -> jsii.Number: @@ -6552,8 +6578,10 @@ class Value( ... -class _ValueProxy(Value, jsii.proxy_for(scope.jsii_calc_base.Base)): - @builtins.property +class _ValueProxy( + Value, jsii.proxy_for(scope.jsii_calc_base.Base) # type: ignore +): + @builtins.property # type: ignore @jsii.member(jsii_name="value") def value(self) -> jsii.Number: """The value. @@ -6582,7 +6610,7 @@ class Number(Value, metaclass=jsii.JSIIMeta, jsii_type="@scope/jsii-calc-lib.Num """ jsii.create(Number, self, [value]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="doubleValue") def double_value(self) -> jsii.Number: """The number multiplied by 2. @@ -6592,7 +6620,7 @@ class Number(Value, metaclass=jsii.JSIIMeta, jsii_type="@scope/jsii-calc-lib.Num """ return jsii.get(self, "doubleValue") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") def value(self) -> jsii.Number: """The number. @@ -6604,7 +6632,9 @@ class Number(Value, metaclass=jsii.JSIIMeta, jsii_type="@scope/jsii-calc-lib.Num class Operation( - Value, metaclass=jsii.JSIIAbstractClass, jsii_type="@scope/jsii-calc-lib.Operation" + Value, + metaclass=jsii.JSIIAbstractClass, + jsii_type="@scope/jsii-calc-lib.Operation", ): """Represents an operation on values. @@ -6621,7 +6651,7 @@ class Operation( @jsii.member(jsii_name="toString") @abc.abstractmethod - def to_string(self) -> str: + def to_string(self) -> builtins.str: """String representation of the value. stability @@ -6630,9 +6660,11 @@ class Operation( ... -class _OperationProxy(Operation, jsii.proxy_for(Value)): +class _OperationProxy( + Operation, jsii.proxy_for(Value) # type: ignore +): @jsii.member(jsii_name="toString") - def to_string(self) -> str: + def to_string(self) -> builtins.str: """String representation of the value. stability @@ -6665,8 +6697,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions import scope.jsii_calc_base._jsii import scope.jsii_calc_base_of_base._jsii @@ -6693,14 +6725,14 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from .._jsii import * @jsii.interface(jsii_type="@scope/jsii-calc-lib.submodule.IReflectable") -class IReflectable(jsii.compat.Protocol): +class IReflectable(typing_extensions.Protocol): """ stability :stability: deprecated @@ -6710,7 +6742,7 @@ class IReflectable(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IReflectableProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="entries") def entries(self) -> typing.List["ReflectableEntry"]: """ @@ -6726,9 +6758,9 @@ class _IReflectableProxy: :stability: deprecated """ - __jsii_type__ = "@scope/jsii-calc-lib.submodule.IReflectable" + __jsii_type__: typing.ClassVar[str] = "@scope/jsii-calc-lib.submodule.IReflectable" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="entries") def entries(self) -> typing.List["ReflectableEntry"]: """ @@ -6739,7 +6771,8 @@ class _IReflectableProxy: class NestingClass( - metaclass=jsii.JSIIMeta, jsii_type="@scope/jsii-calc-lib.submodule.NestingClass" + metaclass=jsii.JSIIMeta, + jsii_type="@scope/jsii-calc-lib.submodule.NestingClass", ): """This class is here to show we can use nested classes across module boundaries. @@ -6764,9 +6797,9 @@ class NestingClass( """ jsii.create(NestingClass.NestedClass, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="property") - def property(self) -> str: + def property(self) -> builtins.str: """ stability :stability: deprecated @@ -6779,7 +6812,7 @@ class NestingClass( name_mapping={"name": "name"}, ) class NestedStruct: - def __init__(self, *, name: str) -> None: + def __init__(self, *, name: builtins.str) -> None: """This is a struct, nested within a class. Normal. @@ -6789,22 +6822,24 @@ class NestingClass( stability :stability: deprecated """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "name": name, } @builtins.property - def name(self) -> str: + def name(self) -> builtins.str: """ stability :stability: deprecated """ - return self._values.get("name") + result = self._values.get("name") + assert result is not None, "Required property 'name' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -6819,7 +6854,7 @@ class NestingClass( name_mapping={"key": "key", "value": "value"}, ) class ReflectableEntry: - def __init__(self, *, key: str, value: typing.Any) -> None: + def __init__(self, *, key: builtins.str, value: typing.Any) -> None: """ :param key: :param value: @@ -6827,18 +6862,20 @@ class ReflectableEntry: stability :stability: deprecated """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "key": key, "value": value, } @builtins.property - def key(self) -> str: + def key(self) -> builtins.str: """ stability :stability: deprecated """ - return self._values.get("key") + result = self._values.get("key") + assert result is not None, "Required property 'key' is missing" + return result @builtins.property def value(self) -> typing.Any: @@ -6846,12 +6883,14 @@ class ReflectableEntry: stability :stability: deprecated """ - return self._values.get("value") + result = self._values.get("value") + assert result is not None, "Required property 'value' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -6861,7 +6900,8 @@ class ReflectableEntry: class Reflector( - metaclass=jsii.JSIIMeta, jsii_type="@scope/jsii-calc-lib.submodule.Reflector" + metaclass=jsii.JSIIMeta, + jsii_type="@scope/jsii-calc-lib.submodule.Reflector", ): """ stability @@ -6876,7 +6916,10 @@ class Reflector( jsii.create(Reflector, self, []) @jsii.member(jsii_name="asMap") - def as_map(self, reflectable: "IReflectable") -> typing.Mapping[str, typing.Any]: + def as_map( + self, + reflectable: "IReflectable", + ) -> typing.Mapping[builtins.str, typing.Any]: """ :param reflectable: - @@ -61999,7 +62042,7 @@ foo = "bar" exports[`Generated code for "jsii-calc": /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools >= 49.3.1", "wheel >= 0.34.2"] +requires = ["setuptools~=49.3", "wheel~=0.34"] build-backend = "setuptools.build_meta" `; @@ -62120,8 +62163,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from ._jsii import * @@ -62133,7 +62176,8 @@ from .composition import CompositeOperation as _CompositeOperation_1c4d123b class AbstractClassBase( - metaclass=jsii.JSIIAbstractClass, jsii_type="jsii-calc.AbstractClassBase" + metaclass=jsii.JSIIAbstractClass, + jsii_type="jsii-calc.AbstractClassBase", ): """ stability @@ -62151,10 +62195,10 @@ class AbstractClassBase( """ jsii.create(AbstractClassBase, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="abstractProperty") @abc.abstractmethod - def abstract_property(self) -> str: + def abstract_property(self) -> builtins.str: """ stability :stability: experimental @@ -62163,9 +62207,9 @@ class AbstractClassBase( class _AbstractClassBaseProxy(AbstractClassBase): - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="abstractProperty") - def abstract_property(self) -> str: + def abstract_property(self) -> builtins.str: """ stability :stability: experimental @@ -62174,7 +62218,8 @@ class _AbstractClassBaseProxy(AbstractClassBase): class AbstractClassReturner( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AbstractClassReturner" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.AbstractClassReturner", ): """ stability @@ -62204,7 +62249,7 @@ class AbstractClassReturner( """ return jsii.invoke(self, "giveMeInterface", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="returnAbstractFromProperty") def return_abstract_from_property(self) -> "AbstractClassBase": """ @@ -62215,7 +62260,8 @@ class AbstractClassReturner( class AbstractSuite( - metaclass=jsii.JSIIAbstractClass, jsii_type="jsii-calc.AbstractSuite" + metaclass=jsii.JSIIAbstractClass, + jsii_type="jsii-calc.AbstractSuite", ): """Ensures abstract members implementations correctly register overrides in various languages. @@ -62236,7 +62282,7 @@ class AbstractSuite( @jsii.member(jsii_name="someMethod") @abc.abstractmethod - def _some_method(self, str: str) -> str: + def _some_method(self, str: builtins.str) -> builtins.str: """ :param str: - @@ -62246,7 +62292,7 @@ class AbstractSuite( ... @jsii.member(jsii_name="workItAll") - def work_it_all(self, seed: str) -> str: + def work_it_all(self, seed: builtins.str) -> builtins.str: """Sets \`\`seed\`\` to \`\`this.property\`\`, then calls \`\`someMethod\`\` with \`\`this.property\`\` and returns the result. :param seed: a \`\`string\`\`. @@ -62256,25 +62302,25 @@ class AbstractSuite( """ return jsii.invoke(self, "workItAll", [seed]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="property") @abc.abstractmethod - def _property(self) -> str: + def _property(self) -> builtins.str: """ stability :stability: experimental """ ... - @_property.setter + @_property.setter # type: ignore @abc.abstractmethod - def _property(self, value: str) -> None: + def _property(self, value: builtins.str) -> None: ... class _AbstractSuiteProxy(AbstractSuite): @jsii.member(jsii_name="someMethod") - def _some_method(self, str: str) -> str: + def _some_method(self, str: builtins.str) -> builtins.str: """ :param str: - @@ -62283,17 +62329,17 @@ class _AbstractSuiteProxy(AbstractSuite): """ return jsii.invoke(self, "someMethod", [str]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="property") - def _property(self) -> str: + def _property(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "property") - @_property.setter - def _property(self, value: str) -> None: + @_property.setter # type: ignore + def _property(self, value: builtins.str) -> None: jsii.set(self, "property", value) @@ -62342,7 +62388,7 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): """ return jsii.invoke(self, "enumMethod", [value]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="enumPropertyValue") def enum_property_value(self) -> jsii.Number: """ @@ -62351,7 +62397,7 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): """ return jsii.get(self, "enumPropertyValue") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="anyArrayProperty") def any_array_property(self) -> typing.List[typing.Any]: """ @@ -62360,24 +62406,24 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): """ return jsii.get(self, "anyArrayProperty") - @any_array_property.setter + @any_array_property.setter # type: ignore def any_array_property(self, value: typing.List[typing.Any]) -> None: jsii.set(self, "anyArrayProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="anyMapProperty") - def any_map_property(self) -> typing.Mapping[str, typing.Any]: + def any_map_property(self) -> typing.Mapping[builtins.str, typing.Any]: """ stability :stability: experimental """ return jsii.get(self, "anyMapProperty") - @any_map_property.setter - def any_map_property(self, value: typing.Mapping[str, typing.Any]) -> None: + @any_map_property.setter # type: ignore + def any_map_property(self, value: typing.Mapping[builtins.str, typing.Any]) -> None: jsii.set(self, "anyMapProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="anyProperty") def any_property(self) -> typing.Any: """ @@ -62386,37 +62432,37 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): """ return jsii.get(self, "anyProperty") - @any_property.setter + @any_property.setter # type: ignore def any_property(self, value: typing.Any) -> None: jsii.set(self, "anyProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="arrayProperty") - def array_property(self) -> typing.List[str]: + def array_property(self) -> typing.List[builtins.str]: """ stability :stability: experimental """ return jsii.get(self, "arrayProperty") - @array_property.setter - def array_property(self, value: typing.List[str]) -> None: + @array_property.setter # type: ignore + def array_property(self, value: typing.List[builtins.str]) -> None: jsii.set(self, "arrayProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="booleanProperty") - def boolean_property(self) -> bool: + def boolean_property(self) -> builtins.bool: """ stability :stability: experimental """ return jsii.get(self, "booleanProperty") - @boolean_property.setter - def boolean_property(self, value: bool) -> None: + @boolean_property.setter # type: ignore + def boolean_property(self, value: builtins.bool) -> None: jsii.set(self, "booleanProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="dateProperty") def date_property(self) -> datetime.datetime: """ @@ -62425,11 +62471,11 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): """ return jsii.get(self, "dateProperty") - @date_property.setter + @date_property.setter # type: ignore def date_property(self, value: datetime.datetime) -> None: jsii.set(self, "dateProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="enumProperty") def enum_property(self) -> "AllTypesEnum": """ @@ -62438,11 +62484,11 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): """ return jsii.get(self, "enumProperty") - @enum_property.setter + @enum_property.setter # type: ignore def enum_property(self, value: "AllTypesEnum") -> None: jsii.set(self, "enumProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="jsonProperty") def json_property(self) -> typing.Mapping[typing.Any, typing.Any]: """ @@ -62451,26 +62497,27 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): """ return jsii.get(self, "jsonProperty") - @json_property.setter + @json_property.setter # type: ignore def json_property(self, value: typing.Mapping[typing.Any, typing.Any]) -> None: jsii.set(self, "jsonProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mapProperty") - def map_property(self) -> typing.Mapping[str, scope.jsii_calc_lib.Number]: + def map_property(self) -> typing.Mapping[builtins.str, scope.jsii_calc_lib.Number]: """ stability :stability: experimental """ return jsii.get(self, "mapProperty") - @map_property.setter + @map_property.setter # type: ignore def map_property( - self, value: typing.Mapping[str, scope.jsii_calc_lib.Number] + self, + value: typing.Mapping[builtins.str, scope.jsii_calc_lib.Number], ) -> None: jsii.set(self, "mapProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="numberProperty") def number_property(self) -> jsii.Number: """ @@ -62479,24 +62526,24 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): """ return jsii.get(self, "numberProperty") - @number_property.setter + @number_property.setter # type: ignore def number_property(self, value: jsii.Number) -> None: jsii.set(self, "numberProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="stringProperty") - def string_property(self) -> str: + def string_property(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "stringProperty") - @string_property.setter - def string_property(self, value: str) -> None: + @string_property.setter # type: ignore + def string_property(self, value: builtins.str) -> None: jsii.set(self, "stringProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="unionArrayProperty") def union_array_property( self, @@ -62507,49 +62554,50 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): """ return jsii.get(self, "unionArrayProperty") - @union_array_property.setter + @union_array_property.setter # type: ignore def union_array_property( - self, value: typing.List[typing.Union[jsii.Number, scope.jsii_calc_lib.Value]] + self, + value: typing.List[typing.Union[jsii.Number, scope.jsii_calc_lib.Value]], ) -> None: jsii.set(self, "unionArrayProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="unionMapProperty") def union_map_property( self, - ) -> typing.Mapping[str, typing.Union[str, jsii.Number, scope.jsii_calc_lib.Number]]: + ) -> typing.Mapping[builtins.str, typing.Union[builtins.str, jsii.Number, scope.jsii_calc_lib.Number]]: """ stability :stability: experimental """ return jsii.get(self, "unionMapProperty") - @union_map_property.setter + @union_map_property.setter # type: ignore def union_map_property( self, - value: typing.Mapping[str, typing.Union[str, jsii.Number, scope.jsii_calc_lib.Number]], + value: typing.Mapping[builtins.str, typing.Union[builtins.str, jsii.Number, scope.jsii_calc_lib.Number]], ) -> None: jsii.set(self, "unionMapProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="unionProperty") def union_property( self, - ) -> typing.Union[str, jsii.Number, "Multiply", scope.jsii_calc_lib.Number]: + ) -> typing.Union[builtins.str, jsii.Number, "Multiply", scope.jsii_calc_lib.Number]: """ stability :stability: experimental """ return jsii.get(self, "unionProperty") - @union_property.setter + @union_property.setter # type: ignore def union_property( self, - value: typing.Union[str, jsii.Number, "Multiply", scope.jsii_calc_lib.Number], + value: typing.Union[builtins.str, jsii.Number, "Multiply", scope.jsii_calc_lib.Number], ) -> None: jsii.set(self, "unionProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="unknownArrayProperty") def unknown_array_property(self) -> typing.List[typing.Any]: """ @@ -62558,24 +62606,27 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): """ return jsii.get(self, "unknownArrayProperty") - @unknown_array_property.setter + @unknown_array_property.setter # type: ignore def unknown_array_property(self, value: typing.List[typing.Any]) -> None: jsii.set(self, "unknownArrayProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="unknownMapProperty") - def unknown_map_property(self) -> typing.Mapping[str, typing.Any]: + def unknown_map_property(self) -> typing.Mapping[builtins.str, typing.Any]: """ stability :stability: experimental """ return jsii.get(self, "unknownMapProperty") - @unknown_map_property.setter - def unknown_map_property(self, value: typing.Mapping[str, typing.Any]) -> None: + @unknown_map_property.setter # type: ignore + def unknown_map_property( + self, + value: typing.Mapping[builtins.str, typing.Any], + ) -> None: jsii.set(self, "unknownMapProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="unknownProperty") def unknown_property(self) -> typing.Any: """ @@ -62584,11 +62635,11 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): """ return jsii.get(self, "unknownProperty") - @unknown_property.setter + @unknown_property.setter # type: ignore def unknown_property(self, value: typing.Any) -> None: jsii.set(self, "unknownProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="optionalEnumValue") def optional_enum_value(self) -> typing.Optional["StringEnum"]: """ @@ -62597,7 +62648,7 @@ class AllTypes(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllTypes"): """ return jsii.get(self, "optionalEnumValue") - @optional_enum_value.setter + @optional_enum_value.setter # type: ignore def optional_enum_value(self, value: typing.Optional["StringEnum"]) -> None: jsii.set(self, "optionalEnumValue", value) @@ -62627,7 +62678,8 @@ class AllTypesEnum(enum.Enum): class AllowedMethodNames( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AllowedMethodNames" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.AllowedMethodNames", ): """ stability @@ -62642,7 +62694,7 @@ class AllowedMethodNames( jsii.create(AllowedMethodNames, self, []) @jsii.member(jsii_name="getBar") - def get_bar(self, _p1: str, _p2: jsii.Number) -> None: + def get_bar(self, _p1: builtins.str, _p2: jsii.Number) -> None: """ :param _p1: - :param _p2: - @@ -62653,7 +62705,7 @@ class AllowedMethodNames( return jsii.invoke(self, "getBar", [_p1, _p2]) @jsii.member(jsii_name="getFoo") - def get_foo(self, with_param: str) -> str: + def get_foo(self, with_param: builtins.str) -> builtins.str: """getXxx() is not allowed (see negatives), but getXxx(a, ...) is okay. :param with_param: - @@ -62664,7 +62716,7 @@ class AllowedMethodNames( return jsii.invoke(self, "getFoo", [with_param]) @jsii.member(jsii_name="setBar") - def set_bar(self, _x: str, _y: jsii.Number, _z: bool) -> None: + def set_bar(self, _x: builtins.str, _y: jsii.Number, _z: builtins.bool) -> None: """ :param _x: - :param _y: - @@ -62676,7 +62728,7 @@ class AllowedMethodNames( return jsii.invoke(self, "setBar", [_x, _y, _z]) @jsii.member(jsii_name="setFoo") - def set_foo(self, _x: str, _y: jsii.Number) -> None: + def set_foo(self, _x: builtins.str, _y: jsii.Number) -> None: """setFoo(x) is not allowed (see negatives), but setXxx(a, b, ...) is okay. :param _x: - @@ -62689,7 +62741,8 @@ class AllowedMethodNames( class AmbiguousParameters( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AmbiguousParameters" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.AmbiguousParameters", ): """ stability @@ -62697,7 +62750,11 @@ class AmbiguousParameters( """ def __init__( - self, scope_: "Bell", *, scope: str, props: typing.Optional[bool] = None + self, + scope_: "Bell", + *, + scope: builtins.str, + props: typing.Optional[builtins.bool] = None, ) -> None: """ :param scope_: - @@ -62711,7 +62768,7 @@ class AmbiguousParameters( jsii.create(AmbiguousParameters, self, [scope_, props_]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="props") def props(self) -> "StructParameterType": """ @@ -62720,7 +62777,7 @@ class AmbiguousParameters( """ return jsii.get(self, "props") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="scope") def scope(self) -> "Bell": """ @@ -62731,7 +62788,8 @@ class AmbiguousParameters( class AsyncVirtualMethods( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AsyncVirtualMethods" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.AsyncVirtualMethods", ): """ stability @@ -62863,7 +62921,9 @@ class BinaryOperation( return _BinaryOperationProxy def __init__( - self, lhs: scope.jsii_calc_lib.Value, rhs: scope.jsii_calc_lib.Value + self, + lhs: scope.jsii_calc_lib.Value, + rhs: scope.jsii_calc_lib.Value, ) -> None: """Creates a BinaryOperation. @@ -62876,7 +62936,7 @@ class BinaryOperation( jsii.create(BinaryOperation, self, [lhs, rhs]) @jsii.member(jsii_name="hello") - def hello(self) -> str: + def hello(self) -> builtins.str: """Say hello! stability @@ -62884,7 +62944,7 @@ class BinaryOperation( """ return jsii.invoke(self, "hello", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="lhs") def lhs(self) -> scope.jsii_calc_lib.Value: """Left-hand side operand. @@ -62894,7 +62954,7 @@ class BinaryOperation( """ return jsii.get(self, "lhs") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="rhs") def rhs(self) -> scope.jsii_calc_lib.Value: """Right-hand side operand. @@ -62906,13 +62966,14 @@ class BinaryOperation( class _BinaryOperationProxy( - BinaryOperation, jsii.proxy_for(scope.jsii_calc_lib.Operation) + BinaryOperation, jsii.proxy_for(scope.jsii_calc_lib.Operation) # type: ignore ): pass class BurriedAnonymousObject( - metaclass=jsii.JSIIAbstractClass, jsii_type="jsii-calc.BurriedAnonymousObject" + metaclass=jsii.JSIIAbstractClass, + jsii_type="jsii-calc.BurriedAnonymousObject", ): """See https://github.com/aws/aws-cdk/issues/7977. @@ -62932,7 +62993,7 @@ class BurriedAnonymousObject( jsii.create(BurriedAnonymousObject, self, []) @jsii.member(jsii_name="check") - def check(self) -> bool: + def check(self) -> builtins.bool: """ stability :stability: experimental @@ -63071,7 +63132,7 @@ class Calculator( """ return jsii.invoke(self, "readUnionValue", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="expression") def expression(self) -> scope.jsii_calc_lib.Value: """Returns the expression. @@ -63081,7 +63142,7 @@ class Calculator( """ return jsii.get(self, "expression") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="operationsLog") def operations_log(self) -> typing.List[scope.jsii_calc_lib.Value]: """A log of all operations. @@ -63091,11 +63152,11 @@ class Calculator( """ return jsii.get(self, "operationsLog") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="operationsMap") def operations_map( self, - ) -> typing.Mapping[str, typing.List[scope.jsii_calc_lib.Value]]: + ) -> typing.Mapping[builtins.str, typing.List[scope.jsii_calc_lib.Value]]: """A map of per operation name of all operations performed. stability @@ -63103,7 +63164,7 @@ class Calculator( """ return jsii.get(self, "operationsMap") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="curr") def curr(self) -> scope.jsii_calc_lib.Value: """The current value. @@ -63113,11 +63174,11 @@ class Calculator( """ return jsii.get(self, "curr") - @curr.setter + @curr.setter # type: ignore def curr(self, value: scope.jsii_calc_lib.Value) -> None: jsii.set(self, "curr", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="maxValue") def max_value(self) -> typing.Optional[jsii.Number]: """The maximum value allows in this calculator. @@ -63127,11 +63188,11 @@ class Calculator( """ return jsii.get(self, "maxValue") - @max_value.setter + @max_value.setter # type: ignore def max_value(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "maxValue", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="unionProperty") def union_property( self, @@ -63143,9 +63204,10 @@ class Calculator( """ return jsii.get(self, "unionProperty") - @union_property.setter + @union_property.setter # type: ignore def union_property( - self, value: typing.Optional[typing.Union["Add", "Multiply", "Power"]] + self, + value: typing.Optional[typing.Union["Add", "Multiply", "Power"]], ) -> None: jsii.set(self, "unionProperty", value) @@ -63170,7 +63232,7 @@ class CalculatorProps: stability :stability: experimental """ - self._values = {} + self._values: typing.Dict[str, typing.Any] = {} if initial_value is not None: self._values["initial_value"] = initial_value if maximum_value is not None: @@ -63188,7 +63250,8 @@ class CalculatorProps: stability :stability: experimental """ - return self._values.get("initial_value") + result = self._values.get("initial_value") + return result @builtins.property def maximum_value(self) -> typing.Optional[jsii.Number]: @@ -63200,12 +63263,13 @@ class CalculatorProps: stability :stability: experimental """ - return self._values.get("maximum_value") + result = self._values.get("maximum_value") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -63215,14 +63279,19 @@ class CalculatorProps: class ClassWithCollections( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ClassWithCollections" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ClassWithCollections", ): """ stability :stability: experimental """ - def __init__(self, map: typing.Mapping[str, str], array: typing.List[str]) -> None: + def __init__( + self, + map: typing.Mapping[builtins.str, builtins.str], + array: typing.List[builtins.str], + ) -> None: """ :param map: - :param array: - @@ -63234,7 +63303,7 @@ class ClassWithCollections( @jsii.member(jsii_name="createAList") @builtins.classmethod - def create_a_list(cls) -> typing.List[str]: + def create_a_list(cls) -> typing.List[builtins.str]: """ stability :stability: experimental @@ -63243,63 +63312,63 @@ class ClassWithCollections( @jsii.member(jsii_name="createAMap") @builtins.classmethod - def create_a_map(cls) -> typing.Mapping[str, str]: + def create_a_map(cls) -> typing.Mapping[builtins.str, builtins.str]: """ stability :stability: experimental """ return jsii.sinvoke(cls, "createAMap", []) - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="staticArray") - def static_array(cls) -> typing.List[str]: + def static_array(cls) -> typing.List[builtins.str]: """ stability :stability: experimental """ return jsii.sget(cls, "staticArray") - @static_array.setter - def static_array(cls, value: typing.List[str]) -> None: + @static_array.setter # type: ignore + def static_array(cls, value: typing.List[builtins.str]) -> None: jsii.sset(cls, "staticArray", value) - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="staticMap") - def static_map(cls) -> typing.Mapping[str, str]: + def static_map(cls) -> typing.Mapping[builtins.str, builtins.str]: """ stability :stability: experimental """ return jsii.sget(cls, "staticMap") - @static_map.setter - def static_map(cls, value: typing.Mapping[str, str]) -> None: + @static_map.setter # type: ignore + def static_map(cls, value: typing.Mapping[builtins.str, builtins.str]) -> None: jsii.sset(cls, "staticMap", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="array") - def array(self) -> typing.List[str]: + def array(self) -> typing.List[builtins.str]: """ stability :stability: experimental """ return jsii.get(self, "array") - @array.setter - def array(self, value: typing.List[str]) -> None: + @array.setter # type: ignore + def array(self, value: typing.List[builtins.str]) -> None: jsii.set(self, "array", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="map") - def map(self) -> typing.Mapping[str, str]: + def map(self) -> typing.Mapping[builtins.str, builtins.str]: """ stability :stability: experimental """ return jsii.get(self, "map") - @map.setter - def map(self, value: typing.Mapping[str, str]) -> None: + @map.setter # type: ignore + def map(self, value: typing.Mapping[builtins.str, builtins.str]) -> None: jsii.set(self, "map", value) @@ -63329,14 +63398,15 @@ class ClassWithDocs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ClassWithDocs" class ClassWithJavaReservedWords( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ClassWithJavaReservedWords" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ClassWithJavaReservedWords", ): """ stability :stability: experimental """ - def __init__(self, int: str) -> None: + def __init__(self, int: builtins.str) -> None: """ :param int: - @@ -63346,7 +63416,7 @@ class ClassWithJavaReservedWords( jsii.create(ClassWithJavaReservedWords, self, [int]) @jsii.member(jsii_name="import") - def import_(self, assert_: str) -> str: + def import_(self, assert_: builtins.str) -> builtins.str: """ :param assert_: - @@ -63355,9 +63425,9 @@ class ClassWithJavaReservedWords( """ return jsii.invoke(self, "import", [assert_]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="int") - def int(self) -> str: + def int(self) -> builtins.str: """ stability :stability: experimental @@ -63381,7 +63451,7 @@ class ClassWithMutableObjectLiteralProperty( """ jsii.create(ClassWithMutableObjectLiteralProperty, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mutableObject") def mutable_object(self) -> "IMutableObjectLiteral": """ @@ -63390,13 +63460,14 @@ class ClassWithMutableObjectLiteralProperty( """ return jsii.get(self, "mutableObject") - @mutable_object.setter + @mutable_object.setter # type: ignore def mutable_object(self, value: "IMutableObjectLiteral") -> None: jsii.set(self, "mutableObject", value) class ConfusingToJackson( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ConfusingToJackson" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ConfusingToJackson", ): """This tries to confuse Jackson by having overloaded property setters. @@ -63424,7 +63495,7 @@ class ConfusingToJackson( """ return jsii.sinvoke(cls, "makeStructInstance", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="unionProperty") def union_property( self, @@ -63435,7 +63506,7 @@ class ConfusingToJackson( """ return jsii.get(self, "unionProperty") - @union_property.setter + @union_property.setter # type: ignore def union_property( self, value: typing.Optional[typing.Union[scope.jsii_calc_lib.IFriendly, typing.List[typing.Union[scope.jsii_calc_lib.IFriendly, "AbstractClass"]]]], @@ -63460,7 +63531,7 @@ class ConfusingToJacksonStruct: stability :stability: experimental """ - self._values = {} + self._values: typing.Dict[str, typing.Any] = {} if union_property is not None: self._values["union_property"] = union_property @@ -63472,12 +63543,13 @@ class ConfusingToJacksonStruct: stability :stability: experimental """ - return self._values.get("union_property") + result = self._values.get("union_property") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -63487,7 +63559,8 @@ class ConfusingToJacksonStruct: class ConstructorPassesThisOut( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ConstructorPassesThisOut" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ConstructorPassesThisOut", ): """ stability @@ -63582,7 +63655,8 @@ class Constructors(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Constructors"): class ConsumePureInterface( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ConsumePureInterface" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ConsumePureInterface", ): """ stability @@ -63608,7 +63682,8 @@ class ConsumePureInterface( class ConsumerCanRingBell( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ConsumerCanRingBell" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ConsumerCanRingBell", ): """Test calling back to consumers that implement interfaces. @@ -63628,7 +63703,10 @@ class ConsumerCanRingBell( @jsii.member(jsii_name="staticImplementedByObjectLiteral") @builtins.classmethod - def static_implemented_by_object_literal(cls, ringer: "IBellRinger") -> bool: + def static_implemented_by_object_literal( + cls, + ringer: "IBellRinger", + ) -> builtins.bool: """...if the interface is implemented using an object literal. Returns whether the bell was rung. @@ -63642,7 +63720,10 @@ class ConsumerCanRingBell( @jsii.member(jsii_name="staticImplementedByPrivateClass") @builtins.classmethod - def static_implemented_by_private_class(cls, ringer: "IBellRinger") -> bool: + def static_implemented_by_private_class( + cls, + ringer: "IBellRinger", + ) -> builtins.bool: """...if the interface is implemented using a private class. Return whether the bell was rung. @@ -63656,7 +63737,7 @@ class ConsumerCanRingBell( @jsii.member(jsii_name="staticImplementedByPublicClass") @builtins.classmethod - def static_implemented_by_public_class(cls, ringer: "IBellRinger") -> bool: + def static_implemented_by_public_class(cls, ringer: "IBellRinger") -> builtins.bool: """...if the interface is implemented using a public class. Return whether the bell was rung. @@ -63670,7 +63751,7 @@ class ConsumerCanRingBell( @jsii.member(jsii_name="staticWhenTypedAsClass") @builtins.classmethod - def static_when_typed_as_class(cls, ringer: "IConcreteBellRinger") -> bool: + def static_when_typed_as_class(cls, ringer: "IConcreteBellRinger") -> builtins.bool: """If the parameter is a concrete class instead of an interface. Return whether the bell was rung. @@ -63683,7 +63764,7 @@ class ConsumerCanRingBell( return jsii.sinvoke(cls, "staticWhenTypedAsClass", [ringer]) @jsii.member(jsii_name="implementedByObjectLiteral") - def implemented_by_object_literal(self, ringer: "IBellRinger") -> bool: + def implemented_by_object_literal(self, ringer: "IBellRinger") -> builtins.bool: """...if the interface is implemented using an object literal. Returns whether the bell was rung. @@ -63696,7 +63777,7 @@ class ConsumerCanRingBell( return jsii.invoke(self, "implementedByObjectLiteral", [ringer]) @jsii.member(jsii_name="implementedByPrivateClass") - def implemented_by_private_class(self, ringer: "IBellRinger") -> bool: + def implemented_by_private_class(self, ringer: "IBellRinger") -> builtins.bool: """...if the interface is implemented using a private class. Return whether the bell was rung. @@ -63709,7 +63790,7 @@ class ConsumerCanRingBell( return jsii.invoke(self, "implementedByPrivateClass", [ringer]) @jsii.member(jsii_name="implementedByPublicClass") - def implemented_by_public_class(self, ringer: "IBellRinger") -> bool: + def implemented_by_public_class(self, ringer: "IBellRinger") -> builtins.bool: """...if the interface is implemented using a public class. Return whether the bell was rung. @@ -63722,7 +63803,7 @@ class ConsumerCanRingBell( return jsii.invoke(self, "implementedByPublicClass", [ringer]) @jsii.member(jsii_name="whenTypedAsClass") - def when_typed_as_class(self, ringer: "IConcreteBellRinger") -> bool: + def when_typed_as_class(self, ringer: "IConcreteBellRinger") -> builtins.bool: """If the parameter is a concrete class instead of an interface. Return whether the bell was rung. @@ -63736,7 +63817,8 @@ class ConsumerCanRingBell( class ConsumersOfThisCrazyTypeSystem( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ConsumersOfThisCrazyTypeSystem" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ConsumersOfThisCrazyTypeSystem", ): """ stability @@ -63751,7 +63833,10 @@ class ConsumersOfThisCrazyTypeSystem( jsii.create(ConsumersOfThisCrazyTypeSystem, self, []) @jsii.member(jsii_name="consumeAnotherPublicInterface") - def consume_another_public_interface(self, obj: "IAnotherPublicInterface") -> str: + def consume_another_public_interface( + self, + obj: "IAnotherPublicInterface", + ) -> builtins.str: """ :param obj: - @@ -63762,7 +63847,8 @@ class ConsumersOfThisCrazyTypeSystem( @jsii.member(jsii_name="consumeNonInternalInterface") def consume_non_internal_interface( - self, obj: "INonInternalInterface" + self, + obj: "INonInternalInterface", ) -> typing.Any: """ :param obj: - @@ -63792,9 +63878,9 @@ class DataRenderer(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DataRenderer"): self, *, anumber: jsii.Number, - astring: str, - first_optional: typing.Optional[typing.List[str]] = None, - ) -> str: + astring: builtins.str, + first_optional: typing.Optional[typing.List[builtins.str]] = None, + ) -> builtins.str: """ :param anumber: An awesome number value. :param astring: A string value. @@ -63810,7 +63896,10 @@ class DataRenderer(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DataRenderer"): return jsii.invoke(self, "render", [data]) @jsii.member(jsii_name="renderArbitrary") - def render_arbitrary(self, data: typing.Mapping[str, typing.Any]) -> str: + def render_arbitrary( + self, + data: typing.Mapping[builtins.str, typing.Any], + ) -> builtins.str: """ :param data: - @@ -63820,7 +63909,7 @@ class DataRenderer(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DataRenderer"): return jsii.invoke(self, "renderArbitrary", [data]) @jsii.member(jsii_name="renderMap") - def render_map(self, map: typing.Mapping[str, typing.Any]) -> str: + def render_map(self, map: typing.Mapping[builtins.str, typing.Any]) -> builtins.str: """ :param map: - @@ -63831,7 +63920,8 @@ class DataRenderer(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DataRenderer"): class DefaultedConstructorArgument( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DefaultedConstructorArgument" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.DefaultedConstructorArgument", ): """ stability @@ -63841,7 +63931,7 @@ class DefaultedConstructorArgument( def __init__( self, arg1: typing.Optional[jsii.Number] = None, - arg2: typing.Optional[str] = None, + arg2: typing.Optional[builtins.str] = None, arg3: typing.Optional[datetime.datetime] = None, ) -> None: """ @@ -63854,7 +63944,7 @@ class DefaultedConstructorArgument( """ jsii.create(DefaultedConstructorArgument, self, [arg1, arg2, arg3]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="arg1") def arg1(self) -> jsii.Number: """ @@ -63863,7 +63953,7 @@ class DefaultedConstructorArgument( """ return jsii.get(self, "arg1") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="arg3") def arg3(self) -> datetime.datetime: """ @@ -63872,9 +63962,9 @@ class DefaultedConstructorArgument( """ return jsii.get(self, "arg3") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="arg2") - def arg2(self) -> typing.Optional[str]: + def arg2(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental @@ -63930,7 +64020,9 @@ class DeprecatedClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DeprecatedCl """ def __init__( - self, readonly_string: str, mutable_number: typing.Optional[jsii.Number] = None + self, + readonly_string: builtins.str, + mutable_number: typing.Optional[jsii.Number] = None, ) -> None: """ :param readonly_string: - @@ -63955,9 +64047,9 @@ class DeprecatedClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DeprecatedCl """ return jsii.invoke(self, "method", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="readonlyProperty") - def readonly_property(self) -> str: + def readonly_property(self) -> builtins.str: """ deprecated :deprecated: this is not always "wazoo", be ready to be disappointed @@ -63967,7 +64059,7 @@ class DeprecatedClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DeprecatedCl """ return jsii.get(self, "readonlyProperty") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: """ @@ -63979,7 +64071,7 @@ class DeprecatedClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DeprecatedCl """ return jsii.get(self, "mutableProperty") - @mutable_property.setter + @mutable_property.setter # type: ignore def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "mutableProperty", value) @@ -64018,7 +64110,7 @@ class DeprecatedEnum(enum.Enum): name_mapping={"readonly_property": "readonlyProperty"}, ) class DeprecatedStruct: - def __init__(self, *, readonly_property: str) -> None: + def __init__(self, *, readonly_property: builtins.str) -> None: """ :param readonly_property: @@ -64028,12 +64120,12 @@ class DeprecatedStruct: stability :stability: deprecated """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "readonly_property": readonly_property, } @builtins.property - def readonly_property(self) -> str: + def readonly_property(self) -> builtins.str: """ deprecated :deprecated: well, yeah @@ -64041,12 +64133,14 @@ class DeprecatedStruct: stability :stability: deprecated """ - return self._values.get("readonly_property") + result = self._values.get("readonly_property") + assert result is not None, "Required property 'readonly_property' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -64075,14 +64169,14 @@ class DerivedStruct(scope.jsii_calc_lib.MyFirstStruct): self, *, anumber: jsii.Number, - astring: str, - first_optional: typing.Optional[typing.List[str]] = None, + astring: builtins.str, + first_optional: typing.Optional[typing.List[builtins.str]] = None, another_required: datetime.datetime, - bool: bool, + bool: builtins.bool, non_primitive: "DoubleTrouble", - another_optional: typing.Optional[typing.Mapping[str, scope.jsii_calc_lib.Value]] = None, + another_optional: typing.Optional[typing.Mapping[builtins.str, scope.jsii_calc_lib.Value]] = None, optional_any: typing.Any = None, - optional_array: typing.Optional[typing.List[str]] = None, + optional_array: typing.Optional[typing.List[builtins.str]] = None, ) -> None: """A struct which derives from another struct. @@ -64099,7 +64193,7 @@ class DerivedStruct(scope.jsii_calc_lib.MyFirstStruct): stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "anumber": anumber, "astring": astring, "another_required": another_required, @@ -64122,24 +64216,29 @@ class DerivedStruct(scope.jsii_calc_lib.MyFirstStruct): stability :stability: deprecated """ - return self._values.get("anumber") + result = self._values.get("anumber") + assert result is not None, "Required property 'anumber' is missing" + return result @builtins.property - def astring(self) -> str: + def astring(self) -> builtins.str: """A string value. stability :stability: deprecated """ - return self._values.get("astring") + result = self._values.get("astring") + assert result is not None, "Required property 'astring' is missing" + return result @builtins.property - def first_optional(self) -> typing.Optional[typing.List[str]]: + def first_optional(self) -> typing.Optional[typing.List[builtins.str]]: """ stability :stability: deprecated """ - return self._values.get("first_optional") + result = self._values.get("first_optional") + return result @builtins.property def another_required(self) -> datetime.datetime: @@ -64147,15 +64246,19 @@ class DerivedStruct(scope.jsii_calc_lib.MyFirstStruct): stability :stability: experimental """ - return self._values.get("another_required") + result = self._values.get("another_required") + assert result is not None, "Required property 'another_required' is missing" + return result @builtins.property - def bool(self) -> bool: + def bool(self) -> builtins.bool: """ stability :stability: experimental """ - return self._values.get("bool") + result = self._values.get("bool") + assert result is not None, "Required property 'bool' is missing" + return result @builtins.property def non_primitive(self) -> "DoubleTrouble": @@ -64164,18 +64267,21 @@ class DerivedStruct(scope.jsii_calc_lib.MyFirstStruct): stability :stability: experimental """ - return self._values.get("non_primitive") + result = self._values.get("non_primitive") + assert result is not None, "Required property 'non_primitive' is missing" + return result @builtins.property def another_optional( self, - ) -> typing.Optional[typing.Mapping[str, scope.jsii_calc_lib.Value]]: + ) -> typing.Optional[typing.Mapping[builtins.str, scope.jsii_calc_lib.Value]]: """This is optional. stability :stability: experimental """ - return self._values.get("another_optional") + result = self._values.get("another_optional") + return result @builtins.property def optional_any(self) -> typing.Any: @@ -64183,20 +64289,22 @@ class DerivedStruct(scope.jsii_calc_lib.MyFirstStruct): stability :stability: experimental """ - return self._values.get("optional_any") + result = self._values.get("optional_any") + return result @builtins.property - def optional_array(self) -> typing.Optional[typing.List[str]]: + def optional_array(self) -> typing.Optional[typing.List[builtins.str]]: """ stability :stability: experimental """ - return self._values.get("optional_array") + result = self._values.get("optional_array") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -64211,29 +64319,31 @@ class DerivedStruct(scope.jsii_calc_lib.MyFirstStruct): name_mapping={"base_level_property": "baseLevelProperty"}, ) class DiamondInheritanceBaseLevelStruct: - def __init__(self, *, base_level_property: str) -> None: + def __init__(self, *, base_level_property: builtins.str) -> None: """ :param base_level_property: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "base_level_property": base_level_property, } @builtins.property - def base_level_property(self) -> str: + def base_level_property(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("base_level_property") + result = self._values.get("base_level_property") + assert result is not None, "Required property 'base_level_property' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -64252,7 +64362,10 @@ class DiamondInheritanceBaseLevelStruct: ) class DiamondInheritanceFirstMidLevelStruct(DiamondInheritanceBaseLevelStruct): def __init__( - self, *, base_level_property: str, first_mid_level_property: str + self, + *, + base_level_property: builtins.str, + first_mid_level_property: builtins.str, ) -> None: """ :param base_level_property: @@ -64261,31 +64374,35 @@ class DiamondInheritanceFirstMidLevelStruct(DiamondInheritanceBaseLevelStruct): stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "base_level_property": base_level_property, "first_mid_level_property": first_mid_level_property, } @builtins.property - def base_level_property(self) -> str: + def base_level_property(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("base_level_property") + result = self._values.get("base_level_property") + assert result is not None, "Required property 'base_level_property' is missing" + return result @builtins.property - def first_mid_level_property(self) -> str: + def first_mid_level_property(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("first_mid_level_property") + result = self._values.get("first_mid_level_property") + assert result is not None, "Required property 'first_mid_level_property' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -64304,7 +64421,10 @@ class DiamondInheritanceFirstMidLevelStruct(DiamondInheritanceBaseLevelStruct): ) class DiamondInheritanceSecondMidLevelStruct(DiamondInheritanceBaseLevelStruct): def __init__( - self, *, base_level_property: str, second_mid_level_property: str + self, + *, + base_level_property: builtins.str, + second_mid_level_property: builtins.str, ) -> None: """ :param base_level_property: @@ -64313,31 +64433,35 @@ class DiamondInheritanceSecondMidLevelStruct(DiamondInheritanceBaseLevelStruct): stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "base_level_property": base_level_property, "second_mid_level_property": second_mid_level_property, } @builtins.property - def base_level_property(self) -> str: + def base_level_property(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("base_level_property") + result = self._values.get("base_level_property") + assert result is not None, "Required property 'base_level_property' is missing" + return result @builtins.property - def second_mid_level_property(self) -> str: + def second_mid_level_property(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("second_mid_level_property") + result = self._values.get("second_mid_level_property") + assert result is not None, "Required property 'second_mid_level_property' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -64359,15 +64483,16 @@ class DiamondInheritanceSecondMidLevelStruct(DiamondInheritanceBaseLevelStruct): }, ) class DiamondInheritanceTopLevelStruct( - DiamondInheritanceFirstMidLevelStruct, DiamondInheritanceSecondMidLevelStruct + DiamondInheritanceFirstMidLevelStruct, + DiamondInheritanceSecondMidLevelStruct, ): def __init__( self, *, - base_level_property: str, - first_mid_level_property: str, - second_mid_level_property: str, - top_level_property: str, + base_level_property: builtins.str, + first_mid_level_property: builtins.str, + second_mid_level_property: builtins.str, + top_level_property: builtins.str, ) -> None: """ :param base_level_property: @@ -64378,7 +64503,7 @@ class DiamondInheritanceTopLevelStruct( stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "base_level_property": base_level_property, "first_mid_level_property": first_mid_level_property, "second_mid_level_property": second_mid_level_property, @@ -64386,41 +64511,49 @@ class DiamondInheritanceTopLevelStruct( } @builtins.property - def base_level_property(self) -> str: + def base_level_property(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("base_level_property") + result = self._values.get("base_level_property") + assert result is not None, "Required property 'base_level_property' is missing" + return result @builtins.property - def first_mid_level_property(self) -> str: + def first_mid_level_property(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("first_mid_level_property") + result = self._values.get("first_mid_level_property") + assert result is not None, "Required property 'first_mid_level_property' is missing" + return result @builtins.property - def second_mid_level_property(self) -> str: + def second_mid_level_property(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("second_mid_level_property") + result = self._values.get("second_mid_level_property") + assert result is not None, "Required property 'second_mid_level_property' is missing" + return result @builtins.property - def top_level_property(self) -> str: + def top_level_property(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("top_level_property") + result = self._values.get("top_level_property") + assert result is not None, "Required property 'top_level_property' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -64430,7 +64563,8 @@ class DiamondInheritanceTopLevelStruct( class DisappointingCollectionSource( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DisappointingCollectionSource" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.DisappointingCollectionSource", ): """Verifies that null/undefined can be returned for optional collections. @@ -64440,9 +64574,9 @@ class DisappointingCollectionSource( :stability: experimental """ - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="maybeList") - def MAYBE_LIST(cls) -> typing.Optional[typing.List[str]]: + def MAYBE_LIST(cls) -> typing.Optional[typing.List[builtins.str]]: """Some List of strings, maybe? (Nah, just a billion dollars mistake!) @@ -64452,9 +64586,9 @@ class DisappointingCollectionSource( """ return jsii.sget(cls, "maybeList") - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="maybeMap") - def MAYBE_MAP(cls) -> typing.Optional[typing.Mapping[str, jsii.Number]]: + def MAYBE_MAP(cls) -> typing.Optional[typing.Mapping[builtins.str, jsii.Number]]: """Some Map of strings to numbers, maybe? (Nah, just a billion dollars mistake!) @@ -64466,7 +64600,8 @@ class DisappointingCollectionSource( class DoNotOverridePrivates( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DoNotOverridePrivates" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.DoNotOverridePrivates", ): """ stability @@ -64481,7 +64616,7 @@ class DoNotOverridePrivates( jsii.create(DoNotOverridePrivates, self, []) @jsii.member(jsii_name="changePrivatePropertyValue") - def change_private_property_value(self, new_value: str) -> None: + def change_private_property_value(self, new_value: builtins.str) -> None: """ :param new_value: - @@ -64491,7 +64626,7 @@ class DoNotOverridePrivates( return jsii.invoke(self, "changePrivatePropertyValue", [new_value]) @jsii.member(jsii_name="privateMethodValue") - def private_method_value(self) -> str: + def private_method_value(self) -> builtins.str: """ stability :stability: experimental @@ -64499,7 +64634,7 @@ class DoNotOverridePrivates( return jsii.invoke(self, "privateMethodValue", []) @jsii.member(jsii_name="privatePropertyValue") - def private_property_value(self) -> str: + def private_property_value(self) -> builtins.str: """ stability :stability: experimental @@ -64508,7 +64643,8 @@ class DoNotOverridePrivates( class DoNotRecognizeAnyAsOptional( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DoNotRecognizeAnyAsOptional" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.DoNotRecognizeAnyAsOptional", ): """jsii#284: do not recognize "any" as an optional argument. @@ -64528,7 +64664,7 @@ class DoNotRecognizeAnyAsOptional( self, _required_any: typing.Any, _optional_any: typing.Any = None, - _optional_string: typing.Optional[str] = None, + _optional_string: typing.Optional[builtins.str] = None, ) -> None: """ :param _required_any: - @@ -64558,7 +64694,7 @@ class DocumentedClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DocumentedCl jsii.create(DocumentedClass, self, []) @jsii.member(jsii_name="greet") - def greet(self, *, name: typing.Optional[str] = None) -> jsii.Number: + def greet(self, *, name: typing.Optional[builtins.str] = None) -> jsii.Number: """Greet the indicated person. This will print out a friendly greeting intended for @@ -64601,8 +64737,10 @@ class DontComplainAboutVariadicAfterOptional( @jsii.member(jsii_name="optionalAndVariadic") def optional_and_variadic( - self, optional: typing.Optional[str] = None, *things: str - ) -> str: + self, + optional: typing.Optional[builtins.str] = None, + *things: builtins.str, + ) -> builtins.str: """ :param optional: - :param things: - @@ -64639,7 +64777,8 @@ class EnumDispenser(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.EnumDispenser" class EraseUndefinedHashValues( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.EraseUndefinedHashValues" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.EraseUndefinedHashValues", ): """ stability @@ -64655,7 +64794,11 @@ class EraseUndefinedHashValues( @jsii.member(jsii_name="doesKeyExist") @builtins.classmethod - def does_key_exist(cls, opts: "EraseUndefinedHashValuesOptions", key: str) -> bool: + def does_key_exist( + cls, + opts: "EraseUndefinedHashValuesOptions", + key: builtins.str, + ) -> builtins.bool: """Returns \`\`true\`\` if \`\`key\`\` is defined in \`\`opts\`\`. Used to check that undefined/null hash values @@ -64671,7 +64814,7 @@ class EraseUndefinedHashValues( @jsii.member(jsii_name="prop1IsNull") @builtins.classmethod - def prop1_is_null(cls) -> typing.Mapping[str, typing.Any]: + def prop1_is_null(cls) -> typing.Mapping[builtins.str, typing.Any]: """We expect "prop1" to be erased. stability @@ -64681,7 +64824,7 @@ class EraseUndefinedHashValues( @jsii.member(jsii_name="prop2IsUndefined") @builtins.classmethod - def prop2_is_undefined(cls) -> typing.Mapping[str, typing.Any]: + def prop2_is_undefined(cls) -> typing.Mapping[builtins.str, typing.Any]: """We expect "prop2" to be erased. stability @@ -64699,8 +64842,8 @@ class EraseUndefinedHashValuesOptions: def __init__( self, *, - option1: typing.Optional[str] = None, - option2: typing.Optional[str] = None, + option1: typing.Optional[builtins.str] = None, + option2: typing.Optional[builtins.str] = None, ) -> None: """ :param option1: @@ -64709,32 +64852,34 @@ class EraseUndefinedHashValuesOptions: stability :stability: experimental """ - self._values = {} + self._values: typing.Dict[str, typing.Any] = {} if option1 is not None: self._values["option1"] = option1 if option2 is not None: self._values["option2"] = option2 @builtins.property - def option1(self) -> typing.Optional[str]: + def option1(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental """ - return self._values.get("option1") + result = self._values.get("option1") + return result @builtins.property - def option2(self) -> typing.Optional[str]: + def option2(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental """ - return self._values.get("option2") + result = self._values.get("option2") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -64744,7 +64889,8 @@ class EraseUndefinedHashValuesOptions: class ExperimentalClass( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ExperimentalClass" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ExperimentalClass", ): """ stability @@ -64752,7 +64898,9 @@ class ExperimentalClass( """ def __init__( - self, readonly_string: str, mutable_number: typing.Optional[jsii.Number] = None + self, + readonly_string: builtins.str, + mutable_number: typing.Optional[jsii.Number] = None, ) -> None: """ :param readonly_string: - @@ -64771,16 +64919,16 @@ class ExperimentalClass( """ return jsii.invoke(self, "method", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="readonlyProperty") - def readonly_property(self) -> str: + def readonly_property(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "readonlyProperty") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: """ @@ -64789,7 +64937,7 @@ class ExperimentalClass( """ return jsii.get(self, "mutableProperty") - @mutable_property.setter + @mutable_property.setter # type: ignore def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "mutableProperty", value) @@ -64819,29 +64967,31 @@ class ExperimentalEnum(enum.Enum): name_mapping={"readonly_property": "readonlyProperty"}, ) class ExperimentalStruct: - def __init__(self, *, readonly_property: str) -> None: + def __init__(self, *, readonly_property: builtins.str) -> None: """ :param readonly_property: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "readonly_property": readonly_property, } @builtins.property - def readonly_property(self) -> str: + def readonly_property(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("readonly_property") + result = self._values.get("readonly_property") + assert result is not None, "Required property 'readonly_property' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -64851,14 +65001,15 @@ class ExperimentalStruct: class ExportedBaseClass( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ExportedBaseClass" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ExportedBaseClass", ): """ stability :stability: experimental """ - def __init__(self, success: bool) -> None: + def __init__(self, success: builtins.bool) -> None: """ :param success: - @@ -64867,9 +65018,9 @@ class ExportedBaseClass( """ jsii.create(ExportedBaseClass, self, [success]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="success") - def success(self) -> bool: + def success(self) -> builtins.bool: """ stability :stability: experimental @@ -64883,7 +65034,7 @@ class ExportedBaseClass( name_mapping={"boom": "boom", "prop": "prop"}, ) class ExtendsInternalInterface: - def __init__(self, *, boom: bool, prop: str) -> None: + def __init__(self, *, boom: builtins.bool, prop: builtins.str) -> None: """ :param boom: :param prop: @@ -64891,31 +65042,35 @@ class ExtendsInternalInterface: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "boom": boom, "prop": prop, } @builtins.property - def boom(self) -> bool: + def boom(self) -> builtins.bool: """ stability :stability: experimental """ - return self._values.get("boom") + result = self._values.get("boom") + assert result is not None, "Required property 'boom' is missing" + return result @builtins.property - def prop(self) -> str: + def prop(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("prop") + result = self._values.get("prop") + assert result is not None, "Required property 'prop' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -64933,7 +65088,9 @@ class ExternalClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ExternalClass" """ def __init__( - self, readonly_string: str, mutable_number: typing.Optional[jsii.Number] = None + self, + readonly_string: builtins.str, + mutable_number: typing.Optional[jsii.Number] = None, ) -> None: """ :param readonly_string: - @@ -64956,9 +65113,9 @@ class ExternalClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ExternalClass" """ return jsii.invoke(self, "method", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="readonlyProperty") - def readonly_property(self) -> str: + def readonly_property(self) -> builtins.str: """ stability :stability: experimental @@ -64967,7 +65124,7 @@ class ExternalClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ExternalClass" """ return jsii.get(self, "readonlyProperty") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: """ @@ -64978,7 +65135,7 @@ class ExternalClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ExternalClass" """ return jsii.get(self, "mutableProperty") - @mutable_property.setter + @mutable_property.setter # type: ignore def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "mutableProperty", value) @@ -65014,7 +65171,7 @@ class ExternalEnum(enum.Enum): name_mapping={"readonly_property": "readonlyProperty"}, ) class ExternalStruct: - def __init__(self, *, readonly_property: str) -> None: + def __init__(self, *, readonly_property: builtins.str) -> None: """ :param readonly_property: @@ -65023,24 +65180,26 @@ class ExternalStruct: external: :external:: true """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "readonly_property": readonly_property, } @builtins.property - def readonly_property(self) -> str: + def readonly_property(self) -> builtins.str: """ stability :stability: experimental external: :external:: true """ - return self._values.get("readonly_property") + result = self._values.get("readonly_property") + assert result is not None, "Required property 'readonly_property' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -65067,14 +65226,14 @@ class GiveMeStructs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.GiveMeStructs" self, *, another_required: datetime.datetime, - bool: bool, + bool: builtins.bool, non_primitive: "DoubleTrouble", - another_optional: typing.Optional[typing.Mapping[str, scope.jsii_calc_lib.Value]] = None, + another_optional: typing.Optional[typing.Mapping[builtins.str, scope.jsii_calc_lib.Value]] = None, optional_any: typing.Any = None, - optional_array: typing.Optional[typing.List[str]] = None, + optional_array: typing.Optional[typing.List[builtins.str]] = None, anumber: jsii.Number, - astring: str, - first_optional: typing.Optional[typing.List[str]] = None, + astring: builtins.str, + first_optional: typing.Optional[typing.List[builtins.str]] = None, ) -> scope.jsii_calc_lib.MyFirstStruct: """Accepts a struct of type DerivedStruct and returns a struct of type FirstStruct. @@ -65110,14 +65269,14 @@ class GiveMeStructs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.GiveMeStructs" self, *, another_required: datetime.datetime, - bool: bool, + bool: builtins.bool, non_primitive: "DoubleTrouble", - another_optional: typing.Optional[typing.Mapping[str, scope.jsii_calc_lib.Value]] = None, + another_optional: typing.Optional[typing.Mapping[builtins.str, scope.jsii_calc_lib.Value]] = None, optional_any: typing.Any = None, - optional_array: typing.Optional[typing.List[str]] = None, + optional_array: typing.Optional[typing.List[builtins.str]] = None, anumber: jsii.Number, - astring: str, - first_optional: typing.Optional[typing.List[str]] = None, + astring: builtins.str, + first_optional: typing.Optional[typing.List[builtins.str]] = None, ) -> "DoubleTrouble": """Returns the boolean from a DerivedStruct struct. @@ -65153,8 +65312,8 @@ class GiveMeStructs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.GiveMeStructs" self, *, anumber: jsii.Number, - astring: str, - first_optional: typing.Optional[typing.List[str]] = None, + astring: builtins.str, + first_optional: typing.Optional[typing.List[builtins.str]] = None, ) -> jsii.Number: """Returns the "anumber" from a MyFirstStruct struct; @@ -65171,7 +65330,7 @@ class GiveMeStructs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.GiveMeStructs" return jsii.invoke(self, "readFirstNumber", [first]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="structLiteral") def struct_literal(self) -> scope.jsii_calc_lib.StructWithOnlyOptionals: """ @@ -65187,7 +65346,7 @@ class GiveMeStructs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.GiveMeStructs" name_mapping={"name": "name"}, ) class Greetee: - def __init__(self, *, name: typing.Optional[str] = None) -> None: + def __init__(self, *, name: typing.Optional[builtins.str] = None) -> None: """These are some arguments you can pass to a method. :param name: The name of the greetee. Default: world @@ -65195,12 +65354,12 @@ class Greetee: stability :stability: experimental """ - self._values = {} + self._values: typing.Dict[str, typing.Any] = {} if name is not None: self._values["name"] = name @builtins.property - def name(self) -> typing.Optional[str]: + def name(self) -> typing.Optional[builtins.str]: """The name of the greetee. default @@ -65209,12 +65368,13 @@ class Greetee: stability :stability: experimental """ - return self._values.get("name") + result = self._values.get("name") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -65224,7 +65384,8 @@ class Greetee: class GreetingAugmenter( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.GreetingAugmenter" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.GreetingAugmenter", ): """ stability @@ -65239,7 +65400,7 @@ class GreetingAugmenter( jsii.create(GreetingAugmenter, self, []) @jsii.member(jsii_name="betterGreeting") - def better_greeting(self, friendly: scope.jsii_calc_lib.IFriendly) -> str: + def better_greeting(self, friendly: scope.jsii_calc_lib.IFriendly) -> builtins.str: """ :param friendly: - @@ -65250,7 +65411,7 @@ class GreetingAugmenter( @jsii.interface(jsii_type="jsii-calc.IAnonymousImplementationProvider") -class IAnonymousImplementationProvider(jsii.compat.Protocol): +class IAnonymousImplementationProvider(typing_extensions.Protocol): """We can return an anonymous interface implementation from an override without losing the interface declarations. stability @@ -65285,7 +65446,7 @@ class _IAnonymousImplementationProviderProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IAnonymousImplementationProvider" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IAnonymousImplementationProvider" @jsii.member(jsii_name="provideAsClass") def provide_as_class(self) -> "Implementation": @@ -65305,7 +65466,7 @@ class _IAnonymousImplementationProviderProxy: @jsii.interface(jsii_type="jsii-calc.IAnonymouslyImplementMe") -class IAnonymouslyImplementMe(jsii.compat.Protocol): +class IAnonymouslyImplementMe(typing_extensions.Protocol): """ stability :stability: experimental @@ -65315,7 +65476,7 @@ class IAnonymouslyImplementMe(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IAnonymouslyImplementMeProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") def value(self) -> jsii.Number: """ @@ -65325,7 +65486,7 @@ class IAnonymouslyImplementMe(jsii.compat.Protocol): ... @jsii.member(jsii_name="verb") - def verb(self) -> str: + def verb(self) -> builtins.str: """ stability :stability: experimental @@ -65339,9 +65500,9 @@ class _IAnonymouslyImplementMeProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IAnonymouslyImplementMe" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IAnonymouslyImplementMe" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") def value(self) -> jsii.Number: """ @@ -65351,7 +65512,7 @@ class _IAnonymouslyImplementMeProxy: return jsii.get(self, "value") @jsii.member(jsii_name="verb") - def verb(self) -> str: + def verb(self) -> builtins.str: """ stability :stability: experimental @@ -65360,7 +65521,7 @@ class _IAnonymouslyImplementMeProxy: @jsii.interface(jsii_type="jsii-calc.IAnotherPublicInterface") -class IAnotherPublicInterface(jsii.compat.Protocol): +class IAnotherPublicInterface(typing_extensions.Protocol): """ stability :stability: experimental @@ -65370,17 +65531,17 @@ class IAnotherPublicInterface(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IAnotherPublicInterfaceProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="a") - def a(self) -> str: + def a(self) -> builtins.str: """ stability :stability: experimental """ ... - @a.setter - def a(self, value: str) -> None: + @a.setter # type: ignore + def a(self, value: builtins.str) -> None: ... @@ -65390,24 +65551,24 @@ class _IAnotherPublicInterfaceProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IAnotherPublicInterface" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IAnotherPublicInterface" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="a") - def a(self) -> str: + def a(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "a") - @a.setter - def a(self, value: str) -> None: + @a.setter # type: ignore + def a(self, value: builtins.str) -> None: jsii.set(self, "a", value) @jsii.interface(jsii_type="jsii-calc.IBell") -class IBell(jsii.compat.Protocol): +class IBell(typing_extensions.Protocol): """ stability :stability: experimental @@ -65432,7 +65593,7 @@ class _IBellProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IBell" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IBell" @jsii.member(jsii_name="ring") def ring(self) -> None: @@ -65444,7 +65605,7 @@ class _IBellProxy: @jsii.interface(jsii_type="jsii-calc.IBellRinger") -class IBellRinger(jsii.compat.Protocol): +class IBellRinger(typing_extensions.Protocol): """Takes the object parameter as an interface. stability @@ -65473,7 +65634,7 @@ class _IBellRingerProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IBellRinger" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IBellRinger" @jsii.member(jsii_name="yourTurn") def your_turn(self, bell: "IBell") -> None: @@ -65487,7 +65648,7 @@ class _IBellRingerProxy: @jsii.interface(jsii_type="jsii-calc.IConcreteBellRinger") -class IConcreteBellRinger(jsii.compat.Protocol): +class IConcreteBellRinger(typing_extensions.Protocol): """Takes the object parameter as a calss. stability @@ -65516,7 +65677,7 @@ class _IConcreteBellRingerProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IConcreteBellRinger" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IConcreteBellRinger" @jsii.member(jsii_name="yourTurn") def your_turn(self, bell: "Bell") -> None: @@ -65530,7 +65691,7 @@ class _IConcreteBellRingerProxy: @jsii.interface(jsii_type="jsii-calc.IDeprecatedInterface") -class IDeprecatedInterface(jsii.compat.Protocol): +class IDeprecatedInterface(typing_extensions.Protocol): """ deprecated :deprecated: useless interface @@ -65543,7 +65704,7 @@ class IDeprecatedInterface(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IDeprecatedInterfaceProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: """ @@ -65555,7 +65716,7 @@ class IDeprecatedInterface(jsii.compat.Protocol): """ ... - @mutable_property.setter + @mutable_property.setter # type: ignore def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: ... @@ -65580,9 +65741,9 @@ class _IDeprecatedInterfaceProxy: :stability: deprecated """ - __jsii_type__ = "jsii-calc.IDeprecatedInterface" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IDeprecatedInterface" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: """ @@ -65594,7 +65755,7 @@ class _IDeprecatedInterfaceProxy: """ return jsii.get(self, "mutableProperty") - @mutable_property.setter + @mutable_property.setter # type: ignore def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "mutableProperty", value) @@ -65611,7 +65772,7 @@ class _IDeprecatedInterfaceProxy: @jsii.interface(jsii_type="jsii-calc.IExperimentalInterface") -class IExperimentalInterface(jsii.compat.Protocol): +class IExperimentalInterface(typing_extensions.Protocol): """ stability :stability: experimental @@ -65621,7 +65782,7 @@ class IExperimentalInterface(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IExperimentalInterfaceProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: """ @@ -65630,7 +65791,7 @@ class IExperimentalInterface(jsii.compat.Protocol): """ ... - @mutable_property.setter + @mutable_property.setter # type: ignore def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: ... @@ -65649,9 +65810,9 @@ class _IExperimentalInterfaceProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IExperimentalInterface" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IExperimentalInterface" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: """ @@ -65660,7 +65821,7 @@ class _IExperimentalInterfaceProxy: """ return jsii.get(self, "mutableProperty") - @mutable_property.setter + @mutable_property.setter # type: ignore def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "mutableProperty", value) @@ -65674,7 +65835,7 @@ class _IExperimentalInterfaceProxy: @jsii.interface(jsii_type="jsii-calc.IExtendsPrivateInterface") -class IExtendsPrivateInterface(jsii.compat.Protocol): +class IExtendsPrivateInterface(typing_extensions.Protocol): """ stability :stability: experimental @@ -65684,26 +65845,26 @@ class IExtendsPrivateInterface(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IExtendsPrivateInterfaceProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="moreThings") - def more_things(self) -> typing.List[str]: + def more_things(self) -> typing.List[builtins.str]: """ stability :stability: experimental """ ... - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="private") - def private(self) -> str: + def private(self) -> builtins.str: """ stability :stability: experimental """ ... - @private.setter - def private(self, value: str) -> None: + @private.setter # type: ignore + def private(self, value: builtins.str) -> None: ... @@ -65713,33 +65874,33 @@ class _IExtendsPrivateInterfaceProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IExtendsPrivateInterface" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IExtendsPrivateInterface" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="moreThings") - def more_things(self) -> typing.List[str]: + def more_things(self) -> typing.List[builtins.str]: """ stability :stability: experimental """ return jsii.get(self, "moreThings") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="private") - def private(self) -> str: + def private(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "private") - @private.setter - def private(self, value: str) -> None: + @private.setter # type: ignore + def private(self, value: builtins.str) -> None: jsii.set(self, "private", value) @jsii.interface(jsii_type="jsii-calc.IExternalInterface") -class IExternalInterface(jsii.compat.Protocol): +class IExternalInterface(typing_extensions.Protocol): """ stability :stability: experimental @@ -65751,7 +65912,7 @@ class IExternalInterface(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IExternalInterfaceProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: """ @@ -65762,7 +65923,7 @@ class IExternalInterface(jsii.compat.Protocol): """ ... - @mutable_property.setter + @mutable_property.setter # type: ignore def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: ... @@ -65785,9 +65946,9 @@ class _IExternalInterfaceProxy: :external:: true """ - __jsii_type__ = "jsii-calc.IExternalInterface" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IExternalInterface" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: """ @@ -65798,7 +65959,7 @@ class _IExternalInterfaceProxy: """ return jsii.get(self, "mutableProperty") - @mutable_property.setter + @mutable_property.setter # type: ignore def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "mutableProperty", value) @@ -65814,7 +65975,7 @@ class _IExternalInterfaceProxy: @jsii.interface(jsii_type="jsii-calc.IFriendlier") -class IFriendlier(scope.jsii_calc_lib.IFriendly, jsii.compat.Protocol): +class IFriendlier(scope.jsii_calc_lib.IFriendly, typing_extensions.Protocol): """Even friendlier classes can implement this interface. stability @@ -65826,7 +65987,7 @@ class IFriendlier(scope.jsii_calc_lib.IFriendly, jsii.compat.Protocol): return _IFriendlierProxy @jsii.member(jsii_name="farewell") - def farewell(self) -> str: + def farewell(self) -> builtins.str: """Say farewell. stability @@ -65835,7 +65996,7 @@ class IFriendlier(scope.jsii_calc_lib.IFriendly, jsii.compat.Protocol): ... @jsii.member(jsii_name="goodbye") - def goodbye(self) -> str: + def goodbye(self) -> builtins.str: """Say goodbye. return @@ -65847,17 +66008,19 @@ class IFriendlier(scope.jsii_calc_lib.IFriendly, jsii.compat.Protocol): ... -class _IFriendlierProxy(jsii.proxy_for(scope.jsii_calc_lib.IFriendly)): +class _IFriendlierProxy( + jsii.proxy_for(scope.jsii_calc_lib.IFriendly) # type: ignore +): """Even friendlier classes can implement this interface. stability :stability: experimental """ - __jsii_type__ = "jsii-calc.IFriendlier" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IFriendlier" @jsii.member(jsii_name="farewell") - def farewell(self) -> str: + def farewell(self) -> builtins.str: """Say farewell. stability @@ -65866,7 +66029,7 @@ class _IFriendlierProxy(jsii.proxy_for(scope.jsii_calc_lib.IFriendly)): return jsii.invoke(self, "farewell", []) @jsii.member(jsii_name="goodbye") - def goodbye(self) -> str: + def goodbye(self) -> builtins.str: """Say goodbye. return @@ -65879,7 +66042,7 @@ class _IFriendlierProxy(jsii.proxy_for(scope.jsii_calc_lib.IFriendly)): @jsii.interface(jsii_type="jsii-calc.IInterfaceImplementedByAbstractClass") -class IInterfaceImplementedByAbstractClass(jsii.compat.Protocol): +class IInterfaceImplementedByAbstractClass(typing_extensions.Protocol): """awslabs/jsii#220 Abstract return type. stability @@ -65890,9 +66053,9 @@ class IInterfaceImplementedByAbstractClass(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IInterfaceImplementedByAbstractClassProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="propFromInterface") - def prop_from_interface(self) -> str: + def prop_from_interface(self) -> builtins.str: """ stability :stability: experimental @@ -65907,11 +66070,11 @@ class _IInterfaceImplementedByAbstractClassProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IInterfaceImplementedByAbstractClass" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IInterfaceImplementedByAbstractClass" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="propFromInterface") - def prop_from_interface(self) -> str: + def prop_from_interface(self) -> builtins.str: """ stability :stability: experimental @@ -65920,7 +66083,7 @@ class _IInterfaceImplementedByAbstractClassProxy: @jsii.interface(jsii_type="jsii-calc.IInterfaceWithInternal") -class IInterfaceWithInternal(jsii.compat.Protocol): +class IInterfaceWithInternal(typing_extensions.Protocol): """ stability :stability: experimental @@ -65945,7 +66108,7 @@ class _IInterfaceWithInternalProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IInterfaceWithInternal" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IInterfaceWithInternal" @jsii.member(jsii_name="visible") def visible(self) -> None: @@ -65957,7 +66120,7 @@ class _IInterfaceWithInternalProxy: @jsii.interface(jsii_type="jsii-calc.IInterfaceWithMethods") -class IInterfaceWithMethods(jsii.compat.Protocol): +class IInterfaceWithMethods(typing_extensions.Protocol): """ stability :stability: experimental @@ -65967,9 +66130,9 @@ class IInterfaceWithMethods(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IInterfaceWithMethodsProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") - def value(self) -> str: + def value(self) -> builtins.str: """ stability :stability: experimental @@ -65991,11 +66154,11 @@ class _IInterfaceWithMethodsProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IInterfaceWithMethods" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IInterfaceWithMethods" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") - def value(self) -> str: + def value(self) -> builtins.str: """ stability :stability: experimental @@ -66012,7 +66175,7 @@ class _IInterfaceWithMethodsProxy: @jsii.interface(jsii_type="jsii-calc.IInterfaceWithOptionalMethodArguments") -class IInterfaceWithOptionalMethodArguments(jsii.compat.Protocol): +class IInterfaceWithOptionalMethodArguments(typing_extensions.Protocol): """awslabs/jsii#175 Interface proxies (and builders) do not respect optional arguments in methods. stability @@ -66024,7 +66187,11 @@ class IInterfaceWithOptionalMethodArguments(jsii.compat.Protocol): return _IInterfaceWithOptionalMethodArgumentsProxy @jsii.member(jsii_name="hello") - def hello(self, arg1: str, arg2: typing.Optional[jsii.Number] = None) -> None: + def hello( + self, + arg1: builtins.str, + arg2: typing.Optional[jsii.Number] = None, + ) -> None: """ :param arg1: - :param arg2: - @@ -66042,10 +66209,14 @@ class _IInterfaceWithOptionalMethodArgumentsProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IInterfaceWithOptionalMethodArguments" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IInterfaceWithOptionalMethodArguments" @jsii.member(jsii_name="hello") - def hello(self, arg1: str, arg2: typing.Optional[jsii.Number] = None) -> None: + def hello( + self, + arg1: builtins.str, + arg2: typing.Optional[jsii.Number] = None, + ) -> None: """ :param arg1: - :param arg2: - @@ -66057,7 +66228,7 @@ class _IInterfaceWithOptionalMethodArgumentsProxy: @jsii.interface(jsii_type="jsii-calc.IInterfaceWithProperties") -class IInterfaceWithProperties(jsii.compat.Protocol): +class IInterfaceWithProperties(typing_extensions.Protocol): """ stability :stability: experimental @@ -66067,26 +66238,26 @@ class IInterfaceWithProperties(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IInterfaceWithPropertiesProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="readOnlyString") - def read_only_string(self) -> str: + def read_only_string(self) -> builtins.str: """ stability :stability: experimental """ ... - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="readWriteString") - def read_write_string(self) -> str: + def read_write_string(self) -> builtins.str: """ stability :stability: experimental """ ... - @read_write_string.setter - def read_write_string(self, value: str) -> None: + @read_write_string.setter # type: ignore + def read_write_string(self, value: builtins.str) -> None: ... @@ -66096,33 +66267,36 @@ class _IInterfaceWithPropertiesProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IInterfaceWithProperties" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IInterfaceWithProperties" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="readOnlyString") - def read_only_string(self) -> str: + def read_only_string(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "readOnlyString") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="readWriteString") - def read_write_string(self) -> str: + def read_write_string(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "readWriteString") - @read_write_string.setter - def read_write_string(self, value: str) -> None: + @read_write_string.setter # type: ignore + def read_write_string(self, value: builtins.str) -> None: jsii.set(self, "readWriteString", value) @jsii.interface(jsii_type="jsii-calc.IInterfaceWithPropertiesExtension") -class IInterfaceWithPropertiesExtension(IInterfaceWithProperties, jsii.compat.Protocol): +class IInterfaceWithPropertiesExtension( + IInterfaceWithProperties, + typing_extensions.Protocol, +): """ stability :stability: experimental @@ -66132,7 +66306,7 @@ class IInterfaceWithPropertiesExtension(IInterfaceWithProperties, jsii.compat.Pr def __jsii_proxy_class__(): return _IInterfaceWithPropertiesExtensionProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="foo") def foo(self) -> jsii.Number: """ @@ -66141,20 +66315,22 @@ class IInterfaceWithPropertiesExtension(IInterfaceWithProperties, jsii.compat.Pr """ ... - @foo.setter + @foo.setter # type: ignore def foo(self, value: jsii.Number) -> None: ... -class _IInterfaceWithPropertiesExtensionProxy(jsii.proxy_for(IInterfaceWithProperties)): +class _IInterfaceWithPropertiesExtensionProxy( + jsii.proxy_for(IInterfaceWithProperties) # type: ignore +): """ stability :stability: experimental """ - __jsii_type__ = "jsii-calc.IInterfaceWithPropertiesExtension" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IInterfaceWithPropertiesExtension" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="foo") def foo(self) -> jsii.Number: """ @@ -66163,13 +66339,13 @@ class _IInterfaceWithPropertiesExtensionProxy(jsii.proxy_for(IInterfaceWithPrope """ return jsii.get(self, "foo") - @foo.setter + @foo.setter # type: ignore def foo(self, value: jsii.Number) -> None: jsii.set(self, "foo", value) @jsii.interface(jsii_type="jsii-calc.IJSII417PublicBaseOfBase") -class IJSII417PublicBaseOfBase(jsii.compat.Protocol): +class IJSII417PublicBaseOfBase(typing_extensions.Protocol): """ stability :stability: experimental @@ -66179,9 +66355,9 @@ class IJSII417PublicBaseOfBase(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IJSII417PublicBaseOfBaseProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="hasRoot") - def has_root(self) -> bool: + def has_root(self) -> builtins.bool: """ stability :stability: experimental @@ -66203,11 +66379,11 @@ class _IJSII417PublicBaseOfBaseProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IJSII417PublicBaseOfBase" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IJSII417PublicBaseOfBase" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="hasRoot") - def has_root(self) -> bool: + def has_root(self) -> builtins.bool: """ stability :stability: experimental @@ -66224,7 +66400,7 @@ class _IJSII417PublicBaseOfBaseProxy: @jsii.interface(jsii_type="jsii-calc.IJsii487External") -class IJsii487External(jsii.compat.Protocol): +class IJsii487External(typing_extensions.Protocol): """ stability :stability: experimental @@ -66241,12 +66417,12 @@ class _IJsii487ExternalProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IJsii487External" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IJsii487External" pass @jsii.interface(jsii_type="jsii-calc.IJsii487External2") -class IJsii487External2(jsii.compat.Protocol): +class IJsii487External2(typing_extensions.Protocol): """ stability :stability: experimental @@ -66263,12 +66439,12 @@ class _IJsii487External2Proxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IJsii487External2" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IJsii487External2" pass @jsii.interface(jsii_type="jsii-calc.IJsii496") -class IJsii496(jsii.compat.Protocol): +class IJsii496(typing_extensions.Protocol): """ stability :stability: experimental @@ -66285,12 +66461,12 @@ class _IJsii496Proxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IJsii496" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IJsii496" pass @jsii.interface(jsii_type="jsii-calc.IMutableObjectLiteral") -class IMutableObjectLiteral(jsii.compat.Protocol): +class IMutableObjectLiteral(typing_extensions.Protocol): """ stability :stability: experimental @@ -66300,17 +66476,17 @@ class IMutableObjectLiteral(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IMutableObjectLiteralProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") - def value(self) -> str: + def value(self) -> builtins.str: """ stability :stability: experimental """ ... - @value.setter - def value(self, value: str) -> None: + @value.setter # type: ignore + def value(self, value: builtins.str) -> None: ... @@ -66320,24 +66496,24 @@ class _IMutableObjectLiteralProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IMutableObjectLiteral" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IMutableObjectLiteral" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") - def value(self) -> str: + def value(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "value") - @value.setter - def value(self, value: str) -> None: + @value.setter # type: ignore + def value(self, value: builtins.str) -> None: jsii.set(self, "value", value) @jsii.interface(jsii_type="jsii-calc.INonInternalInterface") -class INonInternalInterface(IAnotherPublicInterface, jsii.compat.Protocol): +class INonInternalInterface(IAnotherPublicInterface, typing_extensions.Protocol): """ stability :stability: experimental @@ -66347,70 +66523,72 @@ class INonInternalInterface(IAnotherPublicInterface, jsii.compat.Protocol): def __jsii_proxy_class__(): return _INonInternalInterfaceProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="b") - def b(self) -> str: + def b(self) -> builtins.str: """ stability :stability: experimental """ ... - @b.setter - def b(self, value: str) -> None: + @b.setter # type: ignore + def b(self, value: builtins.str) -> None: ... - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="c") - def c(self) -> str: + def c(self) -> builtins.str: """ stability :stability: experimental """ ... - @c.setter - def c(self, value: str) -> None: + @c.setter # type: ignore + def c(self, value: builtins.str) -> None: ... -class _INonInternalInterfaceProxy(jsii.proxy_for(IAnotherPublicInterface)): +class _INonInternalInterfaceProxy( + jsii.proxy_for(IAnotherPublicInterface) # type: ignore +): """ stability :stability: experimental """ - __jsii_type__ = "jsii-calc.INonInternalInterface" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.INonInternalInterface" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="b") - def b(self) -> str: + def b(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "b") - @b.setter - def b(self, value: str) -> None: + @b.setter # type: ignore + def b(self, value: builtins.str) -> None: jsii.set(self, "b", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="c") - def c(self) -> str: + def c(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "c") - @c.setter - def c(self, value: str) -> None: + @c.setter # type: ignore + def c(self, value: builtins.str) -> None: jsii.set(self, "c", value) @jsii.interface(jsii_type="jsii-calc.IObjectWithProperty") -class IObjectWithProperty(jsii.compat.Protocol): +class IObjectWithProperty(typing_extensions.Protocol): """Make sure that setters are properly called on objects with interfaces. stability @@ -66421,21 +66599,21 @@ class IObjectWithProperty(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IObjectWithPropertyProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="property") - def property(self) -> str: + def property(self) -> builtins.str: """ stability :stability: experimental """ ... - @property.setter - def property(self, value: str) -> None: + @property.setter # type: ignore + def property(self, value: builtins.str) -> None: ... @jsii.member(jsii_name="wasSet") - def was_set(self) -> bool: + def was_set(self) -> builtins.bool: """ stability :stability: experimental @@ -66450,23 +66628,23 @@ class _IObjectWithPropertyProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IObjectWithProperty" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IObjectWithProperty" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="property") - def property(self) -> str: + def property(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "property") - @property.setter - def property(self, value: str) -> None: + @property.setter # type: ignore + def property(self, value: builtins.str) -> None: jsii.set(self, "property", value) @jsii.member(jsii_name="wasSet") - def was_set(self) -> bool: + def was_set(self) -> builtins.bool: """ stability :stability: experimental @@ -66475,7 +66653,7 @@ class _IObjectWithPropertyProxy: @jsii.interface(jsii_type="jsii-calc.IOptionalMethod") -class IOptionalMethod(jsii.compat.Protocol): +class IOptionalMethod(typing_extensions.Protocol): """Checks that optional result from interface method code generates correctly. stability @@ -66487,7 +66665,7 @@ class IOptionalMethod(jsii.compat.Protocol): return _IOptionalMethodProxy @jsii.member(jsii_name="optional") - def optional(self) -> typing.Optional[str]: + def optional(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental @@ -66502,10 +66680,10 @@ class _IOptionalMethodProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IOptionalMethod" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IOptionalMethod" @jsii.member(jsii_name="optional") - def optional(self) -> typing.Optional[str]: + def optional(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental @@ -66514,7 +66692,7 @@ class _IOptionalMethodProxy: @jsii.interface(jsii_type="jsii-calc.IPrivatelyImplemented") -class IPrivatelyImplemented(jsii.compat.Protocol): +class IPrivatelyImplemented(typing_extensions.Protocol): """ stability :stability: experimental @@ -66524,9 +66702,9 @@ class IPrivatelyImplemented(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IPrivatelyImplementedProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="success") - def success(self) -> bool: + def success(self) -> builtins.bool: """ stability :stability: experimental @@ -66540,11 +66718,11 @@ class _IPrivatelyImplementedProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IPrivatelyImplemented" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IPrivatelyImplemented" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="success") - def success(self) -> bool: + def success(self) -> builtins.bool: """ stability :stability: experimental @@ -66553,7 +66731,7 @@ class _IPrivatelyImplementedProxy: @jsii.interface(jsii_type="jsii-calc.IPublicInterface") -class IPublicInterface(jsii.compat.Protocol): +class IPublicInterface(typing_extensions.Protocol): """ stability :stability: experimental @@ -66564,7 +66742,7 @@ class IPublicInterface(jsii.compat.Protocol): return _IPublicInterfaceProxy @jsii.member(jsii_name="bye") - def bye(self) -> str: + def bye(self) -> builtins.str: """ stability :stability: experimental @@ -66578,10 +66756,10 @@ class _IPublicInterfaceProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IPublicInterface" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IPublicInterface" @jsii.member(jsii_name="bye") - def bye(self) -> str: + def bye(self) -> builtins.str: """ stability :stability: experimental @@ -66590,7 +66768,7 @@ class _IPublicInterfaceProxy: @jsii.interface(jsii_type="jsii-calc.IPublicInterface2") -class IPublicInterface2(jsii.compat.Protocol): +class IPublicInterface2(typing_extensions.Protocol): """ stability :stability: experimental @@ -66601,7 +66779,7 @@ class IPublicInterface2(jsii.compat.Protocol): return _IPublicInterface2Proxy @jsii.member(jsii_name="ciao") - def ciao(self) -> str: + def ciao(self) -> builtins.str: """ stability :stability: experimental @@ -66615,10 +66793,10 @@ class _IPublicInterface2Proxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IPublicInterface2" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IPublicInterface2" @jsii.member(jsii_name="ciao") - def ciao(self) -> str: + def ciao(self) -> builtins.str: """ stability :stability: experimental @@ -66627,7 +66805,7 @@ class _IPublicInterface2Proxy: @jsii.interface(jsii_type="jsii-calc.IRandomNumberGenerator") -class IRandomNumberGenerator(jsii.compat.Protocol): +class IRandomNumberGenerator(typing_extensions.Protocol): """Generates random numbers. stability @@ -66658,7 +66836,7 @@ class _IRandomNumberGeneratorProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IRandomNumberGenerator" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IRandomNumberGenerator" @jsii.member(jsii_name="next") def next(self) -> jsii.Number: @@ -66674,7 +66852,7 @@ class _IRandomNumberGeneratorProxy: @jsii.interface(jsii_type="jsii-calc.IReturnJsii976") -class IReturnJsii976(jsii.compat.Protocol): +class IReturnJsii976(typing_extensions.Protocol): """Returns a subclass of a known class which implements an interface. stability @@ -66685,7 +66863,7 @@ class IReturnJsii976(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IReturnJsii976Proxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="foo") def foo(self) -> jsii.Number: """ @@ -66702,9 +66880,9 @@ class _IReturnJsii976Proxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IReturnJsii976" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IReturnJsii976" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="foo") def foo(self) -> jsii.Number: """ @@ -66715,7 +66893,7 @@ class _IReturnJsii976Proxy: @jsii.interface(jsii_type="jsii-calc.IReturnsNumber") -class IReturnsNumber(jsii.compat.Protocol): +class IReturnsNumber(typing_extensions.Protocol): """ stability :stability: experimental @@ -66725,7 +66903,7 @@ class IReturnsNumber(jsii.compat.Protocol): def __jsii_proxy_class__(): return _IReturnsNumberProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="numberProp") def number_prop(self) -> scope.jsii_calc_lib.Number: """ @@ -66749,9 +66927,9 @@ class _IReturnsNumberProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IReturnsNumber" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IReturnsNumber" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="numberProp") def number_prop(self) -> scope.jsii_calc_lib.Number: """ @@ -66770,17 +66948,17 @@ class _IReturnsNumberProxy: @jsii.interface(jsii_type="jsii-calc.IStableInterface") -class IStableInterface(jsii.compat.Protocol): +class IStableInterface(typing_extensions.Protocol): @builtins.staticmethod def __jsii_proxy_class__(): return _IStableInterfaceProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: ... - @mutable_property.setter + @mutable_property.setter # type: ignore def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: ... @@ -66790,14 +66968,14 @@ class IStableInterface(jsii.compat.Protocol): class _IStableInterfaceProxy: - __jsii_type__ = "jsii-calc.IStableInterface" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IStableInterface" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: return jsii.get(self, "mutableProperty") - @mutable_property.setter + @mutable_property.setter # type: ignore def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "mutableProperty", value) @@ -66807,7 +66985,7 @@ class _IStableInterfaceProxy: @jsii.interface(jsii_type="jsii-calc.IStructReturningDelegate") -class IStructReturningDelegate(jsii.compat.Protocol): +class IStructReturningDelegate(typing_extensions.Protocol): """Verifies that a "pure" implementation of an interface works correctly. stability @@ -66834,7 +67012,7 @@ class _IStructReturningDelegateProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.IStructReturningDelegate" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IStructReturningDelegate" @jsii.member(jsii_name="returnStruct") def return_struct(self) -> "StructB": @@ -66846,7 +67024,8 @@ class _IStructReturningDelegateProxy: class ImplementInternalInterface( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ImplementInternalInterface" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ImplementInternalInterface", ): """ stability @@ -66860,17 +67039,17 @@ class ImplementInternalInterface( """ jsii.create(ImplementInternalInterface, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="prop") - def prop(self) -> str: + def prop(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "prop") - @prop.setter - def prop(self, value: str) -> None: + @prop.setter # type: ignore + def prop(self, value: builtins.str) -> None: jsii.set(self, "prop", value) @@ -66887,7 +67066,7 @@ class Implementation(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Implementatio """ jsii.create(Implementation, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") def value(self) -> jsii.Number: """ @@ -66899,7 +67078,8 @@ class Implementation(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Implementatio @jsii.implements(IInterfaceWithInternal) class ImplementsInterfaceWithInternal( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ImplementsInterfaceWithInternal" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ImplementsInterfaceWithInternal", ): """ stability @@ -66941,7 +67121,8 @@ class ImplementsInterfaceWithInternalSubclass( class ImplementsPrivateInterface( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ImplementsPrivateInterface" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ImplementsPrivateInterface", ): """ stability @@ -66955,17 +67136,17 @@ class ImplementsPrivateInterface( """ jsii.create(ImplementsPrivateInterface, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="private") - def private(self) -> str: + def private(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "private") - @private.setter - def private(self, value: str) -> None: + @private.setter # type: ignore + def private(self, value: builtins.str) -> None: jsii.set(self, "private", value) @@ -66979,7 +67160,7 @@ class ImplictBaseOfBase(scope.jsii_calc_base.BaseProps): self, *, foo: scope.jsii_calc_base_of_base.Very, - bar: str, + bar: builtins.str, goo: datetime.datetime, ) -> None: """ @@ -66990,7 +67171,7 @@ class ImplictBaseOfBase(scope.jsii_calc_base.BaseProps): stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "foo": foo, "bar": bar, "goo": goo, @@ -66998,11 +67179,15 @@ class ImplictBaseOfBase(scope.jsii_calc_base.BaseProps): @builtins.property def foo(self) -> scope.jsii_calc_base_of_base.Very: - return self._values.get("foo") + result = self._values.get("foo") + assert result is not None, "Required property 'foo' is missing" + return result @builtins.property - def bar(self) -> str: - return self._values.get("bar") + def bar(self) -> builtins.str: + result = self._values.get("bar") + assert result is not None, "Required property 'bar' is missing" + return result @builtins.property def goo(self) -> datetime.datetime: @@ -67010,12 +67195,14 @@ class ImplictBaseOfBase(scope.jsii_calc_base.BaseProps): stability :stability: experimental """ - return self._values.get("goo") + result = self._values.get("goo") + assert result is not None, "Required property 'goo' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -67025,7 +67212,8 @@ class ImplictBaseOfBase(scope.jsii_calc_base.BaseProps): class InterfaceCollections( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.InterfaceCollections" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.InterfaceCollections", ): """Verifies that collections of interfaces or structs are correctly handled. @@ -67055,7 +67243,7 @@ class InterfaceCollections( @jsii.member(jsii_name="mapOfInterfaces") @builtins.classmethod - def map_of_interfaces(cls) -> typing.Mapping[str, "IBell"]: + def map_of_interfaces(cls) -> typing.Mapping[builtins.str, "IBell"]: """ stability :stability: experimental @@ -67064,7 +67252,7 @@ class InterfaceCollections( @jsii.member(jsii_name="mapOfStructs") @builtins.classmethod - def map_of_structs(cls) -> typing.Mapping[str, "StructA"]: + def map_of_structs(cls) -> typing.Mapping[builtins.str, "StructA"]: """ stability :stability: experimental @@ -67082,7 +67270,8 @@ class InterfacesMaker(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.InterfacesMa @jsii.member(jsii_name="makeInterfaces") @builtins.classmethod def make_interfaces( - cls, count: jsii.Number + cls, + count: jsii.Number, ) -> typing.List[scope.jsii_calc_lib.IDoublable]: """ :param count: - @@ -67128,7 +67317,8 @@ class _IsomorphismProxy(Isomorphism): class JSII417PublicBaseOfBase( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.JSII417PublicBaseOfBase" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.JSII417PublicBaseOfBase", ): """ stability @@ -67159,9 +67349,9 @@ class JSII417PublicBaseOfBase( """ return jsii.invoke(self, "foo", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="hasRoot") - def has_root(self) -> bool: + def has_root(self) -> builtins.bool: """ stability :stability: experimental @@ -67170,7 +67360,8 @@ class JSII417PublicBaseOfBase( class JSObjectLiteralForInterface( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.JSObjectLiteralForInterface" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.JSObjectLiteralForInterface", ): """ stability @@ -67202,7 +67393,8 @@ class JSObjectLiteralForInterface( class JSObjectLiteralToNative( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.JSObjectLiteralToNative" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.JSObjectLiteralToNative", ): """ stability @@ -67226,7 +67418,8 @@ class JSObjectLiteralToNative( class JSObjectLiteralToNativeClass( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.JSObjectLiteralToNativeClass" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.JSObjectLiteralToNativeClass", ): """ stability @@ -67240,20 +67433,20 @@ class JSObjectLiteralToNativeClass( """ jsii.create(JSObjectLiteralToNativeClass, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="propA") - def prop_a(self) -> str: + def prop_a(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "propA") - @prop_a.setter - def prop_a(self, value: str) -> None: + @prop_a.setter # type: ignore + def prop_a(self, value: builtins.str) -> None: jsii.set(self, "propA", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="propB") def prop_b(self) -> jsii.Number: """ @@ -67262,13 +67455,14 @@ class JSObjectLiteralToNativeClass( """ return jsii.get(self, "propB") - @prop_b.setter + @prop_b.setter # type: ignore def prop_b(self, value: jsii.Number) -> None: jsii.set(self, "propB", value) class JavaReservedWords( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.JavaReservedWords" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.JavaReservedWords", ): """ stability @@ -67698,17 +67892,17 @@ class JavaReservedWords( """ return jsii.invoke(self, "volatile", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="while") - def while_(self) -> str: + def while_(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "while") - @while_.setter - def while_(self, value: str) -> None: + @while_.setter # type: ignore + def while_(self, value: builtins.str) -> None: jsii.set(self, "while", value) @@ -67756,9 +67950,9 @@ class JsiiAgent(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.JsiiAgent"): """ jsii.create(JsiiAgent, self, []) - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="jsiiAgent") - def jsii_agent(cls) -> typing.Optional[str]: + def jsii_agent(cls) -> typing.Optional[builtins.str]: """Returns the value of the JSII_AGENT environment variable. stability @@ -67895,7 +68089,7 @@ class JsonFormatter(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.JsonFormatter" @jsii.member(jsii_name="stringify") @builtins.classmethod - def stringify(cls, value: typing.Any = None) -> typing.Optional[str]: + def stringify(cls, value: typing.Any = None) -> typing.Optional[builtins.str]: """ :param value: - @@ -67921,10 +68115,10 @@ class LoadBalancedFargateServiceProps: self, *, container_port: typing.Optional[jsii.Number] = None, - cpu: typing.Optional[str] = None, - memory_mib: typing.Optional[str] = None, - public_load_balancer: typing.Optional[bool] = None, - public_tasks: typing.Optional[bool] = None, + cpu: typing.Optional[builtins.str] = None, + memory_mib: typing.Optional[builtins.str] = None, + public_load_balancer: typing.Optional[builtins.bool] = None, + public_tasks: typing.Optional[builtins.bool] = None, ) -> None: """jsii#298: show default values in sphinx documentation, and respect newlines. @@ -67937,7 +68131,7 @@ class LoadBalancedFargateServiceProps: stability :stability: experimental """ - self._values = {} + self._values: typing.Dict[str, typing.Any] = {} if container_port is not None: self._values["container_port"] = container_port if cpu is not None: @@ -67961,10 +68155,11 @@ class LoadBalancedFargateServiceProps: stability :stability: experimental """ - return self._values.get("container_port") + result = self._values.get("container_port") + return result @builtins.property - def cpu(self) -> typing.Optional[str]: + def cpu(self) -> typing.Optional[builtins.str]: """The number of cpu units used by the task. Valid values, which determines your range of valid values for the memory parameter: @@ -67982,10 +68177,11 @@ class LoadBalancedFargateServiceProps: stability :stability: experimental """ - return self._values.get("cpu") + result = self._values.get("cpu") + return result @builtins.property - def memory_mib(self) -> typing.Optional[str]: + def memory_mib(self) -> typing.Optional[builtins.str]: """The amount (in MiB) of memory used by the task. This field is required and you must use one of the following values, which determines your range of valid values @@ -68009,10 +68205,11 @@ class LoadBalancedFargateServiceProps: stability :stability: experimental """ - return self._values.get("memory_mib") + result = self._values.get("memory_mib") + return result @builtins.property - def public_load_balancer(self) -> typing.Optional[bool]: + def public_load_balancer(self) -> typing.Optional[builtins.bool]: """Determines whether the Application Load Balancer will be internet-facing. default @@ -68021,10 +68218,11 @@ class LoadBalancedFargateServiceProps: stability :stability: experimental """ - return self._values.get("public_load_balancer") + result = self._values.get("public_load_balancer") + return result @builtins.property - def public_tasks(self) -> typing.Optional[bool]: + def public_tasks(self) -> typing.Optional[builtins.bool]: """Determines whether your Fargate Service will be assigned a public IP address. default @@ -68033,12 +68231,13 @@ class LoadBalancedFargateServiceProps: stability :stability: experimental """ - return self._values.get("public_tasks") + result = self._values.get("public_tasks") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -68048,7 +68247,8 @@ class LoadBalancedFargateServiceProps: class MethodNamedProperty( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.MethodNamedProperty" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.MethodNamedProperty", ): """ stability @@ -68063,14 +68263,14 @@ class MethodNamedProperty( jsii.create(MethodNamedProperty, self, []) @jsii.member(jsii_name="property") - def property(self) -> str: + def property(self) -> builtins.str: """ stability :stability: experimental """ return jsii.invoke(self, "property", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="elite") def elite(self) -> jsii.Number: """ @@ -68082,7 +68282,9 @@ class MethodNamedProperty( @jsii.implements(IFriendlier, IRandomNumberGenerator) class Multiply( - BinaryOperation, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Multiply" + BinaryOperation, + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.Multiply", ): """The "*" binary operation. @@ -68091,7 +68293,9 @@ class Multiply( """ def __init__( - self, lhs: scope.jsii_calc_lib.Value, rhs: scope.jsii_calc_lib.Value + self, + lhs: scope.jsii_calc_lib.Value, + rhs: scope.jsii_calc_lib.Value, ) -> None: """Creates a BinaryOperation. @@ -68104,7 +68308,7 @@ class Multiply( jsii.create(Multiply, self, [lhs, rhs]) @jsii.member(jsii_name="farewell") - def farewell(self) -> str: + def farewell(self) -> builtins.str: """Say farewell. stability @@ -68113,7 +68317,7 @@ class Multiply( return jsii.invoke(self, "farewell", []) @jsii.member(jsii_name="goodbye") - def goodbye(self) -> str: + def goodbye(self) -> builtins.str: """Say goodbye. stability @@ -68131,7 +68335,7 @@ class Multiply( return jsii.invoke(self, "next", []) @jsii.member(jsii_name="toString") - def to_string(self) -> str: + def to_string(self) -> builtins.str: """String representation of the value. stability @@ -68139,7 +68343,7 @@ class Multiply( """ return jsii.invoke(self, "toString", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") def value(self) -> jsii.Number: """The value. @@ -68151,7 +68355,8 @@ class Multiply( class NestedClassInstance( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.NestedClassInstance" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.NestedClassInstance", ): """ stability @@ -68161,7 +68366,7 @@ class NestedClassInstance( @jsii.member(jsii_name="makeInstance") @builtins.classmethod def make_instance( - cls + cls, ) -> scope.jsii_calc_lib.custom_submodule_name.NestingClass.NestedClass: """ stability @@ -68183,7 +68388,7 @@ class NestedStruct: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "number_prop": number_prop, } @@ -68194,12 +68399,14 @@ class NestedStruct: stability :stability: experimental """ - return self._values.get("number_prop") + result = self._values.get("number_prop") + assert result is not None, "Required property 'number_prop' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -68209,7 +68416,8 @@ class NestedStruct: class NodeStandardLibrary( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.NodeStandardLibrary" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.NodeStandardLibrary", ): """Test fixture to verify that jsii modules can use the node standard library. @@ -68225,7 +68433,7 @@ class NodeStandardLibrary( jsii.create(NodeStandardLibrary, self, []) @jsii.member(jsii_name="cryptoSha256") - def crypto_sha256(self) -> str: + def crypto_sha256(self) -> builtins.str: """Uses node.js "crypto" module to calculate sha256 of a string. return @@ -68237,7 +68445,7 @@ class NodeStandardLibrary( return jsii.invoke(self, "cryptoSha256", []) @jsii.member(jsii_name="fsReadFile") - def fs_read_file(self) -> str: + def fs_read_file(self) -> builtins.str: """Reads a local resource file (resource.txt) asynchronously. return @@ -68249,7 +68457,7 @@ class NodeStandardLibrary( return jsii.ainvoke(self, "fsReadFile", []) @jsii.member(jsii_name="fsReadFileSync") - def fs_read_file_sync(self) -> str: + def fs_read_file_sync(self) -> builtins.str: """Sync version of fsReadFile. return @@ -68260,9 +68468,9 @@ class NodeStandardLibrary( """ return jsii.invoke(self, "fsReadFileSync", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="osPlatform") - def os_platform(self) -> str: + def os_platform(self) -> builtins.str: """Returns the current os.platform() from the "os" node module. stability @@ -68272,7 +68480,8 @@ class NodeStandardLibrary( class NullShouldBeTreatedAsUndefined( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.NullShouldBeTreatedAsUndefined" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.NullShouldBeTreatedAsUndefined", ): """jsii#282, aws-cdk#157: null should be treated as "undefined". @@ -68280,7 +68489,7 @@ class NullShouldBeTreatedAsUndefined( :stability: experimental """ - def __init__(self, _param1: str, optional: typing.Any = None) -> None: + def __init__(self, _param1: builtins.str, optional: typing.Any = None) -> None: """ :param _param1: - :param optional: - @@ -68329,17 +68538,17 @@ class NullShouldBeTreatedAsUndefined( """ return jsii.invoke(self, "verifyPropertyIsUndefined", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="changeMeToUndefined") - def change_me_to_undefined(self) -> typing.Optional[str]: + def change_me_to_undefined(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental """ return jsii.get(self, "changeMeToUndefined") - @change_me_to_undefined.setter - def change_me_to_undefined(self, value: typing.Optional[str]) -> None: + @change_me_to_undefined.setter # type: ignore + def change_me_to_undefined(self, value: typing.Optional[builtins.str]) -> None: jsii.set(self, "changeMeToUndefined", value) @@ -68365,7 +68574,7 @@ class NullShouldBeTreatedAsUndefinedData: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "array_with_three_elements_and_undefined_as_second_argument": array_with_three_elements_and_undefined_as_second_argument, } if this_should_be_undefined is not None: @@ -68379,7 +68588,9 @@ class NullShouldBeTreatedAsUndefinedData: stability :stability: experimental """ - return self._values.get("array_with_three_elements_and_undefined_as_second_argument") + result = self._values.get("array_with_three_elements_and_undefined_as_second_argument") + assert result is not None, "Required property 'array_with_three_elements_and_undefined_as_second_argument' is missing" + return result @builtins.property def this_should_be_undefined(self) -> typing.Any: @@ -68387,12 +68598,13 @@ class NullShouldBeTreatedAsUndefinedData: stability :stability: experimental """ - return self._values.get("this_should_be_undefined") + result = self._values.get("this_should_be_undefined") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -68418,7 +68630,7 @@ class NumberGenerator(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.NumberGenera jsii.create(NumberGenerator, self, [generator]) @jsii.member(jsii_name="isSameGenerator") - def is_same_generator(self, gen: "IRandomNumberGenerator") -> bool: + def is_same_generator(self, gen: "IRandomNumberGenerator") -> builtins.bool: """ :param gen: - @@ -68435,7 +68647,7 @@ class NumberGenerator(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.NumberGenera """ return jsii.invoke(self, "nextTimes100", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="generator") def generator(self) -> "IRandomNumberGenerator": """ @@ -68444,13 +68656,14 @@ class NumberGenerator(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.NumberGenera """ return jsii.get(self, "generator") - @generator.setter + @generator.setter # type: ignore def generator(self, value: "IRandomNumberGenerator") -> None: jsii.set(self, "generator", value) class ObjectRefsInCollections( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ObjectRefsInCollections" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ObjectRefsInCollections", ): """Verify that object references can be passed inside collections. @@ -68467,7 +68680,8 @@ class ObjectRefsInCollections( @jsii.member(jsii_name="sumFromArray") def sum_from_array( - self, values: typing.List[scope.jsii_calc_lib.Value] + self, + values: typing.List[scope.jsii_calc_lib.Value], ) -> jsii.Number: """Returns the sum of all values. @@ -68480,7 +68694,8 @@ class ObjectRefsInCollections( @jsii.member(jsii_name="sumFromMap") def sum_from_map( - self, values: typing.Mapping[str, scope.jsii_calc_lib.Value] + self, + values: typing.Mapping[builtins.str, scope.jsii_calc_lib.Value], ) -> jsii.Number: """Returns the sum of all values in a map. @@ -68493,7 +68708,8 @@ class ObjectRefsInCollections( class ObjectWithPropertyProvider( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ObjectWithPropertyProvider" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ObjectWithPropertyProvider", ): """ stability @@ -68538,7 +68754,8 @@ class Old(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Old"): class OptionalArgumentInvoker( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.OptionalArgumentInvoker" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.OptionalArgumentInvoker", ): """ stability @@ -68572,7 +68789,8 @@ class OptionalArgumentInvoker( class OptionalConstructorArgument( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.OptionalConstructorArgument" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.OptionalConstructorArgument", ): """ stability @@ -68582,7 +68800,7 @@ class OptionalConstructorArgument( def __init__( self, arg1: jsii.Number, - arg2: str, + arg2: builtins.str, arg3: typing.Optional[datetime.datetime] = None, ) -> None: """ @@ -68595,7 +68813,7 @@ class OptionalConstructorArgument( """ jsii.create(OptionalConstructorArgument, self, [arg1, arg2, arg3]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="arg1") def arg1(self) -> jsii.Number: """ @@ -68604,16 +68822,16 @@ class OptionalConstructorArgument( """ return jsii.get(self, "arg1") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="arg2") - def arg2(self) -> str: + def arg2(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "arg2") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="arg3") def arg3(self) -> typing.Optional[datetime.datetime]: """ @@ -68629,29 +68847,30 @@ class OptionalConstructorArgument( name_mapping={"field": "field"}, ) class OptionalStruct: - def __init__(self, *, field: typing.Optional[str] = None) -> None: + def __init__(self, *, field: typing.Optional[builtins.str] = None) -> None: """ :param field: stability :stability: experimental """ - self._values = {} + self._values: typing.Dict[str, typing.Any] = {} if field is not None: self._values["field"] = field @builtins.property - def field(self) -> typing.Optional[str]: + def field(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental """ - return self._values.get("field") + result = self._values.get("field") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -68661,14 +68880,15 @@ class OptionalStruct: class OptionalStructConsumer( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.OptionalStructConsumer" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.OptionalStructConsumer", ): """ stability :stability: experimental """ - def __init__(self, *, field: typing.Optional[str] = None) -> None: + def __init__(self, *, field: typing.Optional[builtins.str] = None) -> None: """ :param field: @@ -68679,18 +68899,18 @@ class OptionalStructConsumer( jsii.create(OptionalStructConsumer, self, [optional_struct]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="parameterWasUndefined") - def parameter_was_undefined(self) -> bool: + def parameter_was_undefined(self) -> builtins.bool: """ stability :stability: experimental """ return jsii.get(self, "parameterWasUndefined") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="fieldValue") - def field_value(self) -> typing.Optional[str]: + def field_value(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental @@ -68699,7 +68919,8 @@ class OptionalStructConsumer( class OverridableProtectedMember( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.OverridableProtectedMember" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.OverridableProtectedMember", ): """ see @@ -68716,7 +68937,7 @@ class OverridableProtectedMember( jsii.create(OverridableProtectedMember, self, []) @jsii.member(jsii_name="overrideMe") - def _override_me(self) -> str: + def _override_me(self) -> builtins.str: """ stability :stability: experimental @@ -68732,38 +68953,39 @@ class OverridableProtectedMember( return jsii.invoke(self, "switchModes", []) @jsii.member(jsii_name="valueFromProtected") - def value_from_protected(self) -> str: + def value_from_protected(self) -> builtins.str: """ stability :stability: experimental """ return jsii.invoke(self, "valueFromProtected", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="overrideReadOnly") - def _override_read_only(self) -> str: + def _override_read_only(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "overrideReadOnly") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="overrideReadWrite") - def _override_read_write(self) -> str: + def _override_read_write(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "overrideReadWrite") - @_override_read_write.setter - def _override_read_write(self, value: str) -> None: + @_override_read_write.setter # type: ignore + def _override_read_write(self, value: builtins.str) -> None: jsii.set(self, "overrideReadWrite", value) class OverrideReturnsObject( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.OverrideReturnsObject" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.OverrideReturnsObject", ): """ stability @@ -68794,7 +69016,7 @@ class OverrideReturnsObject( name_mapping={"foo": "foo"}, ) class ParentStruct982: - def __init__(self, *, foo: str) -> None: + def __init__(self, *, foo: builtins.str) -> None: """https://github.com/aws/jsii/issues/982. :param foo: @@ -68802,22 +69024,24 @@ class ParentStruct982: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "foo": foo, } @builtins.property - def foo(self) -> str: + def foo(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("foo") + result = self._values.get("foo") + assert result is not None, "Required property 'foo' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -68853,7 +69077,7 @@ class PartiallyInitializedThisConsumer( obj: "ConstructorPassesThisOut", dt: datetime.datetime, ev: "AllTypesEnum", - ) -> str: + ) -> builtins.str: """ :param obj: - :param dt: - @@ -68872,7 +69096,7 @@ class _PartiallyInitializedThisConsumerProxy(PartiallyInitializedThisConsumer): obj: "ConstructorPassesThisOut", dt: datetime.datetime, ev: "AllTypesEnum", - ) -> str: + ) -> builtins.str: """ :param obj: - :param dt: - @@ -68898,7 +69122,7 @@ class Polymorphism(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Polymorphism"): jsii.create(Polymorphism, self, []) @jsii.member(jsii_name="sayHello") - def say_hello(self, friendly: scope.jsii_calc_lib.IFriendly) -> str: + def say_hello(self, friendly: scope.jsii_calc_lib.IFriendly) -> builtins.str: """ :param friendly: - @@ -68909,7 +69133,9 @@ class Polymorphism(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Polymorphism"): class Power( - _CompositeOperation_1c4d123b, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Power" + _CompositeOperation_1c4d123b, + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.Power", ): """The power operation. @@ -68918,7 +69144,9 @@ class Power( """ def __init__( - self, base: scope.jsii_calc_lib.Value, pow: scope.jsii_calc_lib.Value + self, + base: scope.jsii_calc_lib.Value, + pow: scope.jsii_calc_lib.Value, ) -> None: """Creates a Power operation. @@ -68930,7 +69158,7 @@ class Power( """ jsii.create(Power, self, [base, pow]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="base") def base(self) -> scope.jsii_calc_lib.Value: """The base of the power. @@ -68940,7 +69168,7 @@ class Power( """ return jsii.get(self, "base") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="expression") def expression(self) -> scope.jsii_calc_lib.Value: """The expression that this operation consists of. @@ -68952,7 +69180,7 @@ class Power( """ return jsii.get(self, "expression") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="pow") def pow(self) -> scope.jsii_calc_lib.Value: """The number of times to multiply. @@ -68964,7 +69192,8 @@ class Power( class PropertyNamedProperty( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.PropertyNamedProperty" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.PropertyNamedProperty", ): """Reproduction for https://github.com/aws/jsii/issues/1113 Where a method or property named "property" would result in impossible to load Python code. @@ -68979,18 +69208,18 @@ class PropertyNamedProperty( """ jsii.create(PropertyNamedProperty, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="property") - def property(self) -> str: + def property(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "property") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="yetAnoterOne") - def yet_anoter_one(self) -> bool: + def yet_anoter_one(self) -> builtins.bool: """ stability :stability: experimental @@ -69021,7 +69250,8 @@ class PublicClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.PublicClass"): class PythonReservedWords( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.PythonReservedWords" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.PythonReservedWords", ): """ stability @@ -69293,7 +69523,8 @@ class PythonReservedWords( class ReferenceEnumFromScopedPackage( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ReferenceEnumFromScopedPackage" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.ReferenceEnumFromScopedPackage", ): """See awslabs/jsii#138. @@ -69326,7 +69557,7 @@ class ReferenceEnumFromScopedPackage( """ return jsii.invoke(self, "saveFoo", [value]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="foo") def foo(self) -> typing.Optional[scope.jsii_calc_lib.EnumFromScopedModule]: """ @@ -69335,9 +69566,10 @@ class ReferenceEnumFromScopedPackage( """ return jsii.get(self, "foo") - @foo.setter + @foo.setter # type: ignore def foo( - self, value: typing.Optional[scope.jsii_calc_lib.EnumFromScopedModule] + self, + value: typing.Optional[scope.jsii_calc_lib.EnumFromScopedModule], ) -> None: jsii.set(self, "foo", value) @@ -69364,7 +69596,7 @@ class ReturnsPrivateImplementationOfInterface( """ jsii.create(ReturnsPrivateImplementationOfInterface, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="privateImplementation") def private_implementation(self) -> "IPrivatelyImplemented": """ @@ -69383,7 +69615,7 @@ class RootStruct: def __init__( self, *, - string_prop: str, + string_prop: builtins.str, nested_struct: typing.Optional["NestedStruct"] = None, ) -> None: """This is here to check that we can pass a nested struct into a kwargs by specifying it as an in-line dictionary. @@ -69399,20 +69631,22 @@ class RootStruct: """ if isinstance(nested_struct, dict): nested_struct = NestedStruct(**nested_struct) - self._values = { + self._values: typing.Dict[str, typing.Any] = { "string_prop": string_prop, } if nested_struct is not None: self._values["nested_struct"] = nested_struct @builtins.property - def string_prop(self) -> str: + def string_prop(self) -> builtins.str: """May not be empty. stability :stability: experimental """ - return self._values.get("string_prop") + result = self._values.get("string_prop") + assert result is not None, "Required property 'string_prop' is missing" + return result @builtins.property def nested_struct(self) -> typing.Optional["NestedStruct"]: @@ -69420,12 +69654,13 @@ class RootStruct: stability :stability: experimental """ - return self._values.get("nested_struct") + result = self._values.get("nested_struct") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -69435,7 +69670,8 @@ class RootStruct: class RootStructValidator( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.RootStructValidator" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.RootStructValidator", ): """ stability @@ -69445,7 +69681,10 @@ class RootStructValidator( @jsii.member(jsii_name="validate") @builtins.classmethod def validate( - cls, *, string_prop: str, nested_struct: typing.Optional["NestedStruct"] = None + cls, + *, + string_prop: builtins.str, + nested_struct: typing.Optional["NestedStruct"] = None, ) -> None: """ :param string_prop: May not be empty. @@ -69460,7 +69699,8 @@ class RootStructValidator( class RuntimeTypeChecking( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.RuntimeTypeChecking" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.RuntimeTypeChecking", ): """ stability @@ -69478,7 +69718,7 @@ class RuntimeTypeChecking( def method_with_defaulted_arguments( self, arg1: typing.Optional[jsii.Number] = None, - arg2: typing.Optional[str] = None, + arg2: typing.Optional[builtins.str] = None, arg3: typing.Optional[datetime.datetime] = None, ) -> None: """ @@ -69505,7 +69745,7 @@ class RuntimeTypeChecking( def method_with_optional_arguments( self, arg1: jsii.Number, - arg2: str, + arg2: builtins.str, arg3: typing.Optional[datetime.datetime] = None, ) -> None: """Used to verify verification of number of method arguments. @@ -69532,8 +69772,8 @@ class SecondLevelStruct: def __init__( self, *, - deeper_required_prop: str, - deeper_optional_prop: typing.Optional[str] = None, + deeper_required_prop: builtins.str, + deeper_optional_prop: typing.Optional[builtins.str] = None, ) -> None: """ :param deeper_required_prop: It's long and required. @@ -69542,34 +69782,37 @@ class SecondLevelStruct: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "deeper_required_prop": deeper_required_prop, } if deeper_optional_prop is not None: self._values["deeper_optional_prop"] = deeper_optional_prop @builtins.property - def deeper_required_prop(self) -> str: + def deeper_required_prop(self) -> builtins.str: """It's long and required. stability :stability: experimental """ - return self._values.get("deeper_required_prop") + result = self._values.get("deeper_required_prop") + assert result is not None, "Required property 'deeper_required_prop' is missing" + return result @builtins.property - def deeper_optional_prop(self) -> typing.Optional[str]: + def deeper_optional_prop(self) -> typing.Optional[builtins.str]: """It's long, but you'll almost never pass it. stability :stability: experimental """ - return self._values.get("deeper_optional_prop") + result = self._values.get("deeper_optional_prop") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -69579,7 +69822,8 @@ class SecondLevelStruct: class SingleInstanceTwoTypes( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.SingleInstanceTwoTypes" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.SingleInstanceTwoTypes", ): """Test that a single instance can be returned under two different FQNs. @@ -69625,7 +69869,7 @@ class SingletonInt(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.SingletonInt"): """ @jsii.member(jsii_name="isSingletonInt") - def is_singleton_int(self, value: jsii.Number) -> bool: + def is_singleton_int(self, value: jsii.Number) -> builtins.bool: """ :param value: - @@ -69661,7 +69905,7 @@ class SingletonString(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.SingletonStr """ @jsii.member(jsii_name="isSingletonString") - def is_singleton_string(self, value: str) -> bool: + def is_singleton_string(self, value: builtins.str) -> builtins.bool: """ :param value: - @@ -69693,7 +69937,12 @@ class SingletonStringEnum(enum.Enum): name_mapping={"property": "property", "yet_anoter_one": "yetAnoterOne"}, ) class SmellyStruct: - def __init__(self, *, property: str, yet_anoter_one: bool) -> None: + def __init__( + self, + *, + property: builtins.str, + yet_anoter_one: builtins.bool, + ) -> None: """ :param property: :param yet_anoter_one: @@ -69701,31 +69950,35 @@ class SmellyStruct: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "property": property, "yet_anoter_one": yet_anoter_one, } @builtins.property - def property(self) -> str: + def property(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("property") + result = self._values.get("property") + assert result is not None, "Required property 'property' is missing" + return result @builtins.property - def yet_anoter_one(self) -> bool: + def yet_anoter_one(self) -> builtins.bool: """ stability :stability: experimental """ - return self._values.get("yet_anoter_one") + result = self._values.get("yet_anoter_one") + assert result is not None, "Required property 'yet_anoter_one' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -69768,7 +70021,9 @@ class SomeTypeJsii976(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.SomeTypeJsii class StableClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StableClass"): def __init__( - self, readonly_string: str, mutable_number: typing.Optional[jsii.Number] = None + self, + readonly_string: builtins.str, + mutable_number: typing.Optional[jsii.Number] = None, ) -> None: """ :param readonly_string: - @@ -69780,17 +70035,17 @@ class StableClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StableClass"): def method(self) -> None: return jsii.invoke(self, "method", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="readonlyProperty") - def readonly_property(self) -> str: + def readonly_property(self) -> builtins.str: return jsii.get(self, "readonlyProperty") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="mutableProperty") def mutable_property(self) -> typing.Optional[jsii.Number]: return jsii.get(self, "mutableProperty") - @mutable_property.setter + @mutable_property.setter # type: ignore def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: jsii.set(self, "mutableProperty", value) @@ -69807,22 +70062,24 @@ class StableEnum(enum.Enum): name_mapping={"readonly_property": "readonlyProperty"}, ) class StableStruct: - def __init__(self, *, readonly_property: str) -> None: + def __init__(self, *, readonly_property: builtins.str) -> None: """ :param readonly_property: """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "readonly_property": readonly_property, } @builtins.property - def readonly_property(self) -> str: - return self._values.get("readonly_property") + def readonly_property(self) -> builtins.str: + result = self._values.get("readonly_property") + assert result is not None, "Required property 'readonly_property' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -69842,24 +70099,24 @@ class StaticContext(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StaticContext" @jsii.member(jsii_name="canAccessStaticContext") @builtins.classmethod - def can_access_static_context(cls) -> bool: + def can_access_static_context(cls) -> builtins.bool: """ stability :stability: experimental """ return jsii.sinvoke(cls, "canAccessStaticContext", []) - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="staticVariable") - def static_variable(cls) -> bool: + def static_variable(cls) -> builtins.bool: """ stability :stability: experimental """ return jsii.sget(cls, "staticVariable") - @static_variable.setter - def static_variable(cls, value: bool) -> None: + @static_variable.setter # type: ignore + def static_variable(cls, value: builtins.bool) -> None: jsii.sset(cls, "staticVariable", value) @@ -69869,7 +70126,7 @@ class Statics(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Statics"): :stability: experimental """ - def __init__(self, value: str) -> None: + def __init__(self, value: builtins.str) -> None: """ :param value: - @@ -69880,7 +70137,7 @@ class Statics(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Statics"): @jsii.member(jsii_name="staticMethod") @builtins.classmethod - def static_method(cls, name: str) -> str: + def static_method(cls, name: builtins.str) -> builtins.str: """Jsdocs for static method. :param name: The name of the person to say hello to. @@ -69891,14 +70148,14 @@ class Statics(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Statics"): return jsii.sinvoke(cls, "staticMethod", [name]) @jsii.member(jsii_name="justMethod") - def just_method(self) -> str: + def just_method(self) -> builtins.str: """ stability :stability: experimental """ return jsii.invoke(self, "justMethod", []) - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="BAR") def BAR(cls) -> jsii.Number: """Constants may also use all-caps. @@ -69908,7 +70165,7 @@ class Statics(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Statics"): """ return jsii.sget(cls, "BAR") - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="ConstObj") def CONST_OBJ(cls) -> "DoubleTrouble": """ @@ -69917,9 +70174,9 @@ class Statics(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Statics"): """ return jsii.sget(cls, "ConstObj") - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="Foo") - def FOO(cls) -> str: + def FOO(cls) -> builtins.str: """Jsdocs for static property. stability @@ -69927,9 +70184,9 @@ class Statics(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Statics"): """ return jsii.sget(cls, "Foo") - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="zooBar") - def ZOO_BAR(cls) -> typing.Mapping[str, str]: + def ZOO_BAR(cls) -> typing.Mapping[builtins.str, builtins.str]: """Constants can also use camelCase. stability @@ -69937,7 +70194,7 @@ class Statics(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Statics"): """ return jsii.sget(cls, "zooBar") - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="instance") def instance(cls) -> "Statics": """Jsdocs for static getter. @@ -69949,11 +70206,11 @@ class Statics(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Statics"): """ return jsii.sget(cls, "instance") - @instance.setter + @instance.setter # type: ignore def instance(cls, value: "Statics") -> None: jsii.sset(cls, "instance", value) - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="nonConstStatic") def non_const_static(cls) -> jsii.Number: """ @@ -69962,13 +70219,13 @@ class Statics(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Statics"): """ return jsii.sget(cls, "nonConstStatic") - @non_const_static.setter + @non_const_static.setter # type: ignore def non_const_static(cls, value: jsii.Number) -> None: jsii.sset(cls, "nonConstStatic", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") - def value(self) -> str: + def value(self) -> builtins.str: """ stability :stability: experimental @@ -70013,17 +70270,17 @@ class StripInternal(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StripInternal" """ jsii.create(StripInternal, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="youSeeMe") - def you_see_me(self) -> str: + def you_see_me(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "youSeeMe") - @you_see_me.setter - def you_see_me(self, value: str) -> None: + @you_see_me.setter # type: ignore + def you_see_me(self, value: builtins.str) -> None: jsii.set(self, "youSeeMe", value) @@ -70040,9 +70297,9 @@ class StructA: def __init__( self, *, - required_string: str, + required_string: builtins.str, optional_number: typing.Optional[jsii.Number] = None, - optional_string: typing.Optional[str] = None, + optional_string: typing.Optional[builtins.str] = None, ) -> None: """We can serialize and deserialize structs without silently ignoring optional fields. @@ -70053,7 +70310,7 @@ class StructA: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "required_string": required_string, } if optional_number is not None: @@ -70062,12 +70319,14 @@ class StructA: self._values["optional_string"] = optional_string @builtins.property - def required_string(self) -> str: + def required_string(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("required_string") + result = self._values.get("required_string") + assert result is not None, "Required property 'required_string' is missing" + return result @builtins.property def optional_number(self) -> typing.Optional[jsii.Number]: @@ -70075,20 +70334,22 @@ class StructA: stability :stability: experimental """ - return self._values.get("optional_number") + result = self._values.get("optional_number") + return result @builtins.property - def optional_string(self) -> typing.Optional[str]: + def optional_string(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental """ - return self._values.get("optional_string") + result = self._values.get("optional_string") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -70110,8 +70371,8 @@ class StructB: def __init__( self, *, - required_string: str, - optional_boolean: typing.Optional[bool] = None, + required_string: builtins.str, + optional_boolean: typing.Optional[builtins.bool] = None, optional_struct_a: typing.Optional["StructA"] = None, ) -> None: """This intentionally overlaps with StructA (where only requiredString is provided) to test htat the kernel properly disambiguates those. @@ -70125,7 +70386,7 @@ class StructB: """ if isinstance(optional_struct_a, dict): optional_struct_a = StructA(**optional_struct_a) - self._values = { + self._values: typing.Dict[str, typing.Any] = { "required_string": required_string, } if optional_boolean is not None: @@ -70134,20 +70395,23 @@ class StructB: self._values["optional_struct_a"] = optional_struct_a @builtins.property - def required_string(self) -> str: + def required_string(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("required_string") + result = self._values.get("required_string") + assert result is not None, "Required property 'required_string' is missing" + return result @builtins.property - def optional_boolean(self) -> typing.Optional[bool]: + def optional_boolean(self) -> typing.Optional[builtins.bool]: """ stability :stability: experimental """ - return self._values.get("optional_boolean") + result = self._values.get("optional_boolean") + return result @builtins.property def optional_struct_a(self) -> typing.Optional["StructA"]: @@ -70155,12 +70419,13 @@ class StructB: stability :stability: experimental """ - return self._values.get("optional_struct_a") + result = self._values.get("optional_struct_a") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -70175,7 +70440,12 @@ class StructB: name_mapping={"scope": "scope", "props": "props"}, ) class StructParameterType: - def __init__(self, *, scope: str, props: typing.Optional[bool] = None) -> None: + def __init__( + self, + *, + scope: builtins.str, + props: typing.Optional[builtins.bool] = None, + ) -> None: """Verifies that, in languages that do keyword lifting (e.g: Python), having a struct member with the same name as a positional parameter results in the correct code being emitted. See: https://github.com/aws/aws-cdk/issues/4302 @@ -70186,32 +70456,35 @@ class StructParameterType: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "scope": scope, } if props is not None: self._values["props"] = props @builtins.property - def scope(self) -> str: + def scope(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("scope") + result = self._values.get("scope") + assert result is not None, "Required property 'scope' is missing" + return result @builtins.property - def props(self) -> typing.Optional[bool]: + def props(self) -> typing.Optional[builtins.bool]: """ stability :stability: experimental """ - return self._values.get("props") + result = self._values.get("props") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -70233,7 +70506,9 @@ class StructPassing(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StructPassing" @jsii.member(jsii_name="howManyVarArgsDidIPass") @builtins.classmethod def how_many_var_args_did_i_pass( - cls, _positional: jsii.Number, *inputs: "TopLevelStruct" + cls, + _positional: jsii.Number, + *inputs: "TopLevelStruct", ) -> jsii.Number: """ :param _positional: - @@ -70247,9 +70522,9 @@ class StructPassing(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StructPassing" cls, _positional: jsii.Number, *, - required: str, + required: builtins.str, second_level: typing.Union[jsii.Number, "SecondLevelStruct"], - optional: typing.Optional[str] = None, + optional: typing.Optional[builtins.str] = None, ) -> "TopLevelStruct": """ :param _positional: - @@ -70265,7 +70540,8 @@ class StructPassing(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StructPassing" class StructUnionConsumer( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.StructUnionConsumer" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.StructUnionConsumer", ): """ stability @@ -70274,7 +70550,7 @@ class StructUnionConsumer( @jsii.member(jsii_name="isStructA") @builtins.classmethod - def is_struct_a(cls, struct: typing.Union["StructA", "StructB"]) -> bool: + def is_struct_a(cls, struct: typing.Union["StructA", "StructB"]) -> builtins.bool: """ :param struct: - @@ -70285,7 +70561,7 @@ class StructUnionConsumer( @jsii.member(jsii_name="isStructB") @builtins.classmethod - def is_struct_b(cls, struct: typing.Union["StructA", "StructB"]) -> bool: + def is_struct_b(cls, struct: typing.Union["StructA", "StructB"]) -> builtins.bool: """ :param struct: - @@ -70309,10 +70585,10 @@ class StructWithJavaReservedWords: def __init__( self, *, - default: str, - assert_: typing.Optional[str] = None, - result: typing.Optional[str] = None, - that: typing.Optional[str] = None, + default: builtins.str, + assert_: typing.Optional[builtins.str] = None, + result: typing.Optional[builtins.str] = None, + that: typing.Optional[builtins.str] = None, ) -> None: """ :param default: @@ -70323,7 +70599,7 @@ class StructWithJavaReservedWords: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "default": default, } if assert_ is not None: @@ -70334,41 +70610,46 @@ class StructWithJavaReservedWords: self._values["that"] = that @builtins.property - def default(self) -> str: + def default(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("default") + result = self._values.get("default") + assert result is not None, "Required property 'default' is missing" + return result @builtins.property - def assert_(self) -> typing.Optional[str]: + def assert_(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental """ - return self._values.get("assert_") + result = self._values.get("assert_") + return result @builtins.property - def result(self) -> typing.Optional[str]: + def result(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental """ - return self._values.get("result") + result = self._values.get("result") + return result @builtins.property - def that(self) -> typing.Optional[str]: + def that(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental """ - return self._values.get("that") + result = self._values.get("that") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -70378,7 +70659,9 @@ class StructWithJavaReservedWords: class Sum( - _CompositeOperation_1c4d123b, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Sum" + _CompositeOperation_1c4d123b, + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.Sum", ): """An operation that sums multiple values. @@ -70393,7 +70676,7 @@ class Sum( """ jsii.create(Sum, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="expression") def expression(self) -> scope.jsii_calc_lib.Value: """The expression that this operation consists of. @@ -70405,7 +70688,7 @@ class Sum( """ return jsii.get(self, "expression") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="parts") def parts(self) -> typing.List[scope.jsii_calc_lib.Value]: """The parts to sum. @@ -70415,7 +70698,7 @@ class Sum( """ return jsii.get(self, "parts") - @parts.setter + @parts.setter # type: ignore def parts(self, value: typing.List[scope.jsii_calc_lib.Value]) -> None: jsii.set(self, "parts", value) @@ -70426,7 +70709,12 @@ class Sum( name_mapping={"bar": "bar", "id": "id"}, ) class SupportsNiceJavaBuilderProps: - def __init__(self, *, bar: jsii.Number, id: typing.Optional[str] = None) -> None: + def __init__( + self, + *, + bar: jsii.Number, + id: typing.Optional[builtins.str] = None, + ) -> None: """ :param bar: Some number, like 42. :param id: An \`\`id\`\` field here is terrible API design, because the constructor of \`\`SupportsNiceJavaBuilder\`\` already has a parameter named \`\`id\`\`. But here we are, doing it like we didn't care. @@ -70434,7 +70722,7 @@ class SupportsNiceJavaBuilderProps: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "bar": bar, } if id is not None: @@ -70447,10 +70735,12 @@ class SupportsNiceJavaBuilderProps: stability :stability: experimental """ - return self._values.get("bar") + result = self._values.get("bar") + assert result is not None, "Required property 'bar' is missing" + return result @builtins.property - def id(self) -> typing.Optional[str]: + def id(self) -> typing.Optional[builtins.str]: """An \`\`id\`\` field here is terrible API design, because the constructor of \`\`SupportsNiceJavaBuilder\`\` already has a parameter named \`\`id\`\`. But here we are, doing it like we didn't care. @@ -70458,12 +70748,13 @@ class SupportsNiceJavaBuilderProps: stability :stability: experimental """ - return self._values.get("id") + result = self._values.get("id") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -70483,7 +70774,11 @@ class SupportsNiceJavaBuilderWithRequiredProps( """ def __init__( - self, id_: jsii.Number, *, bar: jsii.Number, id: typing.Optional[str] = None + self, + id_: jsii.Number, + *, + bar: jsii.Number, + id: typing.Optional[builtins.str] = None, ) -> None: """ :param id_: some identifier of your choice. @@ -70497,7 +70792,7 @@ class SupportsNiceJavaBuilderWithRequiredProps( jsii.create(SupportsNiceJavaBuilderWithRequiredProps, self, [id_, props]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="bar") def bar(self) -> jsii.Number: """ @@ -70506,7 +70801,7 @@ class SupportsNiceJavaBuilderWithRequiredProps( """ return jsii.get(self, "bar") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="id") def id(self) -> jsii.Number: """some identifier of your choice. @@ -70516,9 +70811,9 @@ class SupportsNiceJavaBuilderWithRequiredProps( """ return jsii.get(self, "id") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="propId") - def prop_id(self) -> typing.Optional[str]: + def prop_id(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental @@ -70527,7 +70822,8 @@ class SupportsNiceJavaBuilderWithRequiredProps( class SyncVirtualMethods( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.SyncVirtualMethods" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.SyncVirtualMethods", ): """ stability @@ -70558,7 +70854,7 @@ class SyncVirtualMethods( return jsii.invoke(self, "callerIsMethod", []) @jsii.member(jsii_name="modifyOtherProperty") - def modify_other_property(self, value: str) -> None: + def modify_other_property(self, value: builtins.str) -> None: """ :param value: - @@ -70568,7 +70864,7 @@ class SyncVirtualMethods( return jsii.invoke(self, "modifyOtherProperty", [value]) @jsii.member(jsii_name="modifyValueOfTheProperty") - def modify_value_of_the_property(self, value: str) -> None: + def modify_value_of_the_property(self, value: builtins.str) -> None: """ :param value: - @@ -70586,7 +70882,7 @@ class SyncVirtualMethods( return jsii.invoke(self, "readA", []) @jsii.member(jsii_name="retrieveOtherProperty") - def retrieve_other_property(self) -> str: + def retrieve_other_property(self) -> builtins.str: """ stability :stability: experimental @@ -70594,7 +70890,7 @@ class SyncVirtualMethods( return jsii.invoke(self, "retrieveOtherProperty", []) @jsii.member(jsii_name="retrieveReadOnlyProperty") - def retrieve_read_only_property(self) -> str: + def retrieve_read_only_property(self) -> builtins.str: """ stability :stability: experimental @@ -70602,7 +70898,7 @@ class SyncVirtualMethods( return jsii.invoke(self, "retrieveReadOnlyProperty", []) @jsii.member(jsii_name="retrieveValueOfTheProperty") - def retrieve_value_of_the_property(self) -> str: + def retrieve_value_of_the_property(self) -> builtins.str: """ stability :stability: experimental @@ -70629,16 +70925,16 @@ class SyncVirtualMethods( """ return jsii.invoke(self, "writeA", [value]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="readonlyProperty") - def readonly_property(self) -> str: + def readonly_property(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "readonlyProperty") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="a") def a(self) -> jsii.Number: """ @@ -70647,11 +70943,11 @@ class SyncVirtualMethods( """ return jsii.get(self, "a") - @a.setter + @a.setter # type: ignore def a(self, value: jsii.Number) -> None: jsii.set(self, "a", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="callerIsProperty") def caller_is_property(self) -> jsii.Number: """ @@ -70660,47 +70956,47 @@ class SyncVirtualMethods( """ return jsii.get(self, "callerIsProperty") - @caller_is_property.setter + @caller_is_property.setter # type: ignore def caller_is_property(self, value: jsii.Number) -> None: jsii.set(self, "callerIsProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="otherProperty") - def other_property(self) -> str: + def other_property(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "otherProperty") - @other_property.setter - def other_property(self, value: str) -> None: + @other_property.setter # type: ignore + def other_property(self, value: builtins.str) -> None: jsii.set(self, "otherProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="theProperty") - def the_property(self) -> str: + def the_property(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "theProperty") - @the_property.setter - def the_property(self, value: str) -> None: + @the_property.setter # type: ignore + def the_property(self, value: builtins.str) -> None: jsii.set(self, "theProperty", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="valueOfOtherProperty") - def value_of_other_property(self) -> str: + def value_of_other_property(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "valueOfOtherProperty") - @value_of_other_property.setter - def value_of_other_property(self, value: str) -> None: + @value_of_other_property.setter # type: ignore + def value_of_other_property(self, value: builtins.str) -> None: jsii.set(self, "valueOfOtherProperty", value) @@ -70739,9 +71035,9 @@ class TopLevelStruct: def __init__( self, *, - required: str, + required: builtins.str, second_level: typing.Union[jsii.Number, "SecondLevelStruct"], - optional: typing.Optional[str] = None, + optional: typing.Optional[builtins.str] = None, ) -> None: """ :param required: This is a required field. @@ -70751,7 +71047,7 @@ class TopLevelStruct: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "required": required, "second_level": second_level, } @@ -70759,13 +71055,15 @@ class TopLevelStruct: self._values["optional"] = optional @builtins.property - def required(self) -> str: + def required(self) -> builtins.str: """This is a required field. stability :stability: experimental """ - return self._values.get("required") + result = self._values.get("required") + assert result is not None, "Required property 'required' is missing" + return result @builtins.property def second_level(self) -> typing.Union[jsii.Number, "SecondLevelStruct"]: @@ -70774,21 +71072,24 @@ class TopLevelStruct: stability :stability: experimental """ - return self._values.get("second_level") + result = self._values.get("second_level") + assert result is not None, "Required property 'second_level' is missing" + return result @builtins.property - def optional(self) -> typing.Optional[str]: + def optional(self) -> typing.Optional[builtins.str]: """You don't have to pass this. stability :stability: experimental """ - return self._values.get("optional") + result = self._values.get("optional") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -70841,7 +71142,7 @@ class UnaryOperation( """ jsii.create(UnaryOperation, self, [operand]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="operand") def operand(self) -> scope.jsii_calc_lib.Value: """ @@ -70852,7 +71153,7 @@ class UnaryOperation( class _UnaryOperationProxy( - UnaryOperation, jsii.proxy_for(scope.jsii_calc_lib.Operation) + UnaryOperation, jsii.proxy_for(scope.jsii_calc_lib.Operation) # type: ignore ): pass @@ -70866,8 +71167,8 @@ class UnionProperties: def __init__( self, *, - bar: typing.Union[str, jsii.Number, "AllTypes"], - foo: typing.Optional[typing.Union[str, jsii.Number]] = None, + bar: typing.Union[builtins.str, jsii.Number, "AllTypes"], + foo: typing.Optional[typing.Union[builtins.str, jsii.Number]] = None, ) -> None: """ :param bar: @@ -70876,32 +71177,35 @@ class UnionProperties: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "bar": bar, } if foo is not None: self._values["foo"] = foo @builtins.property - def bar(self) -> typing.Union[str, jsii.Number, "AllTypes"]: + def bar(self) -> typing.Union[builtins.str, jsii.Number, "AllTypes"]: """ stability :stability: experimental """ - return self._values.get("bar") + result = self._values.get("bar") + assert result is not None, "Required property 'bar' is missing" + return result @builtins.property - def foo(self) -> typing.Optional[typing.Union[str, jsii.Number]]: + def foo(self) -> typing.Optional[typing.Union[builtins.str, jsii.Number]]: """ stability :stability: experimental """ - return self._values.get("foo") + result = self._values.get("foo") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -70912,7 +71216,8 @@ class UnionProperties: @jsii.implements(scope.jsii_calc_lib.custom_submodule_name.IReflectable) class UpcasingReflectable( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.UpcasingReflectable" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.UpcasingReflectable", ): """Ensures submodule-imported types from dependencies can be used correctly. @@ -70920,7 +71225,7 @@ class UpcasingReflectable( :stability: experimental """ - def __init__(self, delegate: typing.Mapping[str, typing.Any]) -> None: + def __init__(self, delegate: typing.Mapping[builtins.str, typing.Any]) -> None: """ :param delegate: - @@ -70929,7 +71234,7 @@ class UpcasingReflectable( """ jsii.create(UpcasingReflectable, self, [delegate]) - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="reflector") def REFLECTOR(cls) -> scope.jsii_calc_lib.custom_submodule_name.Reflector: """ @@ -70938,7 +71243,7 @@ class UpcasingReflectable( """ return jsii.sget(cls, "reflector") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="entries") def entries( self, @@ -70951,7 +71256,8 @@ class UpcasingReflectable( class UseBundledDependency( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.UseBundledDependency" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.UseBundledDependency", ): """ stability @@ -70998,7 +71304,8 @@ class UseCalcBase(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.UseCalcBase"): class UsesInterfaceWithProperties( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.UsesInterfaceWithProperties" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.UsesInterfaceWithProperties", ): """ stability @@ -71015,7 +71322,7 @@ class UsesInterfaceWithProperties( jsii.create(UsesInterfaceWithProperties, self, [obj]) @jsii.member(jsii_name="justRead") - def just_read(self) -> str: + def just_read(self) -> builtins.str: """ stability :stability: experimental @@ -71023,7 +71330,10 @@ class UsesInterfaceWithProperties( return jsii.invoke(self, "justRead", []) @jsii.member(jsii_name="readStringAndNumber") - def read_string_and_number(self, ext: "IInterfaceWithPropertiesExtension") -> str: + def read_string_and_number( + self, + ext: "IInterfaceWithPropertiesExtension", + ) -> builtins.str: """ :param ext: - @@ -71033,7 +71343,7 @@ class UsesInterfaceWithProperties( return jsii.invoke(self, "readStringAndNumber", [ext]) @jsii.member(jsii_name="writeAndRead") - def write_and_read(self, value: str) -> str: + def write_and_read(self, value: builtins.str) -> builtins.str: """ :param value: - @@ -71042,7 +71352,7 @@ class UsesInterfaceWithProperties( """ return jsii.invoke(self, "writeAndRead", [value]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="obj") def obj(self) -> "IInterfaceWithProperties": """ @@ -71095,7 +71405,9 @@ class VariadicMethod(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.VariadicMetho @jsii.member(jsii_name="asArray") def as_array( - self, first: jsii.Number, *others: jsii.Number + self, + first: jsii.Number, + *others: jsii.Number, ) -> typing.List[jsii.Number]: """ :param first: the first element of the array to be returned (after the \`\`prefix\`\` provided at construction time). @@ -71108,7 +71420,8 @@ class VariadicMethod(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.VariadicMetho class VirtualMethodPlayground( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.VirtualMethodPlayground" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.VirtualMethodPlayground", ): """ stability @@ -71174,7 +71487,8 @@ class VirtualMethodPlayground( class VoidCallback( - metaclass=jsii.JSIIAbstractClass, jsii_type="jsii-calc.VoidCallback" + metaclass=jsii.JSIIAbstractClass, + jsii_type="jsii-calc.VoidCallback", ): """This test is used to validate the runtimes can return correctly from a void callback. @@ -71214,9 +71528,9 @@ class VoidCallback( """ ... - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="methodWasCalled") - def method_was_called(self) -> bool: + def method_was_called(self) -> builtins.bool: """ stability :stability: experimental @@ -71235,7 +71549,8 @@ class _VoidCallbackProxy(VoidCallback): class WithPrivatePropertyInConstructor( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.WithPrivatePropertyInConstructor" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.WithPrivatePropertyInConstructor", ): """Verifies that private property declarations in constructor arguments are hidden. @@ -71243,7 +71558,7 @@ class WithPrivatePropertyInConstructor( :stability: experimental """ - def __init__(self, private_field: typing.Optional[str] = None) -> None: + def __init__(self, private_field: typing.Optional[builtins.str] = None) -> None: """ :param private_field: - @@ -71252,9 +71567,9 @@ class WithPrivatePropertyInConstructor( """ jsii.create(WithPrivatePropertyInConstructor, self, [private_field]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="success") - def success(self) -> bool: + def success(self) -> builtins.bool: """ stability :stability: experimental @@ -71286,7 +71601,7 @@ class AbstractClass( @jsii.member(jsii_name="abstractMethod") @abc.abstractmethod - def abstract_method(self, name: str) -> str: + def abstract_method(self, name: builtins.str) -> builtins.str: """ :param name: - @@ -71303,9 +71618,9 @@ class AbstractClass( """ return jsii.invoke(self, "nonAbstractMethod", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="propFromInterface") - def prop_from_interface(self) -> str: + def prop_from_interface(self) -> builtins.str: """ stability :stability: experimental @@ -71313,9 +71628,11 @@ class AbstractClass( return jsii.get(self, "propFromInterface") -class _AbstractClassProxy(AbstractClass, jsii.proxy_for(AbstractClassBase)): +class _AbstractClassProxy( + AbstractClass, jsii.proxy_for(AbstractClassBase) # type: ignore +): @jsii.member(jsii_name="abstractMethod") - def abstract_method(self, name: str) -> str: + def abstract_method(self, name: builtins.str) -> builtins.str: """ :param name: - @@ -71333,7 +71650,9 @@ class Add(BinaryOperation, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Add"): """ def __init__( - self, lhs: scope.jsii_calc_lib.Value, rhs: scope.jsii_calc_lib.Value + self, + lhs: scope.jsii_calc_lib.Value, + rhs: scope.jsii_calc_lib.Value, ) -> None: """Creates a BinaryOperation. @@ -71346,7 +71665,7 @@ class Add(BinaryOperation, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Add"): jsii.create(Add, self, [lhs, rhs]) @jsii.member(jsii_name="toString") - def to_string(self) -> str: + def to_string(self) -> builtins.str: """String representation of the value. stability @@ -71354,7 +71673,7 @@ class Add(BinaryOperation, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Add"): """ return jsii.invoke(self, "toString", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") def value(self) -> jsii.Number: """The value. @@ -71367,7 +71686,8 @@ class Add(BinaryOperation, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Add"): @jsii.implements(IAnonymousImplementationProvider) class AnonymousImplementationProvider( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.AnonymousImplementationProvider" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.AnonymousImplementationProvider", ): """ stability @@ -71420,17 +71740,17 @@ class Bell(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Bell"): """ return jsii.invoke(self, "ring", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="rung") - def rung(self) -> bool: + def rung(self) -> builtins.bool: """ stability :stability: experimental """ return jsii.get(self, "rung") - @rung.setter - def rung(self, value: bool) -> None: + @rung.setter # type: ignore + def rung(self, value: builtins.bool) -> None: jsii.set(self, "rung", value) @@ -71440,7 +71760,7 @@ class Bell(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Bell"): name_mapping={"foo": "foo", "bar": "bar"}, ) class ChildStruct982(ParentStruct982): - def __init__(self, *, foo: str, bar: jsii.Number) -> None: + def __init__(self, *, foo: builtins.str, bar: jsii.Number) -> None: """ :param foo: :param bar: @@ -71448,18 +71768,20 @@ class ChildStruct982(ParentStruct982): stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "foo": foo, "bar": bar, } @builtins.property - def foo(self) -> str: + def foo(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("foo") + result = self._values.get("foo") + assert result is not None, "Required property 'foo' is missing" + return result @builtins.property def bar(self) -> jsii.Number: @@ -71467,12 +71789,14 @@ class ChildStruct982(ParentStruct982): stability :stability: experimental """ - return self._values.get("bar") + result = self._values.get("bar") + assert result is not None, "Required property 'bar' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -71498,56 +71822,56 @@ class ClassThatImplementsTheInternalInterface( """ jsii.create(ClassThatImplementsTheInternalInterface, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="a") - def a(self) -> str: + def a(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "a") - @a.setter - def a(self, value: str) -> None: + @a.setter # type: ignore + def a(self, value: builtins.str) -> None: jsii.set(self, "a", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="b") - def b(self) -> str: + def b(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "b") - @b.setter - def b(self, value: str) -> None: + @b.setter # type: ignore + def b(self, value: builtins.str) -> None: jsii.set(self, "b", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="c") - def c(self) -> str: + def c(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "c") - @c.setter - def c(self, value: str) -> None: + @c.setter # type: ignore + def c(self, value: builtins.str) -> None: jsii.set(self, "c", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="d") - def d(self) -> str: + def d(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "d") - @d.setter - def d(self, value: str) -> None: + @d.setter # type: ignore + def d(self, value: builtins.str) -> None: jsii.set(self, "d", value) @@ -71568,56 +71892,56 @@ class ClassThatImplementsThePrivateInterface( """ jsii.create(ClassThatImplementsThePrivateInterface, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="a") - def a(self) -> str: + def a(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "a") - @a.setter - def a(self, value: str) -> None: + @a.setter # type: ignore + def a(self, value: builtins.str) -> None: jsii.set(self, "a", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="b") - def b(self) -> str: + def b(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "b") - @b.setter - def b(self, value: str) -> None: + @b.setter # type: ignore + def b(self, value: builtins.str) -> None: jsii.set(self, "b", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="c") - def c(self) -> str: + def c(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "c") - @c.setter - def c(self, value: str) -> None: + @c.setter # type: ignore + def c(self, value: builtins.str) -> None: jsii.set(self, "c", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="e") - def e(self) -> str: + def e(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "e") - @e.setter - def e(self, value: str) -> None: + @e.setter # type: ignore + def e(self, value: builtins.str) -> None: jsii.set(self, "e", value) @@ -71635,7 +71959,9 @@ class ClassWithPrivateConstructorAndAutomaticProperties( @jsii.member(jsii_name="create") @builtins.classmethod def create( - cls, read_only_string: str, read_write_string: str + cls, + read_only_string: builtins.str, + read_write_string: builtins.str, ) -> "ClassWithPrivateConstructorAndAutomaticProperties": """ :param read_only_string: - @@ -71646,32 +71972,34 @@ class ClassWithPrivateConstructorAndAutomaticProperties( """ return jsii.sinvoke(cls, "create", [read_only_string, read_write_string]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="readOnlyString") - def read_only_string(self) -> str: + def read_only_string(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "readOnlyString") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="readWriteString") - def read_write_string(self) -> str: + def read_write_string(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "readWriteString") - @read_write_string.setter - def read_write_string(self, value: str) -> None: + @read_write_string.setter # type: ignore + def read_write_string(self, value: builtins.str) -> None: jsii.set(self, "readWriteString", value) @jsii.interface(jsii_type="jsii-calc.IFriendlyRandomGenerator") class IFriendlyRandomGenerator( - IRandomNumberGenerator, scope.jsii_calc_lib.IFriendly, jsii.compat.Protocol + IRandomNumberGenerator, + scope.jsii_calc_lib.IFriendly, + typing_extensions.Protocol, ): """ stability @@ -71684,20 +72012,23 @@ class IFriendlyRandomGenerator( class _IFriendlyRandomGeneratorProxy( - jsii.proxy_for(IRandomNumberGenerator), - jsii.proxy_for(scope.jsii_calc_lib.IFriendly), + jsii.proxy_for(IRandomNumberGenerator), # type: ignore + jsii.proxy_for(scope.jsii_calc_lib.IFriendly), # type: ignore ): """ stability :stability: experimental """ - __jsii_type__ = "jsii-calc.IFriendlyRandomGenerator" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IFriendlyRandomGenerator" pass @jsii.interface(jsii_type="jsii-calc.IInterfaceThatShouldNotBeADataType") -class IInterfaceThatShouldNotBeADataType(IInterfaceWithMethods, jsii.compat.Protocol): +class IInterfaceThatShouldNotBeADataType( + IInterfaceWithMethods, + typing_extensions.Protocol, +): """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. stability @@ -71708,9 +72039,9 @@ class IInterfaceThatShouldNotBeADataType(IInterfaceWithMethods, jsii.compat.Prot def __jsii_proxy_class__(): return _IInterfaceThatShouldNotBeADataTypeProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="otherValue") - def other_value(self) -> str: + def other_value(self) -> builtins.str: """ stability :stability: experimental @@ -71718,18 +72049,20 @@ class IInterfaceThatShouldNotBeADataType(IInterfaceWithMethods, jsii.compat.Prot ... -class _IInterfaceThatShouldNotBeADataTypeProxy(jsii.proxy_for(IInterfaceWithMethods)): +class _IInterfaceThatShouldNotBeADataTypeProxy( + jsii.proxy_for(IInterfaceWithMethods) # type: ignore +): """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. stability :stability: experimental """ - __jsii_type__ = "jsii-calc.IInterfaceThatShouldNotBeADataType" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IInterfaceThatShouldNotBeADataType" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="otherValue") - def other_value(self) -> str: + def other_value(self) -> builtins.str: """ stability :stability: experimental @@ -71738,7 +72071,7 @@ class _IInterfaceThatShouldNotBeADataTypeProxy(jsii.proxy_for(IInterfaceWithMeth @jsii.interface(jsii_type="jsii-calc.IJSII417Derived") -class IJSII417Derived(IJSII417PublicBaseOfBase, jsii.compat.Protocol): +class IJSII417Derived(IJSII417PublicBaseOfBase, typing_extensions.Protocol): """ stability :stability: experimental @@ -71748,9 +72081,9 @@ class IJSII417Derived(IJSII417PublicBaseOfBase, jsii.compat.Protocol): def __jsii_proxy_class__(): return _IJSII417DerivedProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="property") - def property(self) -> str: + def property(self) -> builtins.str: """ stability :stability: experimental @@ -71774,17 +72107,19 @@ class IJSII417Derived(IJSII417PublicBaseOfBase, jsii.compat.Protocol): ... -class _IJSII417DerivedProxy(jsii.proxy_for(IJSII417PublicBaseOfBase)): +class _IJSII417DerivedProxy( + jsii.proxy_for(IJSII417PublicBaseOfBase) # type: ignore +): """ stability :stability: experimental """ - __jsii_type__ = "jsii-calc.IJSII417Derived" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.IJSII417Derived" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="property") - def property(self) -> str: + def property(self) -> builtins.str: """ stability :stability: experimental @@ -71810,7 +72145,9 @@ class _IJSII417DerivedProxy(jsii.proxy_for(IJSII417PublicBaseOfBase)): @jsii.implements(IPublicInterface2) class InbetweenClass( - PublicClass, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.InbetweenClass" + PublicClass, + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.InbetweenClass", ): """ stability @@ -71825,7 +72162,7 @@ class InbetweenClass( jsii.create(InbetweenClass, self, []) @jsii.member(jsii_name="ciao") - def ciao(self) -> str: + def ciao(self) -> builtins.str: """ stability :stability: experimental @@ -71843,7 +72180,7 @@ class JSII417Derived( :stability: experimental """ - def __init__(self, property: str) -> None: + def __init__(self, property: builtins.str) -> None: """ :param property: - @@ -71868,9 +72205,9 @@ class JSII417Derived( """ return jsii.invoke(self, "baz", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="property") - def _property(self) -> str: + def _property(self) -> builtins.str: """ stability :stability: experimental @@ -71896,7 +72233,7 @@ class Negate(UnaryOperation, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Negat jsii.create(Negate, self, [operand]) @jsii.member(jsii_name="farewell") - def farewell(self) -> str: + def farewell(self) -> builtins.str: """Say farewell. stability @@ -71905,7 +72242,7 @@ class Negate(UnaryOperation, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Negat return jsii.invoke(self, "farewell", []) @jsii.member(jsii_name="goodbye") - def goodbye(self) -> str: + def goodbye(self) -> builtins.str: """Say goodbye. stability @@ -71914,7 +72251,7 @@ class Negate(UnaryOperation, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Negat return jsii.invoke(self, "goodbye", []) @jsii.member(jsii_name="hello") - def hello(self) -> str: + def hello(self) -> builtins.str: """Say hello! stability @@ -71923,7 +72260,7 @@ class Negate(UnaryOperation, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Negat return jsii.invoke(self, "hello", []) @jsii.member(jsii_name="toString") - def to_string(self) -> str: + def to_string(self) -> builtins.str: """String representation of the value. stability @@ -71931,7 +72268,7 @@ class Negate(UnaryOperation, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Negat """ return jsii.invoke(self, "toString", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") def value(self) -> jsii.Number: """The value. @@ -71957,7 +72294,7 @@ class SupportsNiceJavaBuilder( id: jsii.Number, default_bar: typing.Optional[jsii.Number] = None, props: typing.Optional["SupportsNiceJavaBuilderProps"] = None, - *rest: str, + *rest: builtins.str, ) -> None: """ :param id: some identifier. @@ -71970,7 +72307,7 @@ class SupportsNiceJavaBuilder( """ jsii.create(SupportsNiceJavaBuilder, self, [id, default_bar, props, *rest]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="id") def id(self) -> jsii.Number: """some identifier. @@ -71980,9 +72317,9 @@ class SupportsNiceJavaBuilder( """ return jsii.get(self, "id") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="rest") - def rest(self) -> typing.List[str]: + def rest(self) -> typing.List[builtins.str]: """ stability :stability: experimental @@ -72005,7 +72342,7 @@ class DoubleTrouble(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DoubleTrouble" jsii.create(DoubleTrouble, self, []) @jsii.member(jsii_name="hello") - def hello(self) -> str: + def hello(self) -> builtins.str: """Say hello! stability @@ -72229,8 +72566,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions import scope.jsii_calc_base._jsii import scope.jsii_calc_base_of_base._jsii @@ -72258,8 +72595,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from .._jsii import * @@ -72285,7 +72622,7 @@ class CompositeOperation( jsii.create(CompositeOperation, self, []) @jsii.member(jsii_name="toString") - def to_string(self) -> str: + def to_string(self) -> builtins.str: """String representation of the value. stability @@ -72293,7 +72630,7 @@ class CompositeOperation( """ return jsii.invoke(self, "toString", []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="expression") @abc.abstractmethod def expression(self) -> scope.jsii_calc_lib.Value: @@ -72306,7 +72643,7 @@ class CompositeOperation( """ ... - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="value") def value(self) -> jsii.Number: """The value. @@ -72316,9 +72653,9 @@ class CompositeOperation( """ return jsii.get(self, "value") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="decorationPostfixes") - def decoration_postfixes(self) -> typing.List[str]: + def decoration_postfixes(self) -> typing.List[builtins.str]: """A set of postfixes to include in a decorated .toString(). stability @@ -72326,13 +72663,13 @@ class CompositeOperation( """ return jsii.get(self, "decorationPostfixes") - @decoration_postfixes.setter - def decoration_postfixes(self, value: typing.List[str]) -> None: + @decoration_postfixes.setter # type: ignore + def decoration_postfixes(self, value: typing.List[builtins.str]) -> None: jsii.set(self, "decorationPostfixes", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="decorationPrefixes") - def decoration_prefixes(self) -> typing.List[str]: + def decoration_prefixes(self) -> typing.List[builtins.str]: """A set of prefixes to include in a decorated .toString(). stability @@ -72340,11 +72677,11 @@ class CompositeOperation( """ return jsii.get(self, "decorationPrefixes") - @decoration_prefixes.setter - def decoration_prefixes(self, value: typing.List[str]) -> None: + @decoration_prefixes.setter # type: ignore + def decoration_prefixes(self, value: typing.List[builtins.str]) -> None: jsii.set(self, "decorationPrefixes", value) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="stringStyle") def string_style(self) -> "CompositionStringStyle": """The .toString() style. @@ -72354,7 +72691,7 @@ class CompositeOperation( """ return jsii.get(self, "stringStyle") - @string_style.setter + @string_style.setter # type: ignore def string_style(self, value: "CompositionStringStyle") -> None: jsii.set(self, "stringStyle", value) @@ -72383,9 +72720,9 @@ class CompositeOperation( class _CompositeOperationProxy( - CompositeOperation, jsii.proxy_for(scope.jsii_calc_lib.Operation) + CompositeOperation, jsii.proxy_for(scope.jsii_calc_lib.Operation) # type: ignore ): - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="expression") def expression(self) -> scope.jsii_calc_lib.Value: """The expression that this operation consists of. @@ -72414,14 +72751,15 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from .._jsii import * class Base( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DerivedClassHasNoProperties.Base" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.DerivedClassHasNoProperties.Base", ): """ stability @@ -72435,17 +72773,17 @@ class Base( """ jsii.create(Base, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="prop") - def prop(self) -> str: + def prop(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "prop") - @prop.setter - def prop(self, value: str) -> None: + @prop.setter # type: ignore + def prop(self, value: builtins.str) -> None: jsii.set(self, "prop", value) @@ -72484,8 +72822,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from .._jsii import * @@ -72506,17 +72844,17 @@ class Foo( """ jsii.create(Foo, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="bar") - def bar(self) -> typing.Optional[str]: + def bar(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental """ return jsii.get(self, "bar") - @bar.setter - def bar(self, value: typing.Optional[str]) -> None: + @bar.setter # type: ignore + def bar(self, value: typing.Optional[builtins.str]) -> None: jsii.set(self, "bar", value) @@ -72533,7 +72871,7 @@ class Hello: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "foo": foo, } @@ -72543,12 +72881,14 @@ class Hello: stability :stability: experimental """ - return self._values.get("foo") + result = self._values.get("foo") + assert result is not None, "Required property 'foo' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -72574,8 +72914,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from .._jsii import * @@ -72593,7 +72933,7 @@ class Hello: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "foo": foo, } @@ -72603,12 +72943,14 @@ class Hello: stability :stability: experimental """ - return self._values.get("foo") + result = self._values.get("foo") + assert result is not None, "Required property 'foo' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -72638,21 +72980,22 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from .._jsii import * class ClassWithSelf( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.PythonSelf.ClassWithSelf" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.PythonSelf.ClassWithSelf", ): """ stability :stability: experimental """ - def __init__(self_, self: str) -> None: + def __init__(self_, self: builtins.str) -> None: """ :param self: - @@ -72662,7 +73005,7 @@ class ClassWithSelf( jsii.create(ClassWithSelf, self_, [self]) @jsii.member(jsii_name="method") - def method(self_, self: jsii.Number) -> str: + def method(self_, self: jsii.Number) -> builtins.str: """ :param self: - @@ -72671,9 +73014,9 @@ class ClassWithSelf( """ return jsii.invoke(self_, "method", [self]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="self") - def self(self) -> str: + def self(self) -> builtins.str: """ stability :stability: experimental @@ -72682,14 +73025,15 @@ class ClassWithSelf( class ClassWithSelfKwarg( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.PythonSelf.ClassWithSelfKwarg" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.PythonSelf.ClassWithSelfKwarg", ): """ stability :stability: experimental """ - def __init__(self_, *, self: str) -> None: + def __init__(self_, *, self: builtins.str) -> None: """ :param self: @@ -72700,7 +73044,7 @@ class ClassWithSelfKwarg( jsii.create(ClassWithSelfKwarg, self_, [props]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="props") def props(self) -> "StructWithSelf": """ @@ -72711,7 +73055,7 @@ class ClassWithSelfKwarg( @jsii.interface(jsii_type="jsii-calc.PythonSelf.IInterfaceWithSelf") -class IInterfaceWithSelf(jsii.compat.Protocol): +class IInterfaceWithSelf(typing_extensions.Protocol): """ stability :stability: experimental @@ -72722,7 +73066,7 @@ class IInterfaceWithSelf(jsii.compat.Protocol): return _IInterfaceWithSelfProxy @jsii.member(jsii_name="method") - def method(self_, self: jsii.Number) -> str: + def method(self_, self: jsii.Number) -> builtins.str: """ :param self: - @@ -72738,10 +73082,10 @@ class _IInterfaceWithSelfProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.PythonSelf.IInterfaceWithSelf" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.PythonSelf.IInterfaceWithSelf" @jsii.member(jsii_name="method") - def method(self_, self: jsii.Number) -> str: + def method(self_, self: jsii.Number) -> builtins.str: """ :param self: - @@ -72757,29 +73101,31 @@ class _IInterfaceWithSelfProxy: name_mapping={"self": "self"}, ) class StructWithSelf: - def __init__(self_, *, self: str) -> None: + def __init__(self_, *, self: builtins.str) -> None: """ :param self: stability :stability: experimental """ - self_._values = { + self_._values: typing.Dict[str, typing.Any] = { "self": self, } @builtins.property - def self(self) -> str: + def self(self) -> builtins.str: """ stability :stability: experimental """ - return self._values.get("self") + result = self._values.get("self") + assert result is not None, "Required property 'self' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -72807,8 +73153,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from .._jsii import * @@ -72840,7 +73186,7 @@ class MyClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.submodule.MyClass"): jsii.create(MyClass, self, [props]) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="awesomeness") def awesomeness(self) -> _Awesomeness_d37a24df: """ @@ -72849,16 +73195,16 @@ class MyClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.submodule.MyClass"): """ return jsii.get(self, "awesomeness") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="definedAt") - def defined_at(self) -> str: + def defined_at(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "definedAt") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="goodness") def goodness(self) -> _Goodness_2df26737: """ @@ -72867,7 +73213,7 @@ class MyClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.submodule.MyClass"): """ return jsii.get(self, "goodness") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="props") def props(self) -> _SomeStruct_91627123: """ @@ -72876,7 +73222,7 @@ class MyClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.submodule.MyClass"): """ return jsii.get(self, "props") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="allTypes") def all_types(self) -> typing.Optional[_AllTypes_b08307c5]: """ @@ -72885,7 +73231,7 @@ class MyClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.submodule.MyClass"): """ return jsii.get(self, "allTypes") - @all_types.setter + @all_types.setter # type: ignore def all_types(self, value: typing.Optional[_AllTypes_b08307c5]) -> None: jsii.set(self, "allTypes", value) @@ -72906,8 +73252,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from ..._jsii import * @@ -72927,7 +73273,7 @@ class MyClassReference: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "reference": reference, } @@ -72937,12 +73283,14 @@ class MyClassReference: stability :stability: experimental """ - return self._values.get("reference") + result = self._values.get("reference") + assert result is not None, "Required property 'reference' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -72967,8 +73315,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from ..._jsii import * @@ -73016,7 +73364,8 @@ class Goodness(enum.Enum): class InnerClass( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.submodule.child.InnerClass" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.submodule.child.InnerClass", ): """ stability @@ -73030,7 +73379,7 @@ class InnerClass( """ jsii.create(InnerClass, self, []) - @jsii.python.classproperty + @jsii.python.classproperty # type: ignore @jsii.member(jsii_name="staticProp") def STATIC_PROP(cls) -> "SomeStruct": """ @@ -73041,7 +73390,8 @@ class InnerClass( class OuterClass( - metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.submodule.child.OuterClass" + metaclass=jsii.JSIIMeta, + jsii_type="jsii-calc.submodule.child.OuterClass", ): """Checks that classes can self-reference during initialization. @@ -73058,7 +73408,7 @@ class OuterClass( """ jsii.create(OuterClass, self, []) - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="innerClass") def inner_class(self) -> "InnerClass": """ @@ -73095,7 +73445,7 @@ class SomeStruct: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "prop": prop, } @@ -73105,12 +73455,14 @@ class SomeStruct: stability :stability: experimental """ - return self._values.get("prop") + result = self._values.get("prop") + assert result is not None, "Required property 'prop' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -73125,29 +73477,31 @@ class SomeStruct: name_mapping={"bool": "bool"}, ) class Structure: - def __init__(self, *, bool: bool) -> None: + def __init__(self, *, bool: builtins.bool) -> None: """ :param bool: stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "bool": bool, } @builtins.property - def bool(self) -> bool: + def bool(self) -> builtins.bool: """ stability :stability: experimental """ - return self._values.get("bool") + result = self._values.get("bool") + assert result is not None, "Required property 'bool' is missing" + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -73162,7 +73516,12 @@ class Structure: name_mapping={"prop": "prop", "extra": "extra"}, ) class KwargsProps(SomeStruct): - def __init__(self, *, prop: "SomeEnum", extra: typing.Optional[str] = None) -> None: + def __init__( + self, + *, + prop: "SomeEnum", + extra: typing.Optional[builtins.str] = None, + ) -> None: """ :param prop: :param extra: @@ -73170,7 +73529,7 @@ class KwargsProps(SomeStruct): stability :stability: experimental """ - self._values = { + self._values: typing.Dict[str, typing.Any] = { "prop": prop, } if extra is not None: @@ -73182,20 +73541,23 @@ class KwargsProps(SomeStruct): stability :stability: experimental """ - return self._values.get("prop") + result = self._values.get("prop") + assert result is not None, "Required property 'prop' is missing" + return result @builtins.property - def extra(self) -> typing.Optional[str]: + def extra(self) -> typing.Optional[builtins.str]: """ stability :stability: experimental """ - return self._values.get("extra") + result = self._values.get("extra") + return result - def __eq__(self, rhs) -> bool: + def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values - def __ne__(self, rhs) -> bool: + def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: @@ -73227,8 +73589,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from ..._jsii import * @@ -73247,8 +73609,11 @@ class Kwargs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.submodule.isolated.Kw @jsii.member(jsii_name="method") @builtins.classmethod def method( - cls, *, extra: typing.Optional[str] = None, prop: _SomeEnum_b2e41d92 - ) -> bool: + cls, + *, + extra: typing.Optional[builtins.str] = None, + prop: _SomeEnum_b2e41d92, + ) -> builtins.bool: """ :param extra: :param prop: @@ -73277,8 +73642,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from ..._jsii import * @@ -73300,16 +73665,16 @@ class Namespaced( def __jsii_proxy_class__(): return _NamespacedProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="definedAt") - def defined_at(self) -> str: + def defined_at(self) -> builtins.str: """ stability :stability: experimental """ return jsii.get(self, "definedAt") - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="goodness") @abc.abstractmethod def goodness(self) -> _Goodness_2df26737: @@ -73321,7 +73686,7 @@ class Namespaced( class _NamespacedProxy(Namespaced): - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="goodness") def goodness(self) -> _Goodness_2df26737: """ @@ -73347,8 +73712,8 @@ import enum import typing import jsii -import jsii.compat import publication +import typing_extensions from ...._jsii import * @@ -73356,7 +73721,7 @@ from ...._jsii import * @jsii.interface( jsii_type="jsii-calc.submodule.nested_submodule.deeplyNested.INamespaced" ) -class INamespaced(jsii.compat.Protocol): +class INamespaced(typing_extensions.Protocol): """ stability :stability: experimental @@ -73366,9 +73731,9 @@ class INamespaced(jsii.compat.Protocol): def __jsii_proxy_class__(): return _INamespacedProxy - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="definedAt") - def defined_at(self) -> str: + def defined_at(self) -> builtins.str: """ stability :stability: experimental @@ -73382,11 +73747,11 @@ class _INamespacedProxy: :stability: experimental """ - __jsii_type__ = "jsii-calc.submodule.nested_submodule.deeplyNested.INamespaced" + __jsii_type__: typing.ClassVar[str] = "jsii-calc.submodule.nested_submodule.deeplyNested.INamespaced" - @builtins.property + @builtins.property # type: ignore @jsii.member(jsii_name="definedAt") - def defined_at(self) -> str: + def defined_at(self) -> builtins.str: """ stability :stability: experimental diff --git a/packages/jsii-pacmak/test/build-test.sh b/packages/jsii-pacmak/test/build-test.sh index 64e73def06..1dcf8e3b34 100755 --- a/packages/jsii-pacmak/test/build-test.sh +++ b/packages/jsii-pacmak/test/build-test.sh @@ -32,7 +32,7 @@ else # Hello Windows! . ${venv}/Scripts/activate fi -python3 -m pip install --upgrade pip~=20.2.2 twine~=3.2.0 pipx~=0.15.4.0 +python3 -m pip install --upgrade pip~=20.2 twine~=3.2 # Single target, recursive build to a certain location clean_dists diff --git a/packages/jsii-pacmak/test/jsii-pacmak.test.ts b/packages/jsii-pacmak/test/jsii-pacmak.test.ts index feb6cded45..eec30e1ab8 100644 --- a/packages/jsii-pacmak/test/jsii-pacmak.test.ts +++ b/packages/jsii-pacmak/test/jsii-pacmak.test.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node -import { spawnSync } from 'child_process'; +import { spawnSync, SpawnSyncOptions } from 'child_process'; import * as fs from 'fs-extra'; import * as os from 'os'; import * as path from 'path'; @@ -61,6 +61,8 @@ for (const pkg of [ runPacmak(pkgRoot, outDir); expect({ [TREE]: checkTree(outDir) }).toMatchSnapshot('/'); + + runMypy(path.join(outDir, 'python')); }); } @@ -115,7 +117,7 @@ function checkTree( } function runPacmak(root: string, outdir: string): void { - const result = spawnSync( + return runCommand( process.execPath, [ ...process.execArgv, @@ -130,16 +132,108 @@ function runPacmak(root: string, outdir: string): void { stdio: ['inherit', 'pipe', 'pipe'], }, ); +} - expect(result.error).toBeUndefined(); +function runMypy(pythonRoot: string): void { + const venvRoot = path.join(__dirname, '.venv'); + const venvBin = path.join( + venvRoot, + process.platform === 'win32' ? 'Scripts' : 'bin', + ); + const venvPython = path.join(venvBin, 'python'); - if (result.status !== 0) { - console.error(`#### PACMAK STDOUT:\n${result.stdout.toString('utf-8')}`); - console.error(`#### PACMAK STDERR:\n${result.stderr.toString('utf-8')}`); + const env = { + ...process.env, + PATH: `${venvBin}:${process.env.PATH}`, + VIRTUAL_ENV: venvRoot, + }; + + // Create a Python virtual environment + runCommand('python3', [ + '-m', + 'venv', + '--system-site-packages', // Allow using globally installed packages (saves time & disk space) + venvRoot, + ]); + // Install mypy and the jsii runtime in there as needed + runCommand( + venvPython, + [ + '-m', + 'pip', + 'install', + '--no-input', + 'mypy>=0.782', + // Note: this resolution is a little ugly, but it's there to avoid creating a dependency cycle + path.resolve(require.resolve('@jsii/python-runtime/package.json'), '..'), + ], + { + env, + }, + ); + // Now run mypy on the Python code + runCommand( + venvPython, + [ + '-m', + 'mypy', + '--ignore-missing-imports', // We may not have the package's dependencies in scope. Let's just ignore that for now. + '--pretty', // Output in readable form, with source excerpts and problem markers + '--show-error-codes', // Show the "standard" error codes to make it easier to google around + '--strict', // Enable all optional checks -- let's be pedantic about everything! + pythonRoot, + ], + { env }, + ); +} + +/** + * Runs a command and asserts that it was successful. If the command failed, + * it's standard out and error from the child process will be made visible + * through `console.error`, unless the `stdio` option for `stdout` and/or + * `stderr` is overridden from `inherit`. + * + * By default, `spawnSync` is invoked with `shell: true` if the current platform + * is `win32`. This can be overridden through `options`. + * + * @param argv0 the entry point for the command to be run. + * @param argv the arguments to pass to argv0. + * @param options options to be provided to `spawnSync`. + */ +function runCommand( + argv0: string, + argv: readonly string[], + options?: SpawnSyncOptions, +) { + const { error, signal, status, stderr, stdout } = spawnSync(argv0, argv, { + shell: process.platform === 'win32', + stdio: ['inherit', 'pipe', 'pipe'], + ...options, + }); + + expect(error).toBeUndefined(); + + if (status !== 0) { + const reason = signal ? `signal ${signal}` : `status ${status}`; + console.error( + [ + `Command failed with ${reason}: ${argv0} ${argv.join(' ')}`, + prefix(stdout, '#STDOUT> '), + prefix(stderr, '#STDERR> '), + ].join('\n'), + ); } - expect(result.signal).toBeNull(); - expect(result.status).toBe(0); + expect(signal).toBeNull(); + expect(status).toBe(0); + + function prefix(buffer: Buffer, prefix: string): string { + return buffer + .toString('utf-8') + .split('\n') + .map((line) => prefix + line) + .join('\n'); + } } type TreeStructure = string | { [name: string]: TreeStructure }; diff --git a/packages/jsii-pacmak/test/targets/python/type-name.test.ts b/packages/jsii-pacmak/test/targets/python/type-name.test.ts index 87bc93b8ce..b52157abff 100644 --- a/packages/jsii-pacmak/test/targets/python/type-name.test.ts +++ b/packages/jsii-pacmak/test/targets/python/type-name.test.ts @@ -87,7 +87,7 @@ describe(toTypeName, () => { { name: 'Primitive: Boolean', input: { primitive: PrimitiveType.Boolean }, - pythonType: 'bool', + pythonType: 'builtins.bool', }, { name: 'Primitive: Date', @@ -102,7 +102,7 @@ describe(toTypeName, () => { { name: 'Primitive: String', input: { primitive: PrimitiveType.String }, - pythonType: 'str', + pythonType: 'builtins.str', }, { name: 'Primitive: JSON', @@ -124,7 +124,7 @@ describe(toTypeName, () => { elementtype: { primitive: PrimitiveType.String }, }, }, - pythonType: 'typing.List[str]', + pythonType: 'typing.List[builtins.str]', }, { name: 'Map', @@ -134,7 +134,7 @@ describe(toTypeName, () => { elementtype: { primitive: PrimitiveType.String }, }, }, - pythonType: 'typing.Mapping[str, str]', + pythonType: 'typing.Mapping[builtins.str, builtins.str]', }, // ############################## TYPE UNIONS ############################## { @@ -147,7 +147,7 @@ describe(toTypeName, () => { ], }, }, - pythonType: 'typing.Union[str, jsii.Number]', + pythonType: 'typing.Union[builtins.str, jsii.Number]', }, // ############################### USER TYPES ############################## {