Skip to content

Commit

Permalink
Ruff: Address migrations, reduce redundancy, and remove Flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
Maffooch committed Jul 2, 2024
1 parent b8fa7a4 commit 4e76c45
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 58 deletions.
2 changes: 1 addition & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dependencyDashboardApproval": false,
"baseBranches": ["dev"],
"rebaseWhen": "conflicted",
"ignorePaths": ["requirements.txt", "components/package.json", "components/package-lock.json", "dojo/components/yarn.lock", "dojo/components/package.json", "Dockerfile**"],
"ignorePaths": ["requirements.txt", "requirements-lint.txt", "components/package.json", "components/package-lock.json", "dojo/components/yarn.lock", "dojo/components/package.json", "Dockerfile**"],
"packageRules": [{
"packagePatterns": ["*"],
"commitMessageExtra": "from {{currentVersion}} to {{#if isMajor}}v{{{newMajor}}}{{else}}{{#if isSingleVersion}}v{{{toVersion}}}{{else}}{{{newValue}}}{{/if}}{{/if}}",
Expand Down
36 changes: 0 additions & 36 deletions .github/workflows/flake8.yml

This file was deleted.

20 changes: 1 addition & 19 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,13 @@ name: Ruff Linter

on:
workflow_dispatch:
pull_request_target:
push:

pull_request:
jobs:
ruff-linting:
runs-on: ubuntu-latest
steps:
- name: Checkout
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
uses: actions/checkout@v4
# by default the pull_requst_target event checks out the base branch, i.e. dev
# so we need to explicitly checkout the head of the PR
# we use fetch-depth 0 to make sure the full history is checked out and we can compare against
# the base commit (branch) of the PR
# more info https://github.community/t/github-actions-are-severely-limited-on-prs/18179/16
# we checkout merge_commit here as this contains all new code from dev also. we don't need to compare against base_commit
with:
persist-credentials: false
fetch-depth: 0
ref: refs/pull/${{ github.event.pull_request.number }}/merge
# repository: ${{github.event.pull_request.head.repo.full_name}}

- name: Checkout
# for non PR runs we just checkout the default, which is a sha on a branch probably
if: github.event_name != 'pull_request' && github.event_name != 'pull_request_target'
uses: actions/checkout@v4

- name: Install Ruff Linter
Expand Down
3 changes: 1 addition & 2 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ select = [
"UP",
"YTT",
"ASYNC",
"EXE",
"TRIO",
"S2", "S5", "S7",
"C4",
"DJ003", "DJ012", "DJ013",
"EM",
Expand Down

0 comments on commit 4e76c45

Please sign in to comment.