jinja icon indicating copy to clipboard operation
jinja copied to clipboard

Fix return value annotations for methods returning copies

Open viccie30 opened this issue 2 years ago • 1 comments

These methods always return a new object of the same type as the object they are bound to, even if this is a subclass. Change the annotations to reflect that.

I have not opened an issue, because it's not a functional bug. It just causes issues with static type checkers.

Checklist:

  • [ ] Add tests that demonstrate the correct behavior of the change. Tests should fail without the change. (N/A)
  • [ ] Add or update relevant docs, in the docs folder and in code. (N/A)
  • [x] Add an entry in CHANGES.rst summarizing the change and linking to the issue.
  • [ ] Add .. versionchanged:: entries in any relevant code docs. (N/A)
  • [x] Run pre-commit hooks and fix any issues.
  • [x] Run pytest and tox, no tests failed.

viccie30 avatar Aug 23 '23 07:08 viccie30

The pre-commit failure is not related to the changes in the PR and also happens with the current state of the branch.

viccie30 avatar Aug 23 '23 07:08 viccie30