As of python 3.9, IM_A_TEAPOT was added to http.HTTPStatus, but pylint reports a no-member error.
Can be replicated using the following code in example.py
"""Demonstrate a False positive with pylint."""
from http import HTTPStatus
print(HTTPStatus.IM_A_TEAPOT.value)
print(HTTPStatus.OK.value)
Configuration
Default configuration is used.
Command used
pylint example.py
Pylint output
************* Module pylint
/tmp/example.py:6:6: E1101: Class 'HTTPStatus' has no 'IM_A_TEAPOT' member (no-member)
-----------------------------------
Your code has been rated at 0.00/10
Expected behavior
No errors should be found.
Pylint version
All (current) versions after IM_A_TEAPOT was added are affected:
Bug description
As of python 3.9,
IM_A_TEAPOT
was added tohttp.HTTPStatus
, but pylint reports ano-member
error.Can be replicated using the following code in
example.py
Configuration
Command used
Pylint output
Expected behavior
No errors should be found.
Pylint version
All (current) versions after
IM_A_TEAPOT
was added are affected:OS / Environment
Testing was done using the vanilla
python:version
docker images. e.g:Additional dependencies
No response