Remove the last underscore, used to avoid conflicts with reserved words.
(name: str)
| 57 | |
| 58 | |
| 59 | def normalize_name(name: str) -> str: |
| 60 | """Remove the last underscore, used to avoid conflicts with reserved words.""" |
| 61 | if name.endswith("_") and name[-2] != "_" and not name.startswith("_"): |
| 62 | return name.removesuffix("_") |
| 63 | return name |
| 64 | |
| 65 | |
| 66 | def get_meta(obj: Any, match: type[T]) -> T | None: |
no outgoing calls