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

Add missing environment options to the Environment.overlay method #1647

Merged
merged 2 commits into from Apr 4, 2022
Merged

Add missing environment options to the Environment.overlay method #1647

merged 2 commits into from Apr 4, 2022

Conversation

Tom-Brouwer
Copy link

@Tom-Brouwer Tom-Brouwer commented Apr 1, 2022

This brings the options in sync with the options of the __init__ method.

Note: Please let me know if we want to be able to edit the 'enable_async' option also. I added this now
to streamline the overlay method options with the __init__ method, but perhaps there's no use-case for
changing this at runtime?

fixes #1645

Checklist:

  • [ ] Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.
    There are no tests for previous individual arguments of the .overlay method, only a general test in
    test_ext.py, so I also didn't add tests specifically for these options. I did test manually to verify the
    options are set on the overlay, but unchanged on the original env. If requested, I can integrate these
    into a seperate dedicated test for these options only
  • [ ] Add or update relevant docs, in the docs folder and in code.
    No changes required
  • [ ] Add an entry in CHANGES.rst summarizing the change and linking to the issue.
    Looking at the format, this is only needed when a new version is released
  • [ ] Add .. versionchanged:: entries in any relevant code docs.
    No docs were changed
  • [ x ] Run pre-commit hooks and fix any issues.
    No issues found
  • [ x ] Run pytest and tox, no tests failed.
    Pytest is a success. Please note the following errors are in the output of the tox command, but these
    seem unrelated to the current change

Errors in tox output

pypy38 create: /home/brouwer/Personal/repositories/jinja/.tox/pypy38
SKIPPED: InterpreterNotFound: pypy3.8
pypy37 create: /home/brouwer/Personal/repositories/jinja/.tox/pypy37
SKIPPED: InterpreterNotFound: pypy3.7
style create: /home/brouwer/Personal/repositories/jinja/.tox/style
style installdeps: pre-commit
style installed: cfgv==3.3.1,distlib==0.3.4,filelock==3.6.0,identify==2.4.12,nodeenv==1.6.0,platformdirs==2.5.1,pre-commit==2.17.0,PyYAML==6.0,six==1.16.0,toml==0.10.2,virtualenv==20.14.0
style run-test-pre: PYTHONHASHSEED='1280065272'
style run-test: commands[0] | pre-commit run --all-files --show-diff-on-failure
pyupgrade................................................................Passed
Reorder python imports...................................................Passed
black....................................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

src/jinja2/visitor.py:46:13: B020 Found for loop that reassigns the iterable it is iterating with each iterable value.

pip-compile-multi verify.................................................Passed
fix utf-8 byte order marker..............................................Passed
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
ERROR: InvocationError for command /home/brouwer/Personal/repositories/jinja/.tox/style/bin/pre-commit run --all-files --show-diff-on-failure (exited with code 1)
typing create: /home/brouwer/Personal/repositories/jinja/.tox/typing

@Tom-Brouwer Tom-Brouwer changed the base branch from main to 3.1.x April 1, 2022 20:10
@davidism davidism added this to the 3.1.2 milestone Apr 4, 2022
@davidism davidism merged commit 990602f into pallets:3.1.x Apr 4, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

keep_trailing_newline and other options missing from Environment.overlay
2 participants