-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly type db on the model, sort out generic types issues (#5545)
Thanks to @wisp3rwind's suggestion this PR adds types to the relationship between `Model`, `Database` and `Library`. Then I worked through the rest of the issues found in the edited files. Most of this involved providing type parameters for generic types (or defining defaults, rather 😉). There `queryparse` module had a somewhat significant issue where the sorting construction logic only expected to receive `FieldSort` subclasses, while `SmartArtistSort` was not one. Thus `SmartArtistSort` has now been forced to behave and is a `FieldSort` subclass. It's also been moved to `query.py` module which is where the rest of sorts are defined.
- Loading branch information
Showing
6 changed files
with
118 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.