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

always format into pythonic class name #114

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DaanRademaker
Copy link
Collaborator

Open to more suggestions to always format into proper class name format

@dan1elt0m
Copy link
Collaborator

dan1elt0m commented Aug 8, 2024

I like the idea. However, not sure whether this works for subclasses. Can you add a test where this is done for a subclass? I would say changing the class name in the registry itself breaks the typing reference in the parent. e.g., below Hello_World example:

class HelloWorld(BaseModel):
    a: int

class A (BaseModel):
    a: Hello_World

If it breaks, then the formatting needs to happen before add_class is called

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.

2 participants