Skip to content

Commit f618638

Browse files
authored
chore: fix Python TypeError: Cannot create a consistent method resolution order (MRO) (#35932)
### Issue # (if applicable) Build on main failing with ``` E TypeError: Cannot create a consistent method resolution E order (MRO) for bases IResource, IResourceWithPolicy, Protocol ``` ### Reason for this change There's a bug in jsii-pakmak. We can avoid the bug my not including the interface twice. ### Description of changes `iam.IResourceWithPolicy` already extends `IResource`, so we can remove it from the two places that extended both ### Describe any new or updated permissions being added n/a ### Description of how you validated changes Build, packaged and executed the python lib. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 2cdfc8a commit f618638

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

packages/aws-cdk-lib/aws-ecs/lib/deployment-lifecycle-hook-target.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ export interface IDeploymentLifecycleHookTarget {
6565
* Bind this target to a deployment lifecycle hook
6666
*
6767
* @param scope The construct scope
68-
* @param id A unique identifier for this binding
6968
*/
7069
bind(scope: IConstruct): DeploymentLifecycleHookTargetConfig;
7170
}

packages/aws-cdk-lib/aws-efs/lib/efs-file-system.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { CfnFileSystem, CfnMountTarget } from './efs.generated';
44
import * as ec2 from '../../aws-ec2';
55
import * as iam from '../../aws-iam';
66
import * as kms from '../../aws-kms';
7-
import { ArnFormat, FeatureFlags, IResource, Lazy, Names, RemovalPolicy, Resource, Size, Stack, Tags, Token, ValidationError } from '../../core';
7+
import { ArnFormat, FeatureFlags, Lazy, Names, RemovalPolicy, Resource, Size, Stack, Tags, Token, ValidationError } from '../../core';
88
import { addConstructMetadata, MethodMetadata } from '../../core/lib/metadata-resource';
99
import { propertyInjectable } from '../../core/lib/prop-injectable';
1010
import * as cxapi from '../../cx-api';
@@ -141,7 +141,7 @@ export enum ReplicationOverwriteProtection {
141141
/**
142142
* Represents an Amazon EFS file system
143143
*/
144-
export interface IFileSystem extends ec2.IConnectable, IResource, iam.IResourceWithPolicy {
144+
export interface IFileSystem extends ec2.IConnectable, iam.IResourceWithPolicy {
145145
/**
146146
* The ID of the file system, assigned by Amazon EFS.
147147
*

packages/aws-cdk-lib/aws-logs/lib/log-group.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import { IProcessor, Transformer } from './transformer';
1111
import * as cloudwatch from '../../aws-cloudwatch';
1212
import * as iam from '../../aws-iam';
1313
import * as kms from '../../aws-kms';
14-
import { Arn, ArnFormat, IResource, RemovalPolicy, Resource, Stack, Token, ValidationError } from '../../core';
14+
import { Arn, ArnFormat, RemovalPolicy, Resource, Stack, Token, ValidationError } from '../../core';
1515
import { addConstructMetadata } from '../../core/lib/metadata-resource';
1616
import { propertyInjectable } from '../../core/lib/prop-injectable';
1717

18-
export interface ILogGroup extends IResource, iam.IResourceWithPolicy {
18+
export interface ILogGroup extends iam.IResourceWithPolicy {
1919
/**
2020
* The ARN of this log group, with ':*' appended
2121
*

0 commit comments

Comments
 (0)