Skip to content

feat: add autoflake to .pre-commit-config.yaml files #453

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

anscfrisson
Copy link

This will save us time fixing issues raised by flake.

@anscfrisson anscfrisson requested a review from a team as a code owner March 13, 2024 19:32
@anscfrisson anscfrisson self-assigned this Mar 13, 2024
@anscfrisson
Copy link
Author

anscfrisson commented Mar 13, 2024

@ansys/solution-maintainers

I would appreciate your insight on the failing check: basic_solution_validation — End-to-end tests with SAF Solution.

style: commands[1]> pre-commit run --all-files --show-diff-on-failure
An error has occurred: InvalidConfigError: 
==> File .pre-commit-config.yaml
==> At Config()
==> At key: repos
==> At Repository(repo='https://github.com/PyCQA/autoflake')
==> At key: hooks
==> At Hook(id=MISSING)
=====> Missing required key: id
Check the log at /home/runner/.cache/pre-commit/pre-commit.log

Notes:

  • I can not access ansys-internal/solution-applications-actions/check-code-style@v12 from presumably https://github.com/ansys-internal/solution-applications-actions to get further insight on check-code-style@v12
  • pre-commit run --all-files --show-diff-on-failure succeeds on my machine (Windows 11, Python 3.10.11)
  • the supposedly missing id is present in .pre-commit-config.yaml:
    - repo: https://github.com/PyCQA/autoflake
      rev: v2.3.1
      hooks:
      - id: autoflake
        args: [
          "--expand-star-imports",
          "--ignore-pass-statements",
          "--in-place",
          "--remove-all-unused-imports",
          "--remove-unused-variables",
        ]
    

@anscfrisson anscfrisson changed the title Add autoflake to .pre-commit-config.yaml files feat: add autoflake to .pre-commit-config.yaml files Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant