Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
DetachHead opened this issue Oct 22, 2023 · 1 comment · Fixed by #8140
Labels
accepted Ready for implementation

Comments

@DetachHead
Copy link

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:

@charliermarsh
Copy link
Member

This seems reasonable to me.

@charliermarsh charliermarsh added the accepted Ready for implementation label Oct 23, 2023
zanieb pushed a commit that referenced this issue Oct 23, 2023
<!--
Thank you for contributing to Ruff! To help us out with reviewing,
please consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

<!-- What's the purpose of the change? What does it do, and why? -->

Close #8123 

## Test Plan

<!-- How was it tested? -->

New test cases

---------

Signed-off-by: harupy <hkawamura0130@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants