Skip to content

♻️ CODE REFACTOR #40

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

Merged
merged 3 commits into from
Apr 17, 2024
Merged

♻️ CODE REFACTOR #40

merged 3 commits into from
Apr 17, 2024

Conversation

thoth2357
Copy link
Contributor

  1. refactored backend_cors_origin field in config to use annotated and BeforeValidator instead of the field validator decorator anymore and changed from rstrip to strip in main when calling backend_cors_origin

  2. move from Optional[Type] = None to Type | None = None, This proposed change is well an argument but the below discussion link is a clarification to PEP 604 – Allow writing union types as X | Y
    Python discussion

Added .idea to gitignore file
refactored backend_cors_origin field in config to use annotated and BeforeValidator instead of the field validator decorator anymore and changed rstrip to strip in the
According to best practices and PEP 604, instead of Optional[Type], one should use Type | None, argument backed by [Link](https://discuss.python.org/t/clarification-for-pep-604-is-foo-int-none-to-replace-all-use-of-foo-optional-int/26945)
Copy link
Member

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

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

Thank you!

@blink1073 blink1073 merged commit ce73a8d into mongodb-labs:main Apr 17, 2024
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