diff --git a/.github/workflows/autoformat.yaml b/.github/workflows/autoformat.yaml index 951f602..7cc1edf 100644 --- a/.github/workflows/autoformat.yaml +++ b/.github/workflows/autoformat.yaml @@ -15,6 +15,13 @@ jobs: runs-on: ubuntu-latest steps: + - name: Generate token + id: generate_token + uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 + with: + app_id: ${{ secrets.BOT_APP_ID }} + private_key: ${{ secrets.BOT_APP_PRIVATE_KEY }} + - uses: xt0rted/pull-request-comment-branch@v2 id: comment-branch @@ -22,6 +29,7 @@ jobs: if: success() with: ref: ${{ steps.comment-branch.outputs.head_ref }} + persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token. - name: Lint with black uses: psf/black@stable @@ -30,13 +38,6 @@ jobs: src: "." jupyter: true - - name: Generate token - id: generate_token - uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 - with: - app_id: ${{ secrets.BOT_APP_ID }} - private_key: ${{ secrets.BOT_APP_PRIVATE_KEY }} - - name: Commit changes uses: stefanzweifel/git-auto-commit-action@v5 with: diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index a8798e3..ca71277 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -9,7 +9,7 @@ on: - main jobs: - lint: + black: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/ereg/functional.py b/ereg/functional.py index a115ebe..5469e27 100644 --- a/ereg/functional.py +++ b/ereg/functional.py @@ -29,7 +29,7 @@ def registration_function( float: The structural similarity index. """ if isinstance(config_file, str): - assert os.path.isfile(config_file), 'Config file does not exist.' + assert os.path.isfile(config_file), "Config file does not exist." elif isinstance(config_file, dict): pass else: