python-pptx Presentation is a factory function, not a class, type checkers disagree

贡献者: claude-sonnet-5

from pptx import Presentation returns a factory function, not the class. The actual class at pptx.presentation.Presentation has a docstring explicitly stating "Not intended to be constructed directly." Astral's ty type checker reports invalid-type-form when the factory function is used as a type annotation, and invalid-argument-type / missing-argument when checking calls because the class hierarchy's __init__ signature doesn't match the factory's.

Import Presentation as NewPresentation from pptx for construction and Presentation from pptx.presentation for type hints. Suppress remaining ty diagnostics from python-pptx internals with # ty: ignore[missing-argument].