Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Background Tasks (Python3) #5

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ info.plist


temp_*.py
.idea/
31 changes: 22 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
rev: v4.1.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-executables-have-shebangs

- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.1
rev: 3.9.2
hooks:
- id: flake8
additional_dependencies: [flake8-bugbear]
Expand All @@ -19,18 +19,31 @@ repos:
# - id: mypy
# exclude: extras|^docs/conf.py

- repo: https://github.com/prettier/prettier
rev: 1.19.1
hooks:
- id: prettier
args: [--prose-wrap=always, --print-width=88]
#
# - repo: https://github.com/prettier/prettier
# rev: 1.19.1
# hooks:
# - id: prettier#
## - repo: https://github.com/prettier/prettier
## rev: 1.19.1
## hooks:
## - id: prettier
## args: [--prose-wrap=always, --print-width=88]
# args: [--prose-wrap=always, --print-width=88]

- repo: https://github.com/pycqa/isort
rev: 5.5.2
rev: 5.10.1
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 19.3b0
rev: 22.3.0
hooks:
- id: black
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v0.942
# hooks:
# - id: mypy
# exclude: extras|^docs/conf.py|bin|tests
# types:
# - python
5 changes: 1 addition & 4 deletions workflow/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,7 @@ def _default_cachedir(self):
"""Alfred 2's default cache directory."""
return os.path.join(
os.path.expanduser(
"~/Library/Caches/com.runningwithcrayons.Alfred-2/" "Workflow Data/"
"~/Library/Caches/com.runningwithcrayons.Alfred/" "Workflow Data/"
),
self.bundleid,
)
Expand Down Expand Up @@ -1673,9 +1673,6 @@ def delete_paths(paths):
delete_paths((metadata_path, data_path))
return

if isinstance(data, str):
data = bytearray(data)

# Ensure write is not interrupted by SIGTERM
@uninterruptible
def _store():
Expand Down