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

Migrate from isort/Black/Flake8 to Ruff for Code Formatting and Linting #5424

Merged
merged 9 commits into from
Sep 21, 2024

Commits on Sep 21, 2024

  1. Replace flake8 by ruff

    snejus committed Sep 21, 2024
    Configuration menu
    Copy the full SHA
    f8ef223 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    06a5eca View commit details
    Browse the repository at this point in the history
  3. Reformat the codebase

    snejus committed Sep 21, 2024
    Configuration menu
    Copy the full SHA
    85a17ee View commit details
    Browse the repository at this point in the history
  4. Fix lint issues

    - Fix imports
    - Fix pytest issues
    - Do not assign lambda as variable
    - Use isinstance instead of type to check type
    - Rename ambiguously named variables
    - Name custom errors with Error suffix
    snejus committed Sep 21, 2024
    Configuration menu
    Copy the full SHA
    f36bc49 View commit details
    Browse the repository at this point in the history
  5. Remove some lint exclusions and fix the issues

    * Replace `noqa` comments in `assert...` method definitions with
      a configuration option to ignore these names.
    * Use the `__all__` variable to specify importable items from the
      module, replacing `*` imports and `noqa` comments for unused imports.
    * Address issues with poorly named variables and methods by renaming
      them appropriately.
    snejus committed Sep 21, 2024
    Configuration menu
    Copy the full SHA
    5f78d1b View commit details
    Browse the repository at this point in the history
  6. Replace OrderedEnum with a builtin IntEnum

    The variable in `test_ordered_enum` was flagged for naming issues, and
    I noticed that `OrderedEnum` is essentially `enum.IntEnum`.
    
    I guess `OrderedEnum` exists because it was created before
    `enum.IntEnum` was made available in Python 3.4. We do not need it
    anymore though, so it's now gone.
    snejus committed Sep 21, 2024
    Configuration menu
    Copy the full SHA
    fe4d492 View commit details
    Browse the repository at this point in the history
  7. Add .git-blame-ignore-revs file to ignore specific commits in git blame

    This commit introduces a `.git-blame-ignore-revs` file to the
    repository. The purpose of this file is to list specific commit hashes
    that should be ignored when using the `git blame` command. This is
    useful for ignoring commits that involve large-scale formatting changes,
    refactoring, or other non-functional changes that would otherwise
    clutter the blame history.
    
    I added a couple of previous commit hashes which reformatted the code.
    
    Configure this repository to use this file:
    
      git config --local blame.ignoreRevsFile .git-blame-ignore-revs
    snejus committed Sep 21, 2024
    Configuration menu
    Copy the full SHA
    962c128 View commit details
    Browse the repository at this point in the history
  8. Fix coverage task docs

    snejus committed Sep 21, 2024
    Configuration menu
    Copy the full SHA
    edeb430 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    11fa6c7 View commit details
    Browse the repository at this point in the history