From e923d3f7c54106429df293e92300144ffe8cd653 Mon Sep 17 00:00:00 2001 From: Alex Hughes Date: Thu, 5 May 2022 16:15:59 -0700 Subject: [PATCH 1/2] Update open folder logic for FileInputWidget If you have passed in a path you expect to exist but the sept template file doesn't exist on disk, previously we would fallback to opening your cwd however we have now added one additional check in there. If you don't have the _disk_path on disk but you do have it's containing folder, we will open the containing folder even though the exact sept template file doesn't exist within it. --- sept_qt/file_input_widget.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sept_qt/file_input_widget.py b/sept_qt/file_input_widget.py index 892b0ad..6a2640c 100644 --- a/sept_qt/file_input_widget.py +++ b/sept_qt/file_input_widget.py @@ -134,6 +134,9 @@ def _get_folder_path(self): elif os.path.isdir(self._disk_path): if os.path.exists(self._disk_path): path = self._disk_path + elif os.path.isdir(os.path.dirname(self._disk_path)): + if os.path.exists(os.path.dirname(self._disk_path)): + path = os.path.dirname(self._disk_path) return path @QtCore.Slot() From 8aeaa4eb8943c886d8251a36a5c0ef01d6becfa8 Mon Sep 17 00:00:00 2001 From: Alex Hughes Date: Thu, 5 May 2022 16:22:34 -0700 Subject: [PATCH 2/2] Update the checkout action to v3.x.x to fix #17 Thanks to @Ale0x78 for pointing this out to me! Update the black-action --- .github/workflows/code-format.yml | 5 +++-- .github/workflows/publish-to-pypi.yml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/code-format.yml b/.github/workflows/code-format.yml index bd48287..8443b41 100644 --- a/.github/workflows/code-format.yml +++ b/.github/workflows/code-format.yml @@ -6,9 +6,10 @@ jobs: pr-lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3.0.2 name: Checkout - - uses: Ahuge/black-action@v1.0.3 + + - uses: Ahuge/black-action@v1.0.6 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BLACK_ARGS: "." diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 7360b80..0c4c149 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -17,7 +17,7 @@ jobs: RELEASE_BODY=$(jq --raw-output '.release.body' $GITHUB_EVENT_PATH); echo ::set-output name=upload-url::https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets echo ::set-output name=release-body::${RELEASE_BODY} - - uses: actions/checkout@v2 + - uses: actions/checkout@v3.0.2 name: Checkout - name: Setup python 2 uses: actions/setup-python@v2