Retrieves a title from a name. Args: name: The name to retrieve a title from. Returns: The title.
(self, name: str)
| 2159 | # ### Utility methods |
| 2160 | |
| 2161 | def get_title_from_name(self, name: str) -> str: |
| 2162 | """Retrieves a title from a name. |
| 2163 | |
| 2164 | Args: |
| 2165 | name: The name to retrieve a title from. |
| 2166 | |
| 2167 | Returns: |
| 2168 | The title. |
| 2169 | """ |
| 2170 | return name.title().replace('_', ' ').strip() |
| 2171 | |
| 2172 | def field_title_should_be_set(self, schema: CoreSchemaOrField) -> bool: |
| 2173 | """Returns true if a field with the given schema should have a title set based on the field name. |
no outgoing calls
no test coverage detected