Mercurial > public > mercurial-scm > hg
comparison mercurial/pycompat.py @ 52752:4eede65d68cf
lint: add comments for disabling unused import warnings where appropriate
As mentioned in the previous commit, this doesn't actually placate `pyflakes`.
But it does cause PyCharm to not show the imports as greyed out, so presumably
it helps other IDEs too.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 06 Feb 2025 20:43:34 -0500 |
parents | 9db77d46de79 |
children |
comparison
equal
deleted
inserted
replaced
52751:38095e4e9046 | 52752:4eede65d68cf |
---|---|
9 """ | 9 """ |
10 | 10 |
11 from __future__ import annotations | 11 from __future__ import annotations |
12 | 12 |
13 import builtins | 13 import builtins |
14 import codecs | 14 import codecs # noqa: F401 (ignore imported but not used) |
15 import concurrent.futures as futures | 15 import concurrent.futures as futures # noqa: F401 (ignore imported but not used) |
16 import getopt | 16 import getopt |
17 import http.client as httplib | 17 import http.client as httplib # noqa: F401 (ignore imported but not used) |
18 import http.cookiejar as cookielib | 18 import http.cookiejar as cookielib # noqa: F401 (ignore imported but not used) |
19 import inspect | 19 import inspect |
20 import io | 20 import io # noqa: F401 (ignore imported but not used) |
21 import json | 21 import json |
22 import os | 22 import os |
23 import queue | 23 import queue # noqa: F401 (ignore imported but not used) |
24 import shlex | 24 import shlex |
25 import socketserver | 25 import socketserver # noqa: F401 (ignore imported but not used) |
26 import struct | 26 import struct |
27 import sys | 27 import sys |
28 import tempfile | 28 import tempfile |
29 import xmlrpc.client as xmlrpclib | 29 import xmlrpc.client as xmlrpclib # noqa: F401 (ignore imported but not used) |
30 | 30 |
31 from typing import ( | 31 from typing import ( |
32 Any, | 32 Any, |
33 AnyStr, | 33 AnyStr, |
34 BinaryIO, | 34 BinaryIO, |