rmuir commented on code in PR #14326: URL: https://github.com/apache/lucene/pull/14326#discussion_r1984165645
########## dev-tools/scripts/pyproject.toml: ########## @@ -1,21 +1,163 @@ [tool.pyright] +pythonVersion = "3.12" venvPath = "." venv = ".venv" -# TODO: improve! -# typeCheckingMode = "strict" +typeCheckingMode = "strict" +reportCallInDefaultInitializer = "error" +reportImplicitStringConcatenation = "error" +reportImportCycles = "error" +reportImplicitOverride = "error" +reportPropertyTypeMismatch = "error" +reportUninitializedInstanceVariable = "error" reportUnnecessaryTypeIgnoreComment = "error" -typeCheckingMode = "standard" + +# This is a big TODO list of current typing problems +# Pick an item off the list, change to "error", and send a pull request to fix it! +# You can find more information on a rule at https://github.com/microsoft/pyright/blob/main/docs/configuration.md +reportConstantRedefinition = "hint" # Requires fixing nonstandard variable conventions +reportMissingSuperCall = "hint" # Requires adding missing super().__init__() calls +reportMissingTypeStubs = "hint" # Can be fixed by switching 'ics' to alternative such as 'icalendar' +reportPrivateUsage = "hint" # Can be fixed by using TLS properly (Ruff S323) +reportUnnecessaryComparison = "hint" # Requires cleaning up some dead code +reportUntypedNamedTuple = "hint" # Requires moving to different type of named tuple +reportUnusedCallResult = "none" # Forces you to assign unused retvals to '_', very noisy. + +# Intentionally disabled because it slows pyright by 2x +reportShadowedImports = "none" # Extremely slow check [tool.ruff] +target-version = "py312" line-length = 200 indent-width = 2 [tool.ruff.lint] -# TODO: improve! -# select = ["ALL"] +select = ["ALL"] # disabling/enabling of rules ignore = [ + # This is a big TODO list of current linter problems. Review Comment: Yes I was planning to make a "good first issue" in both repositories for this? I thought first, we might want to have a look at the list and see if there is anything we are against, and simply move those further down in the file, away from the TODO list, instead under "list of rules we keep disabled". I am sure there are probably things here that at least aren't priorities: policing print() statements, TODOs, and docstrings are examples. Maybe we don't even want to adopt python naming conventions. These are just examples. So we could remove any bikesheds from the list first: it would be great to get some of these issues fixed such as variable shadowing, exception handling, etc -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org