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: class _StorageIndex:
def __init__(self): def __init__(self):
self._storages = dict( self._storages = {
caldav="vdirsyncer.storage.dav.CalDAVStorage", "caldav": "vdirsyncer.storage.dav.CalDAVStorage",
carddav="vdirsyncer.storage.dav.CardDAVStorage", "carddav": "vdirsyncer.storage.dav.CardDAVStorage",
filesystem="vdirsyncer.storage.filesystem.FilesystemStorage", "filesystem": "vdirsyncer.storage.filesystem.FilesystemStorage",
http="vdirsyncer.storage.http.HttpStorage", "http": "vdirsyncer.storage.http.HttpStorage",
singlefile="vdirsyncer.storage.singlefile.SingleFileStorage", "singlefile": "vdirsyncer.storage.singlefile.SingleFileStorage",
google_calendar="vdirsyncer.storage.google.GoogleCalendarStorage", "google_calendar": "vdirsyncer.storage.google.GoogleCalendarStorage",
google_contacts="vdirsyncer.storage.google.GoogleContactsStorage", "google_contacts": "vdirsyncer.storage.google.GoogleContactsStorage",
) }
def __getitem__(self, name): def __getitem__(self, name):
item = self._storages[name] item = self._storages[name]