-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Needs decision 🔒Needs a decision before implemention or rejectionNeeds a decision before implemention or rejection
Description
Bug description
import os
from enum import StrEnum
class Env(StrEnum):
"""Env"""
LOG_LEVEL = "LOG_LEVEL"
"""Set the log level"""
# pylint: disable-next=invalid-envvar-name # Probably false-positive: https://github.com/pylint-dev/pylint/issues/10840
os.getenv(Env.LOG_LEVEL, "INFO")Configuration
Command used
uv run pylint a.pyPylint output
************* Module a
a.py:13:0: W0012: Unknown option value for 'disable-next', expected a valid pylint message and got 'invalid-envvar-name' (unknown-option-value)
a.py:14:0: E1507: os.getenv does not support a.Env.LOG_LEVEL type argument (invalid-envvar-value)
-----------------------------------
Your code has been rated at 0.00/10Expected behavior
Nothing. StrEnum or <enum>.name resolve to str, which are valid type arguments
Pylint version
pylint 4.0.4
astroid 4.0.3
Python 3.12.3 (main, Jan 8 2026, 11:30:50) [GCC 13.3.0]OS / Environment
Additional dependencies
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Needs decision 🔒Needs a decision before implemention or rejectionNeeds a decision before implemention or rejection