Skip to content

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

Open
anscfrisson wants to merge 3 commits intomainfrom
cfrisson/pre-commit-config/add-autoflake
Open

feat: add autoflake to .pre-commit-config.yaml files#453
anscfrisson wants to merge 3 commits intomainfrom
cfrisson/pre-commit-config/add-autoflake

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