Repository navigation
CI Fix argument in get_comment.py on failed linting - #34767
Conversation
AnneBeyer
left a comment
There was a problem hiding this comment.
Thank you for catching this, @DeaMariaLeon!
It looks like a typo indeed. From what I understand, the repo variable is only needed to get the actual PR content in line 299 (though I find it a bit confusing that the variable is called issue, but that is outside the scope of this PR). So repo_str should be passed here.
I just think that the parameter name needs to be adapted as well, see below.
Co-authored-by: Anne Beyer <[email protected]>
|
Thanks @AnneBeyer.. I wrote too fast :-/ |
lesteve
left a comment
There was a problem hiding this comment.
Nice catch, thanks!
Out of curiosity did it cause an issue in the CI or you bumped into it when looking at the file?
get_comment.py on failed lintingget_comment.py on failed linting
|
Naively, I thought why doesn't
It turns out that pyrefly would have caught it, but we only run it in With this diff below pyrefly catches the issue, see output below. I personally think this worth adding the pyproject.toml diff to add diff --git a/pyproject.toml b/pyproject.toml
index c9caa9cff25..b0f33b9d70c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -165,7 +165,7 @@ ban-relative-imports = "all"
"sklearn/utils/_metadata_requests.py"=["CPY001"]
[tool.pyrefly]
-project-includes = ["sklearn"]
+project-includes = ["sklearn", "build_tools", "maint_tools"]
project-excludes = ["**/sklearn/externals*"]
preset = "legacy"
ignore-missing-imports = [pyrefly errors: Footnotes
|
I bumped into it when looking at the file.
OK. I'll look into it. Thanks for the review and merge. |
…4767) Co-authored-by: Anne Beyer <[email protected]>
…4767) Co-authored-by: Anne Beyer <[email protected]>
…4767) Co-authored-by: Anne Beyer <[email protected]>
…4767) Co-authored-by: Anne Beyer <[email protected]>
Reference Issues/PRs
While adding sphinx-lint I noticed
What does this implement/fix? Explain your changes.
Line 333 calls
get_messageusing a keyword argumentrepo=, but the function signature at line 75 defines the parameter asrepo_str. So, if there is a long comment that exceeds the limit, this would fail.Original PR #32804