Python Type Annotation Not Working In Pylance When Code Is Refactored Stack Overflow

Python Type Annotation Not Working In Pylance When Code Is Refactored Stack Overflow