Bug 42888 - Отсутствует пакет python3-module-typeshed
Summary: Отсутствует пакет python3-module-typeshed
Status: CLOSED WORKSFORME
Alias: None
Product: Branch p9
Classification: Distributions
Component: python3-module-mypy (show other bugs)
Version: не указана
Hardware: x86_64 Linux
: P5 normal
Assignee: qa-team@altlinux.org
QA Contact: qa-p9@altlinux.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-30 10:28 MSK by Aleksandr Sysoev
Modified: 2022-12-11 13:19 MSK (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksandr Sysoev 2022-05-30 10:28:24 MSK
Mypy не может найти бибилиотеку для модуля 'typing'

Шаги воспроизведения:

1) # apt-get install python3-module-mypy python3-module-typing_extensions
2) $ cat > test.py <<EOF
from typing import NewType
# Create a new user type called 'StudentID'
StudentID = NewType('StudentID', int)
def get_student_name(stud_id: StudentID) -> str:
    return str(input(f'Enter username for ID #{stud_id}:\n'))
stud_a = get_student_name(StudentID(100))
print(stud_a)
# This is incorrect!!
stud_b = get_student_name(-1)
print(stud_b)
EOF
3) $ mypy test.py

Реальный результат:

test.py:1: error: No library stub file for standard library module 'typing'
test.py:1: note: (Stub files are from https://github.com/python/typeshed)
test.py:1: error: Cannot find 'builtins' module. Typeshed appears broken!

Ожидаемый результат: Нет ошибки с поиском библиотеки
Comment 1 Aleksandr Sysoev 2022-12-11 13:19:37 MSK
Ошибка не связана с python3-module-mypy
Пакет python3-module-typing_extensions отсутствует в p9