]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add missing overload to __add__
authorYossi Rozantsev <54272821+Apakottur@users.noreply.github.com>
Wed, 24 Apr 2024 20:15:30 +0000 (16:15 -0400)
committerFederico Caselli <cfederico87@gmail.com>
Fri, 26 Apr 2024 19:21:12 +0000 (21:21 +0200)
commit6caf620f88cb5b11b13985f247a30e732b3fdeb6
tree35de6da8e6962df4c9fd534b803e8bf238b83eca
parent89beea896a457fc4cd8b0a985ecb82c6eb6cca9b
Add missing overload to __add__

Add a missing `@overload` to the `__add__` operator.

### Description
The `__add__` function is missing an overload that handles the rest of the cases, similar to the one that `__sub__` has a few lines later in the same file.

This fix is taken from https://github.com/microsoft/pyright/issues/7743

### Checklist
This pull request is:

- [x] A documentation / typographical / small typing error fix
- Good to go, no issue or tests are needed
- [ ] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

**Have a nice day!**

Closes: #11307
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/11307
Pull-request-sha: 961d87403a5f985fbd17e07bae490e8e97475158

Change-Id: I27784f79e8d4f8b7f09b17060186916c78cba0a3
(cherry picked from commit 18b5b8a5b4d40b8ed8695a4027cedaaafa04cff4)
lib/sqlalchemy/sql/elements.py
test/typing/plain_files/sql/operators.py