Skip to content

Ruff 0.16.0 compatibility changes - #206

Merged
glenn-jocher merged 1 commit into
mainfrom
codex/ruff-016-compat
Jul 23, 2026
Merged

Ruff 0.16.0 compatibility changes#206
glenn-jocher merged 1 commit into
mainfrom
codex/ruff-016-compat

Conversation

@glenn-jocher

@glenn-jocher glenn-jocher commented Jul 23, 2026

Copy link
Copy Markdown
Member

Summary

  • apply Ruff 0.16.0 fixes using the shared Ultralytics Actions rule set
  • make generated fallback timestamps explicitly UTC
  • preserve the Python 3.8 package floor

Validation

  • uvx --from ruff==0.16.0 ruff check --fix --unsafe-fixes --extend-select F,I,D,UP,RUF,FA --target-version py38 --ignore BLE001,D100,D104,D203,D205,D212,D213,D401,D406,D407,D413,RUF001,RUF002,RUF012,S110 .
  • uvx --from ruff==0.16.0 ruff format --line-length 120 .
  • Python 3.8 compileall
  • Python 3.8 package build

Deleted: redundant mapping item-key binding and nested conditional branch.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

🛠️ Improves plugin reliability, timezone handling, and author resolution while simplifying internal code structure.

📊 Key Changes

  • 🔄 Replaced absolute-style imports with package-relative imports for processor, improving module compatibility.
  • 🕒 Updated date generation to use UTC-aware timestamps instead of local system time.
  • 🧑‍💻 Simplified GitHub commit-author lookup conditions and request formatting.
  • 📚 Updated author processing to iterate directly over Git data entries rather than unused file-path keys.
  • 🧹 Converted task arguments to a standard dictionary for clearer, more maintainable code.

🎯 Purpose & Impact

  • ✅ Ensures generated creation and modification dates are consistent across machines and time zones.
  • 🚀 Reduces potential import issues when the MkDocs plugin is packaged or executed in different environments.
  • 👤 Improves reliability when resolving GitHub usernames and avatars from commit history.
  • 🧩 Makes post-processing code easier to read and maintain without changing its core behavior.

@UltralyticsAssistant UltralyticsAssistant added devops GitHub Devops or MLops fixed Bug has been resolved labels Jul 23, 2026
@UltralyticsAssistant

Copy link
Copy Markdown
Member

👋 Hello @glenn-jocher, thank you for submitting a ultralytics/mkdocs 🚀 PR! This automated message helps with the initial review; an engineer will assist with any follow-up. To ensure a seamless integration of your work, please review the following checklist:

  • Define a Purpose: Clearly explain the purpose of your fix or feature in your PR description, and link to any relevant issues. Ensure your commit messages are clear, concise, and adhere to the project's conventions.
  • Synchronize with Source: Confirm your PR is synchronized with the ultralytics/mkdocs main branch. If it's behind, update it by clicking the 'Update branch' button or by running git pull and git merge main locally.
  • Ensure CI Checks Pass: Verify all Ultralytics Continuous Integration (CI) checks are passing. If any checks fail, please address the issues.
  • Update Documentation: Update the relevant documentation for any new or modified features.
  • Add Tests: If applicable, include or update tests to cover your changes, and confirm that all tests are passing.
  • Sign the CLA: Please ensure you have signed our Contributor License Agreement if this is your first Ultralytics PR by writing "I have read the CLA Document and I sign the CLA" in a new message.
  • Minimize Changes: Limit your changes to the minimum necessary for your bug fix or feature addition. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." — Bruce Lee

For more guidance, please refer to our Contributing Guide. Don't hesitate to leave a comment if you have any questions. Thank you for contributing to Ultralytics! 🚀

@UltralyticsAssistant UltralyticsAssistant left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 PR Review

Made with ❤️ by Ultralytics Actions

Clean PR. The Ruff-driven import, dict-literal, conditional, and unused-key changes preserve behavior, and the fallback timestamps now correctly use UTC while remaining compatible with the declared Python 3.8 floor.

@glenn-jocher
glenn-jocher merged commit a52f1ae into main Jul 23, 2026
5 checks passed
@glenn-jocher
glenn-jocher deleted the codex/ruff-016-compat branch July 23, 2026 23:22
@UltralyticsAssistant

Copy link
Copy Markdown
Member

🎉 Thank you, @glenn-jocher, for this excellent contribution!

“Great things are done by a series of small things brought together.” — Vincent van Gogh

This PR brings together thoughtful improvements to plugin reliability, UTC-aware date handling, GitHub author resolution, and code maintainability. These changes make the MkDocs workflow more consistent across environments and easier to maintain. Your careful work is greatly appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops GitHub Devops or MLops fixed Bug has been resolved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants