We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
extract_full_summary_from_signature
As pointed out by https://gist.github.com/prodigysml/d07cd482214c80bfb6d3240454d2f679, this regex (introduced by 430c39e) is inefficient:
knack/knack/introspection.py
Line 18 in e0c1411
As shown in https://regex101.com/, a simple :param r requires 1214 steps to fail.
:param r
This is because \s+, .+? and \s* all match consecutive spaces, thus can trigger many backtrackings.
\s+
.+?
\s*
A better solution is to replace .+? with \w+ to match the parameter name so that backtrackings can be greatly reduced:
\w+
\s*(:param)\s+(\w+)\s*:(.*)
The text was updated successfully, but these errors were encountered:
Match.regs
No branches or pull requests
As pointed out by https://gist.github.com/prodigysml/d07cd482214c80bfb6d3240454d2f679, this regex (introduced by 430c39e) is inefficient:
knack/knack/introspection.py
Line 18 in e0c1411
As shown in https://regex101.com/, a simple
:param r
requires 1214 steps to fail.This is because
\s+
,.+?
and\s*
all match consecutive spaces, thus can trigger many backtrackings.A better solution is to replace
.+?
with\w+
to match the parameter name so that backtrackings can be greatly reduced:The text was updated successfully, but these errors were encountered: