mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
fix "module not found" errors when importing Python code from script-resources
This commit is contained in:
parent
5ebbadb45d
commit
a90b41a8cc
3 changed files with 10 additions and 4 deletions
8
pyrightconfig.json
Normal file
8
pyrightconfig.json
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"executionEnvironments": [
|
||||||
|
{
|
||||||
|
"root": "scripts",
|
||||||
|
"extraPaths": ["script-resources"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -8,8 +8,7 @@ import urllib.parse
|
||||||
import urllib.request
|
import urllib.request
|
||||||
|
|
||||||
sys.path.insert(1, os.path.join(os.path.dirname(__file__), "..", "script-resources"))
|
sys.path.insert(1, os.path.join(os.path.dirname(__file__), "..", "script-resources"))
|
||||||
|
import common_script_utils
|
||||||
import common_script_utils # noqa: E402
|
|
||||||
|
|
||||||
|
|
||||||
DEFAULT_REGISTRY_DUMP_URL = "https://stronghold.crosscode.ru/~ccbot/emote-registry.json"
|
DEFAULT_REGISTRY_DUMP_URL = "https://stronghold.crosscode.ru/~ccbot/emote-registry.json"
|
||||||
|
|
|
@ -17,8 +17,7 @@ import sqlite3
|
||||||
import collections
|
import collections
|
||||||
|
|
||||||
sys.path.insert(1, os.path.join(os.path.dirname(__file__), "..", "script-resources"))
|
sys.path.insert(1, os.path.join(os.path.dirname(__file__), "..", "script-resources"))
|
||||||
|
import common_script_utils
|
||||||
import common_script_utils # noqa: E402
|
|
||||||
|
|
||||||
|
|
||||||
if sys.platform == "darwin":
|
if sys.platform == "darwin":
|
||||||
|
|
Loading…
Reference in a new issue