9 """ |
9 """ |
10 |
10 |
11 from PyQt6.QtCore import QCoreApplication |
11 from PyQt6.QtCore import QCoreApplication |
12 |
12 |
13 _asyncMessages = { |
13 _asyncMessages = { |
14 "ASY100": QCoreApplication.translate( |
14 "ASY-100": QCoreApplication.translate( |
15 "AsyncChecker", "sync HTTP call in async function, use httpx.AsyncClient" |
15 "AsyncChecker", "sync HTTP call in async function, use httpx.AsyncClient" |
16 ), |
16 ), |
17 "ASY101": QCoreApplication.translate( |
17 "ASY-101": QCoreApplication.translate( |
18 "AsyncChecker", "blocking sync call in async function, use framework equivalent" |
18 "AsyncChecker", "blocking sync call in async function, use framework equivalent" |
19 ), |
19 ), |
20 "ASY102": QCoreApplication.translate( |
20 "ASY-102": QCoreApplication.translate( |
21 "AsyncChecker", "sync process call in async function, use framework equivalent" |
21 "AsyncChecker", "sync process call in async function, use framework equivalent" |
22 ), |
22 ), |
23 "ASY103": QCoreApplication.translate( |
23 "ASY-103": QCoreApplication.translate( |
24 "AsyncChecker", |
24 "AsyncChecker", |
25 "blocking sync context manager in async function," |
25 "blocking sync context manager in async function," |
26 " use 'async with' statement", |
26 " use 'async with' statement", |
27 ), |
27 ), |
28 "ASY104": QCoreApplication.translate( |
28 "ASY-104": QCoreApplication.translate( |
29 "AsyncChecker", |
29 "AsyncChecker", |
30 "avoid using os.path, prefer using 'trio.Path' or 'anyio.Path' objects", |
30 "avoid using os.path, prefer using 'trio.Path' or 'anyio.Path' objects", |
31 ), |
31 ), |
32 "ASY105": QCoreApplication.translate( |
32 "ASY-105": QCoreApplication.translate( |
33 "AsyncChecker", |
33 "AsyncChecker", |
34 "use of potentially dangerous class in async function, use" |
34 "use of potentially dangerous class in async function, use" |
35 " httpx.AsyncClient", |
35 " httpx.AsyncClient", |
36 ), |
36 ), |
37 } |
37 } |