From 578c994c67e5a48e63676e691429677b611f8c2b Mon Sep 17 00:00:00 2001 From: Alasdair Gray Date: Wed, 20 Aug 2025 15:50:31 -0400 Subject: [PATCH 1/2] Test ruff formatting and linting --- .github/workflows/format-and-lint.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/format-and-lint.yaml diff --git a/.github/workflows/format-and-lint.yaml b/.github/workflows/format-and-lint.yaml new file mode 100644 index 00000000..5607a79c --- /dev/null +++ b/.github/workflows/format-and-lint.yaml @@ -0,0 +1,12 @@ +name: Format and Lint + +on: + push: + branches: [main] + tags: + - v*.*.* + pull_request: + +jobs: + pre-commit: + uses: mdolab/.github/.github/workflows/format-and-lint.yaml@ruffConfig From 6c836304db5f390ac31b34ada410ea4d743ad385 Mon Sep 17 00:00:00 2001 From: Alasdair Gray Date: Wed, 20 Aug 2025 16:51:47 -0400 Subject: [PATCH 2/2] Convert local flake8 config to ruff --- ruff.toml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 ruff.toml diff --git a/ruff.toml b/ruff.toml new file mode 100644 index 00000000..adc8a554 --- /dev/null +++ b/ruff.toml @@ -0,0 +1,2 @@ +# OptView and related files need to be fixed eventually +extend-exclude = [ "pyoptsparse/postprocessing/**" ]