Replace stale black and isort config with ruff - #31
Conversation
|
👋 Hello @glenn-jocher, thank you for submitting a
|
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
🔍 PR Review
Made with ❤️ by Ultralytics Actions
Clean change. The obsolete Black and isort configuration is removed, and the replacement Ruff line-length setting matches the repository's Ruff-based formatting workflow. No actionable issues found.
|
🎉 Thank you, @glenn-jocher, for this thoughtful contribution—and congratulations on the merge!
By consolidating Black and isort settings under Ruff, preserving the 120-character line length, and correcting the script permissions, this PR simplifies tooling and creates a more consistent workflow for contributors. Your attention to these details helps keep the project clean, maintainable, and efficient. 🙌 |
Two pyproject/tooling corrections.
pyproject.tomlconfigured[tool.black]and[tool.isort], but neither tool runs anywhere in this repo —.github/workflows/format.ymlformats it with Ruff and docformatter viaultralytics/actions, matching the rest of the org. Replaced both tables with[tool.ruff] line-length = 120, which is what actually applies.capitalize_comments.py(mode 100755 → 100644). The file has no shebang, so the bit never did anything, andruff checkflagged it asEXE002. It was a leftover from the old design where.pre-commit-hooks.yamlpointedentryat the filename; since Fix capitalize-comments hook entry point, add AGENTS.md #30 the hook runs through thecapitalize-commentsconsole script, so nothing executes the file directly.Verified: with the new config
ruff check .reports "All checks passed" (it reported the EXE002 error before the mode change) andruff format --check .shows 4 files already formatted. Re-ran the hook viapre-commit try-repoagainst the committed branch state with a cleared pre-commit cache — it still installs and capitalizes correctly.🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Modernizes project linting configuration by replacing Black and isort settings with Ruff and correcting a script file’s permissions. 🛠️
📊 Key Changes
capitalize_comments.pyfrom executable (755) to standard non-executable (644) permissions.[tool.black]and[tool.isort]configuration sections with a unified[tool.ruff]section.🎯 Purpose & Impact