Copilot commented on code in PR #44:
URL: https://github.com/apache/solr-orbit/pull/44#discussion_r3327279089
##########
pyproject.toml:
##########
@@ -141,9 +141,33 @@ develop = [
"twine==6.2.0",
"wheel>=0.38.4",
"github3.py==4.0.1",
- "pylint==4.0.5",
+ "ruff>=0.9.0",
Review Comment:
Using an open-ended ruff version ("ruff>=0.9.0") can make lint results/CI
non-reproducible as new ruff releases can add/change diagnostics. Consider
pinning ruff to a specific version (and updating intentionally) to keep the
lint gate stable.
##########
scripts/expand-data-corpus.py:
##########
@@ -265,8 +265,8 @@ def main(args: list) -> None:
help="[EXPERT] number of documents to generate")
parser.add_argument('-i', '--interval', type=int,
help="[EXPERT] interval between consecutive "
- "timestamps, use a negative number to specify multiple "
- "docs per timestamp")
+ "timestamps, use a negative number to specify multiple
"
+ "docs per timestamp")
Review Comment:
This file still contains tab-indented continuation lines (e.g., the
ArgParser call at line 249 and the interval assignment continuation at line
296). With ruff’s pycodestyle `E` rules enabled, mixed tabs/spaces will fail
linting (E101); please convert these tabs to spaces so `make lint` passes
reliably.
##########
pyproject.toml:
##########
@@ -141,9 +141,33 @@ develop = [
"twine==6.2.0",
"wheel>=0.38.4",
"github3.py==4.0.1",
- "pylint==4.0.5",
+ "ruff>=0.9.0",
]
+# ---------------------------------------------------------------------------
+# ruff – linting
+# ---------------------------------------------------------------------------
+
+[tool.ruff]
+line-length = 180
+target-version = "py312"
+
+[tool.ruff.lint]
+# E: pycodestyle errors, F: pyflakes
+select = ["E", "F"]
+ignore = [
+ # These were disabled in the previous pylint configuration
+ "E402", # module-level import not at top of file (wrong-import-position)
+ "E731", # lambda assignment (unnecessary-lambda-assignment)
+ "E741", # ambiguous variable name (invalid-name)
+ "F402", # import shadowed by loop variable
+ "F403", # star imports (used in __init__.py for public API)
+]
+
+[tool.ruff.lint.per-file-ignores]
+# __init__.py files use imports purely for re-exporting the public API
+"**/__init__.py" = ["F401"]
+
Review Comment:
F403 (star-import) is currently ignored globally, but the only star import
in the repo is in solrorbit/workload/__init__.py. Keeping F403 as a global
ignore weakens linting by allowing star imports anywhere; it’s tighter to
ignore F403 only for that specific re-export module.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]