-
Notifications
You must be signed in to change notification settings - Fork 963
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Assorted backend fixes/cleanup (#1432)
* Suppress: Possible hardcoded password (bandit B105) * Fix: Redefinition of unused `on_action` (Ruff F811) * Use `importlib.util.find_spec` to check if a package is installed * Raise from Exception * Fixed undefined variable * Fixed error message --------- Authored-by: EWouters <6179932+EWouters@users.noreply.github.com>
- Loading branch information
Showing
11 changed files
with
27 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
try: | ||
import discord | ||
except ModuleNotFoundError: | ||
import importlib.util | ||
|
||
if importlib.util.find_spec("discord") is None: | ||
raise ValueError( | ||
"The discord package is required to integrate Chainlit with a Slack app. Run `pip install discord --upgrade`" | ||
"The discord package is required to integrate Chainlit with a Discord app. Run `pip install discord --upgrade`" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
try: | ||
import slack_bolt | ||
except ModuleNotFoundError: | ||
import importlib.util | ||
|
||
if importlib.util.find_spec("slack_bolt") is None: | ||
raise ValueError( | ||
"The slack_bolt package is required to integrate Chainlit with a Slack app. Run `pip install slack_bolt --upgrade`" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
try: | ||
import botbuilder | ||
except ModuleNotFoundError: | ||
import importlib.util | ||
|
||
if importlib.util.find_spec("botbuilder") is None: | ||
raise ValueError( | ||
"The botbuilder-core package is required to integrate Chainlit with a Slack app. Run `pip install botbuilder-core --upgrade`" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters