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

Fix invalid-envvar-default to flag os.environ.get #10094

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

harupy
Copy link
Contributor

@harupy harupy commented Nov 23, 2024

Type of Changes

Type
βœ“ πŸ› Bug fix
✨ New feature
πŸ”¨ Refactoring
πŸ“œ Docs

Description

Refs #10092

Closes #10092

Signed-off-by: harupy <[email protected]>
Copy link

codecov bot commented Nov 23, 2024

Codecov Report

All modified and coverable lines are covered by tests βœ…

Project coverage is 95.80%. Comparing base (68cb5b3) to head (4388b82).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #10094   +/-   ##
=======================================
  Coverage   95.80%   95.80%           
=======================================
  Files         174      174           
  Lines       18962    18962           
=======================================
  Hits        18166    18166           
  Misses        796      796           
Files with missing lines Coverage Ξ”
pylint/checkers/stdlib.py 96.27% <100.00%> (ΓΈ)
---- 🚨 Try these New Features:

Copy link
Contributor

πŸ€– According to the primer, this change has no effect on the checked open source code. πŸ€–πŸŽ‰

This comment was generated for commit 4388b82

@Pierre-Sassoulas Pierre-Sassoulas added the False Negative πŸ¦‹ No message is emitted but something is wrong with the code label Nov 23, 2024
@Pierre-Sassoulas Pierre-Sassoulas added this to the 4.0.0 milestone Nov 23, 2024
Copy link
Collaborator

@DanielNoord DanielNoord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also add a functional test for this? I think the documentation workflow shows this might be working as expected.

@@ -30,7 +30,7 @@
THREADING_THREAD = "threading.Thread"
COPY_COPY = "copy.copy"
OS_ENVIRON = "os._Environ"
ENV_GETTERS = ("os.getenv",)
ENV_GETTERS = ("os.getenv", "os.environ.get")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this would fix the issue but it actually doesn't.

@harupy harupy requested a review from DanielNoord November 26, 2024 23:57
@DanielNoord
Copy link
Collaborator

@harupy You asked for review but haven't changed any code. What would you like me to review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
False Negative πŸ¦‹ No message is emitted but something is wrong with the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Question: Is there a reason that invalid-envvar-default only checks os.getenv, not os.environ.get
3 participants