fix "module not found" errors when importing Python code from script-resources

This commit is contained in:
Dmytro Meleshko 2021-04-02 21:50:17 +03:00
parent 5ebbadb45d
commit a90b41a8cc
3 changed files with 10 additions and 4 deletions

8
pyrightconfig.json Normal file
View file

@ -0,0 +1,8 @@
{
"executionEnvironments": [
{
"root": "scripts",
"extraPaths": ["script-resources"]
}
]
}

View file

@ -8,8 +8,7 @@ import urllib.parse
import urllib.request
sys.path.insert(1, os.path.join(os.path.dirname(__file__), "..", "script-resources"))
import common_script_utils # noqa: E402
import common_script_utils
DEFAULT_REGISTRY_DUMP_URL = "https://stronghold.crosscode.ru/~ccbot/emote-registry.json"

View file

@ -17,8 +17,7 @@ import sqlite3
import collections
sys.path.insert(1, os.path.join(os.path.dirname(__file__), "..", "script-resources"))
import common_script_utils # noqa: E402
import common_script_utils
if sys.platform == "darwin":