From 20f971741e75caaa13ad29935bacfcd280bb7cd2 Mon Sep 17 00:00:00 2001 From: Christopher Harris Date: Wed, 11 Sep 2024 14:54:48 -0500 Subject: [PATCH] Run pre-commit on all files, not just python (#1880) ## By Submitting this PR I confirm: - I am familiar with the [Contributing Guidelines](https://github.com/nv-morpheus/Morpheus/blob/main/docs/source/developer_guide/contributing.md). - When the PR is ready for review, new or existing tests cover these changes. - When the PR is ready for review, the documentation is up to date with these changes. Authors: - Christopher Harris (https://github.com/cwharris) Approvers: - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah) - Michael Demoret (https://github.com/mdemoret-nv) URL: https://github.com/nv-morpheus/Morpheus/pull/1880 --- .pre-commit-config.yaml | 5 +---- pyproject.toml | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 890c82a115..54cdf40dcd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,8 +23,7 @@ repos: rev: 5.12.0 hooks: - id: isort - args: ["--settings-file=./pyproject.toml"] - files: ^python/ + args: ["--filter-files", "--settings-file=./pyproject.toml"] - repo: https://github.com/PyCQA/flake8 rev: 6.1.0 hooks: @@ -32,13 +31,11 @@ repos: entry: pflake8 additional_dependencies: [pyproject-flake8] args: ["--config=./pyproject.toml"] - files: ^python/ - repo: https://github.com/google/yapf rev: v0.40.2 hooks: - id: yapf args: ["--style", "./pyproject.toml"] - files: ^python/ default_language_version: python: python3 diff --git a/pyproject.toml b/pyproject.toml index c597d71c03..c5b01a7d3f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -731,6 +731,7 @@ default_section = "THIRDPARTY" sections= ["FUTURE", "STDLIB", "THIRDPARTY", "DASK", "RAPIDS", "FIRSTPARTY", "LOCALFOLDER"] skip= [ "__init__.py", + "__init__.pyi", # Skip _version.py as it is auto-generated "_version.py", ".eggs",