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

config.Field names #143

Closed
Jaymon opened this issue Oct 28, 2021 · 1 comment
Closed

config.Field names #143

Jaymon opened this issue Oct 28, 2021 · 1 comment

Comments

@Jaymon
Copy link
Owner

Jaymon commented Oct 28, 2021

python3 has a descriptor __set_name__() magic method that will tell the descriptor what the name is, I should switch my logic to use this

@Jaymon
Copy link
Owner Author

Jaymon commented Jan 19, 2023

This should absolutely by used, the field should be updated with this:

def __set_name__(self, orm_class, name):
    self.orm_class = orm_class
    self.name = name

@Jaymon Jaymon closed this as completed in d6b0181 Mar 1, 2023
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

No branches or pull requests

1 participant