Skip to content

Fix for tox4 regression issue with setenv file and substitutions (#2435) #3521

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

realitycheck
Copy link

This PR contains fix for the issue #2435. (#2435 (comment))

Please, make sure you address all the checklists (for details on how see
development documentation)! -->

  • [+ ] ran the linter to address style issues (tox -e fix)
  • [+] wrote descriptive pull request text
  • [+] ensured there are test(s) validating the fix
  • added news fragment in docs/changelog folder
  • updated/extended the documentation

if not self._is_file_line(sub_line):
sub_raw.__setitem__(*self._extract_key_value(sub_line))
else:
for k, v in self._stream_env_file(self._parse_file_line(sub_line), args):
Copy link
Member

Choose a reason for hiding this comment

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

No single letter variables outside of comprehensions.

while self._needs_replacement:
line = self._needs_replacement.pop(0)
expanded_line = self._replacer(line, ConfigLoadArgs([], self._name, self._env_name))
sub_raw = dict(self._extract_key_value(sub_line) for sub_line in expanded_line.splitlines() if sub_line)
expanded_line = self._replacer(line, args)
Copy link
Member

Choose a reason for hiding this comment

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

Can you explain the change here and why you done it this way?

Copy link
Member

Choose a reason for hiding this comment

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

  • [+] wrote descriptive pull request text

This part you didn't really address. Writing a descriptive text involves the approach you've taken and why.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants