fix: sync locales in user registration validation (#3278)

* Add ability to inject into Python files

* Update outdated references to gen_global_components.py

* Add code gen for registration locale validation

* sort validators

* update for pydantic 2

* run generator again

---------

Co-authored-by: Gasper Gril <gasper@gril.si>
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
This commit is contained in:
Hayden
2024-03-10 12:58:52 -05:00
committed by GitHub
parent 02da2114f9
commit b54cdf6425
8 changed files with 108 additions and 88 deletions

View File

@@ -50,7 +50,7 @@ class CodeSlicer:
self._next_line += 1
def get_indentation_of_string(line: str, comment_char: str = "//") -> str:
def get_indentation_of_string(line: str, comment_char: str = "//|#") -> str:
return re.sub(rf"{comment_char}.*", "", line).removesuffix("\n")