Skip to content

incorrectly flagged [attribute-error] for telnetlib.Telnet #590

@abhishek-pandey

Description

@abhishek-pandey

test.py [Python 3.6.8 & pytype==2020.5.13]

from telnetlib import Telnet

session = Telnet("host", 1234)
print (session.host)

Output of running pytype:

$ pytype test.py
Computing dependencies
Analyzing 1 sources with 0 local dependencies
ninja: Entering directory `/home/xxx/.pytype'
[1/1] check test
FAILED: /home/xxx/.pytype/pyi/test.pyi
/home/xxx/bin/python -m pytype.single --imports_info /home/xxx/.pytype/imports/test.imports --module-name test -V 3.6 -o /home/xxx/.pytype/pyi/test.pyi --analyze-annotated --nofail --quick /home/xxx/test.py
File "/home/xxx/test.py", line 4, in : No attribute 'host' on telnetlib.Telnet [attribute-error]

For more details, see https://google.github.io/pytype/errors.html#attribute-error.
ninja: build stopped: subcommand failed.
$

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions