Skip to content
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

✨ Add PEP 604 style type hint support #218

Merged
merged 10 commits into from
Feb 8, 2022
Prev Previous commit
Next Next commit
🩹 Fixed missing typehints after pipe character
  • Loading branch information
s-weigand committed Feb 8, 2022
commit 883fce0f1e27ece773bcd4d575702a613eef1806
2 changes: 1 addition & 1 deletion src/parse/parse_parameters.ts
Original file line number Diff line number Diff line change
@@ -115,7 +115,7 @@ function parseYields(parameters: string[], body: string[]): Yields {
}

function parseReturnFromDefinition(parameters: string[]): Returns | null {
const pattern = /^->\s*(["']?)([\w\[\], \.]*)\1/;
const pattern = /^->\s*(["']?)([\w\[\], |\.]*)\1/;

for (const param of parameters) {
const match = param.trim().match(pattern);