Skip to content

uncapitalized-environment-variables (SIM112) false positive on https_proxy, http_proxy and no_proxy variables #8123

@DetachHead

Description

@DetachHead
import os

os.environ["https_proxy"] # error
os.environ["http_proxy"] # error
os.environ["no_proxy"] # error

https://play.ruff.rs/75b318d8-1456-4743-a136-fe45150985ad

while there is no "official" standard, most applications use lowercase for these variables, so i think this rule should ignore them. or maybe a setting could be added for variable names to ignore

source:

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedReady for implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions