Commit 016f1dc3 authored by n0toose's avatar n0toose
Browse files

Apply changes from the Black code formatter

The contents of this commit were generated automatically and tested.
parent d9ba1dc4
Loading
Loading
Loading
Loading
+15 −11
Original line number Diff line number Diff line
@@ -13,36 +13,40 @@ import aiosqlite


async def search_file_in_db(cursor: aiosqlite.Cursor, filename: str):
    return await (await cursor.execute(
        '''SELECT binary, binary_id, sig, sig_id FROM tor_releases WHERE (
    return await (
        await cursor.execute(
            """SELECT binary, binary_id, sig, sig_id FROM tor_releases WHERE (
             binary = ?
        );''',
        (filename,)
    )).fetchone()
        );""",
            (filename,),
        )
    ).fetchone()


async def create_empty_db(cursor: aiosqlite.Cursor, connection: aiosqlite.Connection):
    await cursor.execute(
        '''CREATE TABLE IF NOT EXISTS tor_releases (
        """CREATE TABLE IF NOT EXISTS tor_releases (
            binary TEXT, binary_id INTEGER, sig TEXT, sig_id INTEGER,
            UNIQUE(binary, binary_id, sig, sig_id)
        );'''
        );"""
    )

    return await connection.commit()


async def insert_new_release(
    cursor: aiosqlite.Cursor,
    connection: aiosqlite.Connection,
    name1: str,
    id1: int,
    name2: str,
    id2: int
    id2: int,
):
    await cursor.execute(
        '''INSERT INTO tor_releases VALUES (
        """INSERT INTO tor_releases VALUES (
             ?, ?, ?, ?
        );''',
        (name1, id1, name2, id2)
        );""",
        (name1, id1, name2, id2),
    )

    return await connection.commit()
+44 −44
Original line number Diff line number Diff line
@@ -10,51 +10,51 @@
#

platforms = {
    'linux32': 'Linux 32-bit',
    'linux64': 'Linux 64-bit',
    'macos': 'macOS',
    'win32': 'Windows 32-bit',
    'win64': 'Windows 64-bit',
    "linux32": "Linux 32-bit",
    "linux64": "Linux 64-bit",
    "macos": "macOS",
    "win32": "Windows 32-bit",
    "win64": "Windows 64-bit",
}

locales = {
    'en': 'English',
    'en-us': 'English', # USA deliberately removed for UX purposes
    'en-uk': 'English UK',
    'ar': 'عربية',
    'ca': 'Català',
    'cs': 'česky',
    'da': 'Dansk',
    'de': 'Deutsch',
    'el': 'Ελληνικά',
    'es': 'Español',
    'es-es': 'Español',
    'es-ar': 'Español Arg.',
    'fa': 'فارسی',
    'fr': 'Français',
    'ga-ie': 'Gaeilge',
    'he': 'עברית',
    'hu': 'Magyar nyelv',
    'id': 'Indonesia',
    'is': 'Islenska',
    'it': 'Italiano',
    'ja': '日本語',
    'ka': 'ქართული ენა',
    'ko': '한국어',
    'lt': 'lietuvių kalba',
    'mk': 'македонски',
    'ms': 'بهاس ملايو',
    'my': 'မြန်မာစာ',
    'nb-no': 'Norsk Bokmål',
    'nl': 'Nederlands',
    'pl': 'Polszczyzna',
    'pt-br': 'Português Brasil',
    'ro': 'Română',
    'ru': 'Русский',
    'sv-se': 'Svenska',
    'th': 'ภาษาไทย',
    'tr': 'Türkçe',
    'vi': 'Tiếng Việt',
    'zh-cn': '简体中文',
    'zh-tw': '正體字',
    "en": "English",
    "en-us": "English",  # USA deliberately removed for UX purposes
    "en-uk": "English UK",
    "ar": "عربية",
    "ca": "Català",
    "cs": "česky",
    "da": "Dansk",
    "de": "Deutsch",
    "el": "Ελληνικά",
    "es": "Español",
    "es-es": "Español",
    "es-ar": "Español Arg.",
    "fa": "فارسی",
    "fr": "Français",
    "ga-ie": "Gaeilge",
    "he": "עברית",
    "hu": "Magyar nyelv",
    "id": "Indonesia",
    "is": "Islenska",
    "it": "Italiano",
    "ja": "日本語",
    "ka": "ქართული ენა",
    "ko": "한국어",
    "lt": "lietuvių kalba",
    "mk": "македонски",
    "ms": "بهاس ملايو",
    "my": "မြန်မာစာ",
    "nb-no": "Norsk Bokmål",
    "nl": "Nederlands",
    "pl": "Polszczyzna",
    "pt-br": "Português Brasil",
    "ro": "Română",
    "ru": "Русский",
    "sv-se": "Svenska",
    "th": "ภาษาไทย",
    "tr": "Türkçe",
    "vi": "Tiếng Việt",
    "zh-cn": "简体中文",
    "zh-tw": "正體字",
}