src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Async/translations.py

Sat, 08 Jun 2024 15:25:29 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 08 Jun 2024 15:25:29 +0200
branch
eric7
changeset 10754
6faecb62f3a4
parent 10439
21c28b0f9e41
child 11090
f5f5f5803935
permissions
-rw-r--r--

Code Style Checker
- Updated these checkers.
- Miscellaneous to `flake8-bugbear v24.4.26`
- Logging to `flake8-logging v1.6.0`

# -*- coding: utf-8 -*-

# Copyright (c) 2023 - 2024 Detlev Offenbach <detlev@die-offenbachs.de>
#

"""
Module implementing message translations for the code style plugin messages
(async part).
"""

from PyQt6.QtCore import QCoreApplication

_asyncMessages = {
    "ASY100": QCoreApplication.translate(
        "AsyncChecker", "sync HTTP call in async function, use httpx.AsyncClient"
    ),
    "ASY101": QCoreApplication.translate(
        "AsyncChecker", "blocking sync call in async function, use framework equivalent"
    ),
    "ASY102": QCoreApplication.translate(
        "AsyncChecker", "sync process call in async function, use framework equivalent"
    ),
    "ASY103": QCoreApplication.translate(
        "AsyncChecker",
        "blocking sync context manager in async function,"
        " use 'async with' statement",
    ),
    "ASY104": QCoreApplication.translate(
        "AsyncChecker",
        "avoid using os.path, prefer using 'trio.Path' or 'anyio.Path' objects",
    ),
    "ASY105": QCoreApplication.translate(
        "AsyncChecker",
        "use of potentially dangerous class in async function, use"
        " httpx.AsyncClient",
    ),
}

_asyncMessageSampleArgs = {}

eric ide

mercurial