We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 418b371 commit edc495dCopy full SHA for edc495d
src/server/templates/python.ts
@@ -384,13 +384,19 @@ const PY_TYPE_MAP: Record<string, string> = {
384
* formatForPyTypeName('pokemon league') // PokemonLeague
385
* ```
386
*/
387
+
388
function formatForPyClassName(name: string): string {
389
return name
390
.split(/[^a-zA-Z0-9]/)
- .map((word) => `${word[0].toUpperCase()}${word.slice(1)}`)
391
+ .map((word) => {
392
+ if (word) {
393
+ return `${word[0].toUpperCase()}${word.slice(1)}`
394
+ } else {
395
+ return ''
396
+ }
397
+ })
398
.join('')
399
}
-
400
/**
401
* Converts a Postgres name to snake_case.
402
*
0 commit comments