From ab89d61b3e8826f94598484d9d50b9c3b60f3e74 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 12 Oct 2024 20:44:27 -0600 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate (#1569) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f295196121..2a8c65101d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ minimum_pre_commit_version: "3.2.0" repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-added-large-files - id: check-case-conflict @@ -35,7 +35,7 @@ repos: hooks: - id: isort - repo: https://github.com/psf/black-pre-commit-mirror - rev: 24.8.0 + rev: 24.10.0 hooks: - id: black - repo: https://github.com/Lucas-C/pre-commit-hooks From 09d0d043db728deec2ab7265918c784d5c909352 Mon Sep 17 00:00:00 2001 From: Nicholas Riley Date: Sat, 12 Oct 2024 22:44:52 -0400 Subject: [PATCH 2/2] Update more app.exe matching to work with both public and beta Talon. (#1573) --- apps/brave/brave.py | 4 ++-- apps/calibre/calibre.py | 6 +++--- apps/chrome/chrome.py | 4 ++-- apps/edge/edge.py | 4 ++-- apps/emacs/emacs.py | 4 ++-- apps/firefox/firefox.py | 4 ++-- apps/jetbrains/jetbrains.py | 10 +++++----- apps/notepad++/notepad++_win.py | 4 ++-- apps/okular/okular.py | 4 ++-- apps/opera/opera.py | 4 ++-- apps/slack/slack.py | 4 ++-- apps/thunderbird/thunderbird.py | 4 ++-- apps/vivaldi/vivaldi.py | 4 ++-- apps/vscode/vscode.py | 2 +- apps/windows_explorer/windows_explorer.py | 4 ++-- core/application_matches.py | 12 ++++++------ 16 files changed, 39 insertions(+), 39 deletions(-) diff --git a/apps/brave/brave.py b/apps/brave/brave.py index fbaf1d3ac7..b89a57df49 100644 --- a/apps/brave/brave.py +++ b/apps/brave/brave.py @@ -5,9 +5,9 @@ mod.apps.brave = "app.name: Brave Browser" mod.apps.brave = "app.name: Brave-browser" -mod.apps.brave = """ +mod.apps.brave = r""" os: windows -and app.exe: brave.exe +and app.exe: /^brave\.exe$/i os: linux and app.exe: brave os: mac diff --git a/apps/calibre/calibre.py b/apps/calibre/calibre.py index 099b4c85fb..effa60412e 100644 --- a/apps/calibre/calibre.py +++ b/apps/calibre/calibre.py @@ -2,15 +2,15 @@ # --- App definition --- mod = Module() -mod.apps.calibre = """ +mod.apps.calibre = r""" os: windows and app.name: calibre.exe os: windows -and app.exe: calibre.exe +and app.exe: /^calibre\.exe$/i os: windows and app.name: calibre-parallel.exe os: windows -and app.exe: calibre-parallel.exe +and app.exe: /^calibre-parallel\.exe$/i """ mod.apps.calibre = """ os: linux diff --git a/apps/chrome/chrome.py b/apps/chrome/chrome.py index 30da330c2d..5a429a4030 100644 --- a/apps/chrome/chrome.py +++ b/apps/chrome/chrome.py @@ -4,9 +4,9 @@ mod = Module() mod.apps.chrome = "app.name: Google Chrome" -mod.apps.chrome = """ +mod.apps.chrome = r""" os: windows -and app.exe: chrome.exe +and app.exe: /^chrome\.exe$/i """ mod.apps.chrome = """ os: mac diff --git a/apps/edge/edge.py b/apps/edge/edge.py index c4a3be41ae..a7f72f140b 100644 --- a/apps/edge/edge.py +++ b/apps/edge/edge.py @@ -3,13 +3,13 @@ mod = Module() ctx = Context() -mod.apps.microsoft_edge = """ +mod.apps.microsoft_edge = r""" os: windows and app.name: msedge.exe os: windows and app.name: Microsoft Edge os: windows -and app.exe: msedge.exe +and app.exe: /^msedge\.exe$/i os: mac and app.bundle: com.microsoft.edgemac os: linux diff --git a/apps/emacs/emacs.py b/apps/emacs/emacs.py index 8c47b13b35..9488db5728 100644 --- a/apps/emacs/emacs.py +++ b/apps/emacs/emacs.py @@ -18,9 +18,9 @@ os: mac app.bundle: org.gnu.Emacs """ -mod.apps.emacs = """ +mod.apps.emacs = r""" os: windows -app.exe: emacs.exe +app.exe: /^emacs\.exe$/i """ ctx = Context() diff --git a/apps/firefox/firefox.py b/apps/firefox/firefox.py index 109412efad..92dac919f5 100644 --- a/apps/firefox/firefox.py +++ b/apps/firefox/firefox.py @@ -10,11 +10,11 @@ apps.firefox = "app.name: firefox-esr" apps.firefox = "app.name: LibreWolf" apps.firefox = "app.name: waterfox" -apps.firefox = """ +apps.firefox = r""" os: windows and app.name: Firefox os: windows -and app.exe: firefox.exe +and app.exe: /^firefox\.exe$/i """ apps.firefox = """ os: mac diff --git a/apps/jetbrains/jetbrains.py b/apps/jetbrains/jetbrains.py index f59aaae8ea..e433e76663 100644 --- a/apps/jetbrains/jetbrains.py +++ b/apps/jetbrains/jetbrains.py @@ -127,20 +127,20 @@ def idea_commands(commands): and app.bundle: com.google.android.studio """ # windows -mod.apps.jetbrains = "app.exe: idea64.exe" -mod.apps.jetbrains = "app.exe: /^PyCharm64\.exe$/i" -mod.apps.jetbrains = "app.exe: webstorm64.exe" +mod.apps.jetbrains = r"app.exe: /^idea64\.exe$/i" +mod.apps.jetbrains = r"app.exe: /^PyCharm64\.exe$/i" +mod.apps.jetbrains = r"app.exe: /^webstorm64\.exe$/i" mod.apps.jetbrains = """ os: mac and app.bundle: com.jetbrains.pycharm os: mac and app.bundle: com.jetbrains.rider """ -mod.apps.jetbrains = """ +mod.apps.jetbrains = r""" os: windows and app.name: JetBrains Rider os: windows -and app.exe: rider64.exe +and app.exe: /^rider64\.exe$/i """ diff --git a/apps/notepad++/notepad++_win.py b/apps/notepad++/notepad++_win.py index 0a009ee856..78aa4d42c0 100644 --- a/apps/notepad++/notepad++_win.py +++ b/apps/notepad++/notepad++_win.py @@ -4,13 +4,13 @@ ctx = Context() apps = mod.apps -apps.notepad_plus_plus = """ +apps.notepad_plus_plus = r""" os: windows and app.name: Notepad++ : a free (GNU) source code editor os: windows and app.name: Notepad++ : a free (GPL) source code editor os: windows -and app.exe: notepad++.exe +and app.exe: /^notepad\+\+\.exe$/i """ ctx.matches = r""" diff --git a/apps/okular/okular.py b/apps/okular/okular.py index 1f6d230ec1..d4d21c82e7 100644 --- a/apps/okular/okular.py +++ b/apps/okular/okular.py @@ -2,11 +2,11 @@ # --- App definition --- mod = Module() -mod.apps.okular = """ +mod.apps.okular = r""" os: windows and app.name: okular.exe os: windows -and app.exe: okular.exe +and app.exe: /^okular\.exe$/i """ mod.apps.okular = """ os: linux diff --git a/apps/opera/opera.py b/apps/opera/opera.py index 7250ac7d98..860d4218bc 100644 --- a/apps/opera/opera.py +++ b/apps/opera/opera.py @@ -8,9 +8,9 @@ os: mac and app.bundle: com.operasoftware.Opera """ -apps.opera = """ +apps.opera = r""" os: windows -and app.exe: opera.exe +and app.exe: /^opera\.exe$/i """ apps.opera = """ os: linux diff --git a/apps/slack/slack.py b/apps/slack/slack.py index 2c5bf439ae..7fd57ca41e 100644 --- a/apps/slack/slack.py +++ b/apps/slack/slack.py @@ -4,11 +4,11 @@ mod = Module() apps = mod.apps apps.slack = "app.name: Slack" -mod.apps.slack = """ +mod.apps.slack = r""" os: windows and app.name: Slack os: windows -and app.exe: slack.exe +and app.exe: /^slack\.exe$/i """ apps.slack = """ os: mac diff --git a/apps/thunderbird/thunderbird.py b/apps/thunderbird/thunderbird.py index ce5c814e15..289b728399 100644 --- a/apps/thunderbird/thunderbird.py +++ b/apps/thunderbird/thunderbird.py @@ -3,11 +3,11 @@ # --- App definitions --- # Main app TODO: mac context mod = Module() -mod.apps.thunderbird = """ +mod.apps.thunderbird = r""" os: windows and app.name: Thunderbird os: windows -and app.exe: thunderbird.exe +and app.exe: /^thunderbird\.exe$/i """ mod.apps.thunderbird = """ os: linux diff --git a/apps/vivaldi/vivaldi.py b/apps/vivaldi/vivaldi.py index 16cd7163c0..61b9400ce6 100644 --- a/apps/vivaldi/vivaldi.py +++ b/apps/vivaldi/vivaldi.py @@ -5,9 +5,9 @@ mod.apps.vivaldi = "app.name: Vivaldi" mod.apps.vivaldi = "app.name: Vivaldi-stable" -mod.apps.vivaldi = """ +mod.apps.vivaldi = r""" os: windows -and app.exe: vivaldi.exe +and app.exe: /^vivaldi\.exe$/i os: linux and app.exe: vivaldi-bin os: mac diff --git a/apps/vscode/vscode.py b/apps/vscode/vscode.py index 3d9b612051..c56612755a 100644 --- a/apps/vscode/vscode.py +++ b/apps/vscode/vscode.py @@ -47,7 +47,7 @@ os: windows and app.name: Azure Data Studio os: windows -and app.exe: azuredatastudio.exe +and app.exe: /^azuredatastudio\.exe$/i """ ctx.matches = r""" diff --git a/apps/windows_explorer/windows_explorer.py b/apps/windows_explorer/windows_explorer.py index 1943d6d28d..88cd59b5c9 100644 --- a/apps/windows_explorer/windows_explorer.py +++ b/apps/windows_explorer/windows_explorer.py @@ -5,13 +5,13 @@ mod = Module() apps = mod.apps -apps.windows_explorer = """ +apps.windows_explorer = r""" os: windows and app.name: Windows Explorer os: windows and app.name: Windows-Explorer os: windows -and app.exe: /explorer.exe/i +and app.exe: /^explorer\.exe$/i """ # many commands should work in most save/open dialog. diff --git a/core/application_matches.py b/core/application_matches.py index f68385180a..9c524b6353 100644 --- a/core/application_matches.py +++ b/core/application_matches.py @@ -54,21 +54,21 @@ and app.name: /termite/ """ -apps.windows_command_processor = """ +apps.windows_command_processor = r""" os: windows and app.name: Windows Command Processor os: windows -and app.exe: cmd.exe +and app.exe: /^cmd\.exe$/i """ -apps.windows_terminal = """ +apps.windows_terminal = r""" os: windows -and app.exe: WindowsTerminal.exe +and app.exe: /^windowsterminal\.exe$/i """ -mod.apps.windows_power_shell = """ +mod.apps.windows_power_shell = r""" os: windows -and app.exe: powershell.exe +and app.exe: /^powershell\.exe$/i """ apps.vim = """