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

branch
eric7
changeset 10116
4a619fb7bd09
child 10372
1444b4bee64b
equal deleted inserted replaced
10115:8ca3f08c5ac8 10116:4a619fb7bd09
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2023 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing message translations for the code style plugin messages
8 (async part).
9 """
10
11 from PyQt6.QtCore import QCoreApplication
12
13 _asyncMessages = {
14 "ASY100": QCoreApplication.translate(
15 "AsyncChecker", "sync HTTP call in async function, use httpx.AsyncClient"
16 ),
17 "ASY101": QCoreApplication.translate(
18 "AsyncChecker", "blocking sync call in async function, use framework equivalent"
19 ),
20 "ASY102": QCoreApplication.translate(
21 "AsyncChecker", "sync process call in async function, use framework equivalent"
22 ),
23 "ASY103": QCoreApplication.translate(
24 "AsyncChecker",
25 "blocking sync context manager in async function,"
26 " use 'async with' statement",
27 ),
28 "ASY104": QCoreApplication.translate(
29 "AsyncChecker",
30 "avoid using os.path, prefer using 'trio.Path' or 'anyio.Path'" " objects",
31 ),
32 "ASY105": QCoreApplication.translate(
33 "AsyncChecker",
34 "use of potentially dangerous class in async function, use"
35 " httpx.AsyncClient",
36 ),
37 }
38
39 _asyncMessageSampleArgs = {}

eric ide

mercurial