stefanvodita commented on code in PR #14326: URL: https://github.com/apache/lucene/pull/14326#discussion_r1984136378
########## dev-tools/scripts/create_line_file_docs.py: ########## @@ -60,7 +60,7 @@ def compress_with_seek_points(file_name_in, file_name_out, num_seek_points): break bytes_in_chunk += len(line) - f_out.write(line) # false positive in python's crazy typing # pyright: ignore[reportArgumentType] + f_out.write(line) Review Comment: Curious - what changed that that is no longer necessary? ########## 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: Should we open an issue to make it more likely someone finds this and decides to carry on the work? ########## dev-tools/scripts/releaseWizard.py: ########## @@ -887,7 +873,7 @@ def get_release_version(): version = Version.parse(v) except Exception: print("Not a valid version %s" % v) - return get_release_version() + raise Review Comment: This change doesn't look like the others. -- 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