]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Minor improvements in collections.pyx
authorMatus Valo <matusvalo@gmail.com>
Tue, 14 Mar 2023 08:19:30 +0000 (04:19 -0400)
committersqla-tester <sqla-tester@sqlalchemy.org>
Tue, 14 Mar 2023 08:19:30 +0000 (04:19 -0400)
commitf3baf6194c3984525e3ce259e1b70c763c0ad824
tree75aa2aae9dc1168d6d9765b48a9dde38b273e318
parent9f1b6ae053f5513bbf0ce221ed9ab4fb9d8e0ca7
Minor improvements in collections.pyx

### Description

This PR introduces minor improvements to collections.pyx:

* Adds missed type annotations yielding slightly more optimised code
* Adds missed `cpdef` methods used internally
* Marks private methods with `@cython.final`

Fixes #9477

### Checklist
<!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once)

-->

This pull request is:

- [ ] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [X] 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: #9478
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9478
Pull-request-sha: c006c76c2c50491ea1be9c723c278da16c151397

Change-Id: I74b3df2bc790db49e331b8f8085c797249364b07
lib/sqlalchemy/cyextension/collections.pyx