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
Fix missing-param-doc
FP
#7878
Fix missing-param-doc
FP
#7878
Conversation
Pull Request Test Coverage Report for Build 3613572879
💛 - Coveralls |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does feel hacky, but it's simple and I don't see what could go wrong.
Blocked by tests not being launched on backported branch that needs fixing so I don't have to rebase this later. Also another review would be welcome. |
@@ -644,7 +644,7 @@ def match_param_docs(self) -> tuple[set[str], set[str]]: | |||
entries = self._parse_section(self.re_param_section) | |||
entries.extend(self._parse_section(self.re_keyword_param_section)) | |||
for entry in entries: | |||
match = self.re_param_line.match(entry) | |||
match = self.re_param_line.match(entry.replace("\\", "")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't we change self._re_param_line
? We can include \\
there.
In any case, we are also replacing \\
a bit further down here so that should be fixed as well then if we continue down the current road.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea how to change _re_param_line
, it's really difficult to read. If you can, plz do paste your regex here!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, I'd rather not touch it as well, but just replacing all \\
seems error prone as well.
I think it should be as easy as allowing both \w
and \\
in _re_param_line
. You can check this with regex101.com
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be as easy
Oh I tried, I really tried 🤣 , but nothing quite "works". As soon as you try to add some variation of (\)* or something (Tried lots of ways), it breaks other tests!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In any case, we are also replacing \a bit further down here so that should be fixed as well then if we continue down the current road.
reasonable and doesn't seem to break tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed the regex and made some suggestions! 😄
tests/functional/ext/docparams/parameter/missing_param_doc_required_Google.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉 This comment was generated for commit 6097f34 |
Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> (cherry picked from commit 1913635)
Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> (cherry picked from commit 1913635)
Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> (cherry picked from commit 1913635)
Type of Changes
Description
As mentioned in linked issue, if this is too a hacky solution, we can reject the PR and attempt to update the
re_param_line
regex.Closes #7827