From 712fb35b16c71a5baab489559196be8aa5118fd0 Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Mon, 11 Nov 2024 21:48:44 +0000 Subject: [PATCH] extended linting --- .cruft.json | 4 ++-- .github/workflows/label_sync.yml | 23 +++++++++++++++++++++++ .pre-commit-config.yaml | 2 +- .ruff.toml | 16 ++++++++++++++++ 4 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/label_sync.yml diff --git a/.cruft.json b/.cruft.json index e000075..b12f029 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/sunpy/package-template", - "commit": "51fb616094a4d7577c8898445aa50effb89afa31", + "commit": "75f84c4adf1753af67967930c3335bc73bca9bf5", "checkout": null, "context": { "cookiecutter": { @@ -16,7 +16,7 @@ "enable_dynamic_dev_versions": "y", "include_example_code": "n", "include_cruft_update_github_workflow": "y", - "use_extended_ruff_linting": "n", + "use_extended_ruff_linting": "y", "_sphinx_theme": "sunpy", "_parent_project": "", "_install_requires": "", diff --git a/.github/workflows/label_sync.yml b/.github/workflows/label_sync.yml new file mode 100644 index 0000000..7f21775 --- /dev/null +++ b/.github/workflows/label_sync.yml @@ -0,0 +1,23 @@ +name: Label Sync +on: + workflow_dispatch: + schedule: + # ┌───────── minute (0 - 59) + # │ ┌───────── hour (0 - 23) + # │ │ ┌───────── day of the month (1 - 31) + # │ │ │ ┌───────── month (1 - 12 or JAN-DEC) + # │ │ │ │ ┌───────── day of the week (0 - 6 or SUN-SAT) + - cron: '0 0 * * *' # run every day at midnight UTC + +# Give permissions to write issue labels +permissions: + issues: write + +jobs: + label_sync: + runs-on: ubuntu-latest + name: Label Sync + steps: + - uses: srealmoreno/label-sync-action@850ba5cef2b25e56c6c420c4feed0319294682fd + with: + config-file: https://raw.githubusercontent.com/sunpy/.github/main/labels.yml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2a863bb..ec8b80a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.7.1" + rev: "v0.7.2" hooks: - id: ruff args: ['--fix', '--unsafe-fixes'] diff --git a/.ruff.toml b/.ruff.toml index 7b8bc8c..30318d3 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -14,6 +14,22 @@ select = [ "W", "UP", "PT", + "BLE", + "A", + "C4", + "INP", + "PIE", + "T20", + "RET", + "TID", + "PTH", + "PD", + "PLC", + "PLE", + "FLY", + "NPY", + "PERF", + "RUF", ] extend-ignore = [ # pycodestyle (E, W)