Skip to content

Commit 0bc2b11

Browse files
committed
fix: add note about incorrect type hint for Movie in SlideBuilder
1 parent ca4c22f commit 0bc2b11

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/tppt/pptx/slide.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,8 @@ def _register(slide: Slide) -> Movie:
236236
data = MovieData(type="movie", movie_file=movie_file, **kwargs)
237237
movie_obj = Movie(
238238
cast(
239+
# NOTE: Type hint of python-pptx is incorrect. Expected Movie, but GraphicFrame is returned.
240+
# Ref: https://github.com/scanny/python-pptx/pull/1057/commits/56338fa314d2c5bceb8b1756a50ed64ea8984abe
239241
PptxMovie,
240242
slide.to_pptx().shapes.add_movie(
241243
movie_file,

0 commit comments

Comments
 (0)