Skip to content

[MNT] Apply pre-commit formatting to all files#389

Merged
dswah merged 6 commits into
dswah:mainfrom
Shushankranjan:mnt/pre-commit-formatting-388
Jul 24, 2025
Merged

[MNT] Apply pre-commit formatting to all files#389
dswah merged 6 commits into
dswah:mainfrom
Shushankranjan:mnt/pre-commit-formatting-388

Conversation

@Shushankranjan

@Shushankranjan Shushankranjan commented Jul 24, 2025

Copy link
Copy Markdown
Contributor

Issue - [#388] resolved

  1. Installed pre-commit in a virtual environment
  2. Ran pre-commit on all files in the repository
  3. Multiple formatting tools were applied:
    • end-of-file-fixer: Fixed files missing final newlines
    • trailing-whitespace: Removed trailing whitespace
    • ruff-format: Reformatted Python code for consistent style
    • ruff: Applied various code quality fixes

@fkiraly fkiraly changed the title Apply pre-commit formatting to all files [MNT] Apply pre-commit formatting to all files Jul 24, 2025
Comment thread .ruff.toml Outdated
@@ -0,0 +1,22 @@
[lint]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this should go in pyproject.toml

@fkiraly fkiraly left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice! Thanks!

Minor request only, please make sure the new ruff skip config goes in pyproject.toml

@fkiraly fkiraly added the maintenance Continuous integration, unit testing & package distribution label Jul 24, 2025
@Shushankranjan

Copy link
Copy Markdown
Contributor Author
  1. Added the following rules to the ignore list in [tool.ruff.lint] section:

    • D414: Section has no content
    • E501: Line too long
    • UP028: Replace yield over for loop with yield from
    • UP038: Use X | Y in isinstance call instead of (X, Y)
    • C404: Unnecessary list comprehension (rewrite as a dict comprehension)
    • RUF002: Docstring contains ambiguous characters
  2. Verified that the configuration works by running Ruff check, which now passes without errors.

@Shushankranjan Shushankranjan requested a review from fkiraly July 24, 2025 11:02

@fkiraly fkiraly left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks a lot!

@dswah dswah merged commit 8a800c5 into dswah:main Jul 24, 2025
16 checks passed
@Shushankranjan Shushankranjan deleted the mnt/pre-commit-formatting-388 branch July 24, 2025 16:14
@Shushankranjan

Copy link
Copy Markdown
Contributor Author

Thanks a lot for the review and merge, @fkiraly @dswah! Happy to contribute , looking forward to helping out more.

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

Labels

maintenance Continuous integration, unit testing & package distribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants