small fixes
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
{
|
||||
"python.linting.pylintEnabled": true,
|
||||
"python.linting.enabled": true,
|
||||
"python.pythonPath": "/usr/local/bin/python3"
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
@@ -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
8
dev.theia-workspace
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": ""
|
||||
}
|
||||
],
|
||||
"settings": {}
|
||||
}
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user