Skip to content

Commit e3b0494

Browse files
committed
chore: small typing change to factories
1 parent d15861c commit e3b0494

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/disnake_compass/impl/factory.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class ComponentFactory(
4141
@classmethod
4242
def from_component( # noqa: D102
4343
cls,
44-
component: type[component_api.RichComponent],
44+
component: type[component_api.ComponentT],
4545
) -> typing_extensions.Self:
4646
# <<docstring inherited from api.components.ComponentFactory>>
4747
parser: parser_api.Parser[typing.Any] | None
@@ -56,10 +56,7 @@ def from_component( # noqa: D102
5656

5757
parsers[field.name] = parser
5858

59-
return cls(
60-
parsers,
61-
typing.cast(type[component_api.ComponentT], component),
62-
)
59+
return cls(parsers, component)
6360

6461
async def load_params( # noqa: D102
6562
self,

0 commit comments

Comments
 (0)