Use dict literal instead of dict() call

This commit is contained in:
Hugo Osvaldo Barrera 2023-01-30 17:39:14 +01:00 committed by Hugo
parent a41cf64b6c
commit dfc29db312

View file

@ -27,15 +27,15 @@ STATUS_DIR_PERMISSIONS = 0o700
class _StorageIndex:
def __init__(self):
self._storages = dict(
caldav="vdirsyncer.storage.dav.CalDAVStorage",
carddav="vdirsyncer.storage.dav.CardDAVStorage",
filesystem="vdirsyncer.storage.filesystem.FilesystemStorage",
http="vdirsyncer.storage.http.HttpStorage",
singlefile="vdirsyncer.storage.singlefile.SingleFileStorage",
google_calendar="vdirsyncer.storage.google.GoogleCalendarStorage",
google_contacts="vdirsyncer.storage.google.GoogleContactsStorage",
)
self._storages = {
"caldav": "vdirsyncer.storage.dav.CalDAVStorage",
"carddav": "vdirsyncer.storage.dav.CardDAVStorage",
"filesystem": "vdirsyncer.storage.filesystem.FilesystemStorage",
"http": "vdirsyncer.storage.http.HttpStorage",
"singlefile": "vdirsyncer.storage.singlefile.SingleFileStorage",
"google_calendar": "vdirsyncer.storage.google.GoogleCalendarStorage",
"google_contacts": "vdirsyncer.storage.google.GoogleContactsStorage",
}
def __getitem__(self, name):
item = self._storages[name]