Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt ruff format #2083

Merged
merged 9 commits into from
Feb 21, 2025
Merged

Adopt ruff format #2083

merged 9 commits into from
Feb 21, 2025

Conversation

Zeitsperre
Copy link
Collaborator

@Zeitsperre Zeitsperre commented Feb 18, 2025

Pull Request Checklist:

  • This PR addresses an already opened issue (for bug fixes / features)
    • This PR fixes #xyz
  • Tests for the changes have been added (for bug fixes / features)
    • (If applicable) Documentation has been added / updated (for bug fixes / features)
  • CHANGELOG.rst has been updated (with summary of main changes)
    • Link to issue (:issue:number) and pull request (:pull:number) has been added

What kind of change does this PR introduce?

  • Enables the ruff auto-formatter:
    • The maximum line-length is now 120 characters.
    • Docstring formatting is now enabled.
    • Line endings in files now must be Unix-compatible (LF).
  • The blackdoc pre-commit hook now only examines .rst and .md files.

Does this PR introduce a breaking change?

Depends on your definition. The code styling now uses ruff exclusively and is no longer fully conformant with black formatting.

Other information:

ruff has a different opinion on parentheses for long-nested expressions compared to black, hence the significant changes.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link

Warning

This Pull Request modifies the SDBA module.
The SDBA module is gradually being deprecated in favour of the xsdba package.
Any changes to xclim.sdba should be made in https://github.com/Ouranosinc/xsdba

@github-actions github-actions bot added sdba Issues concerning the sdba submodule. CI Automation and Contiunous Integration docs Improvements to documenation indicators Climate indices and indicators labels Feb 18, 2025
Copy link
Collaborator

@aulemahal aulemahal left a comment

Choose a reason for hiding this comment

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

Now that's a proper line length for the 21st century!

@github-actions github-actions bot added the approved Approved for additional tests label Feb 21, 2025
Base automatically changed from deprecate-python310 to main February 21, 2025 16:03
@Zeitsperre Zeitsperre merged commit c0b7afc into main Feb 21, 2025
21 checks passed
@Zeitsperre Zeitsperre deleted the adopt-ruff-format branch February 21, 2025 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Approved for additional tests CI Automation and Contiunous Integration docs Improvements to documenation indicators Climate indices and indicators sdba Issues concerning the sdba submodule.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants