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

code cleanup (split constants into a folder) #1866

Merged
merged 15 commits into from
Sep 29, 2023
Merged

Conversation

Lendemor
Copy link
Collaborator

Reorganize the constants folder to split them into logical module.

(Also make use of SimpleNamespace to group some constants together.)

Copy link
Collaborator

@masenf masenf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the namespace classes themselves should be TitleCase like you'd expect for a class. but otherwise the categorization and breakdown looks just right.

reflex/app.py Outdated Show resolved Hide resolved
reflex/constants/route.py Outdated Show resolved Hide resolved
@Lendemor
Copy link
Collaborator Author

I think the namespace classes themselves should be TitleCase like you'd expect for a class. but otherwise the categorization and breakdown looks just right.

Personally I think it's neater to have them in UPPER_CASE because when seeing them in the end code it's immediately clear that they are "constant groups" rather than utility/core classes.

(i.e a DefaultPage could be confused with a default page object that can be instantiated, whereas I find it clearer that DEFAULT_PAGE is not a object to be instantiated).

@picklelo picklelo merged commit dcb1710 into main Sep 29, 2023
30 of 36 checks passed
@picklelo picklelo deleted the lendemor/code_cleanup branch October 9, 2023 21:06
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.

3 participants