tortoise / tortoise-orm

Familiar asyncio ORM for python, built with relations in mind
https://tortoise.github.io
Apache License 2.0
4.57k stars 377 forks source link

refactor: share logic for signal listeners #1630

Closed waketzheng closed 4 months ago

waketzheng commented 4 months ago

Description

  1. Use list comprehension to replace some for-append format
  2. Import StrEnum from standard library with py3.11+
  3. Define property_kwargs for _fk_getter/setter
  4. Share logic for signals listening: pre_save/post_save/pre_delete/post/delete
  5. fix new version ruff warning

Motivation and Context

refactor

How Has This Been Tested?

make ci

Checklist:

coveralls commented 4 months ago

Pull Request Test Coverage Report for Build 9236872221

Details


Totals Coverage Status
Change from base Build 9236326640: -0.03%
Covered Lines: 5759
Relevant Lines: 6458

💛 - Coveralls