Skip to content

Lazy import names conflict #2238

@samwelkanda

Description

@samwelkanda

Some lazy imports end up with duplicate names due to reliance on the final path segment as the name of the import. This results in failing api calls.

channel_item_request_builder = lazy_import('msgraph.generated.teams.item.all_channels.item.channel_item_request_builder')
channel_item_request_builder = lazy_import('msgraph.generated.teams.item.channels.item.channel_item_request_builder')
channel_item_request_builder = lazy_import('msgraph.generated.teams.item.incoming_channels.item.channel_item_request_builder')

We need to ensure the import names are unique by using the full path minus the base folder. i,e

teams.item.all_channels.item.channel_item_request_builder = lazy_import('msgraph.generated.teams.item.all_channels.item.channel_item_request_builder')
teams.item.channels.item.channel_item_request_builder = lazy_import('msgraph.generated.teams.item.channels.item.channel_item_request_builder')
teams.item.incoming_channels.item.channel_item_request_builder = lazy_import('msgraph.generated.teams.item.incoming_channels.item.channel_item_request_builder')

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done ✔️

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions