We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 774ba14 commit e48f9acCopy full SHA for e48f9ac
examples/configloader.py
@@ -1,8 +1,8 @@
1
import shutil
2
import sys
3
import os.path
4
-import yaml
5
import pathlib
+import yaml
6
7
8
def default_config_path():
@@ -31,7 +31,7 @@ def default_config_path():
31
if not os.path.exists(path):
32
os.makedirs(path)
33
else:
34
- raise RuntimeError("Operating sytem not supported")
+ raise RuntimeError("Operating system not supported")
35
36
return path
37
@@ -51,7 +51,7 @@ def load_config(path):
51
Then it opens the specified config file and returns all keys which include token and UserId.
52
"""
53
# opens specified file to retrieve config tokens
54
- if isinstance(path, str) or isinstance(path, pathlib.Path):
+ if isinstance(path, (pathlib.Path, str)):
55
assert path
56
with open(f"{path}", 'r') as stream:
57
data = yaml.safe_load(stream)
0 commit comments