Environment.environ instead of os.environ - #5022
Conversation
There was a problem hiding this comment.
Code Review
This pull request replaces direct usage of os.environ and os.getenv with a custom Environment.environ singleton across the codebase, enforcing this via new linter rules. Feedback highlights a critical issue where modifying Environment.environ directly introduces side effects due to its singleton nature, requiring the use of .copy() instead. Additionally, double lookups of environment variables in tmt/config/__init__.py and tmt/plugins/__init__.py should be simplified using assignment expressions.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
9a0dc49 to
d63a63b
Compare
d63a63b to
1280a15
Compare
5d29da6 to
8b3236b
Compare
8b3236b to
636dbe7
Compare
636dbe7 to
09003ef
Compare
09003ef to
024f457
Compare
024f457 to
cb2c69a
Compare
cb2c69a to
3c5feb0
Compare
3c5feb0 to
0515cf7
Compare
0515cf7 to
838c013
Compare
Pull Request Checklist