Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: change row_factory from tuple to dict #161

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Manitary
Copy link
Contributor

I noticed the comment about having order-sensitive arguments in classes initialisation so I gave it a try: by changing row_factory to a dict you can pass the result of the query as kwargs with **

I assigned some default values as I saw fit based on the existing code; there is some naming mismatch between the tables and the class attributes, I used some aliases as I did not want to propose changes that would require altering the schema.

I think I adjusted all instances affected by this change; by the logs, the modules setup, edit, update, and episode seemed to work as intended.

Make arguments in class initialisation not order-sensitive
Adjust existing calls to match the new format
Assign some default values based on existing calls
Fix inconsistent indentation
@Manitary Manitary force-pushed the test-database-keyword-args branch from ae22257 to b08843b Compare June 23, 2023 10:04
Supports both tuple and mapping, can be cast to dict if needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant