small fixes

This commit is contained in:
2021-01-17 19:05:53 +00:00
parent 163b61a630
commit df7facd7bd
5 changed files with 14 additions and 2 deletions

View File

@@ -1,3 +1,5 @@
{
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.pythonPath": "/usr/local/bin/python3"
}
}

View File

@@ -1,6 +1,6 @@
import yaml
from pytgbot.bot.sync import SyncBot
from pytgbot.bot.synchronous import SyncBot
from pytgbot.api_types.sendable.inline import (
InlineQueryResultArticle,
InputTextMessageContent,

View File

@@ -44,6 +44,7 @@ class UserManager(SaveFileMapping):
self.from_file()
def from_dict(self,d):
if not d: return
for k in d:
self[k]=User(**d[k])

8
dev.theia-workspace Normal file
View File

@@ -0,0 +1,8 @@
{
"folders": [
{
"path": ""
}
],
"settings": {}
}

View File

@@ -41,6 +41,7 @@ class SaveFileMapping(Mapping):
except FileNotFoundError as e:
with open(fn,'w') as f:
f.write("")
d={}
self.from_dict(d)
def __getitem__(self,key):