tests: ignore unused imports warnings in `mercurial.interfaces.types`
authorMatt Harbison <matt_harbison@yahoo.com>
Thu, 06 Feb 2025 20:37:22 -0500
changeset 52751 38095e4e9046
parent 52750 2a5450ecde20
child 52752 4eede65d68cf
tests: ignore unused imports warnings in `mercurial.interfaces.types` Supposedly, a `# noqa: F401` should be enough to ignore this warning. PyCharm is happy with the comment, but `pyflakes` ignores that. Since there's already precedent for filtering this out manually, apply that here too. The imports are done on purpose for use elsewhere in the codebase.
tests/filterpyflakes.py
tests/test-check-pyflakes.t
--- a/tests/filterpyflakes.py	Thu Feb 06 15:24:58 2025 -0500
+++ b/tests/filterpyflakes.py	Thu Feb 06 20:37:22 2025 -0500
@@ -15,6 +15,7 @@
         # for cffi, allow re-exports from pure.*
         r"cffi/[^:]*:.*\bimport \*' used",
         r"cffi/[^:]*:.*\*' imported but unused",
+        r"mercurial/interfaces/types.py:.+' imported but unused",
     ]
 
     keep = True
--- a/tests/test-check-pyflakes.t	Thu Feb 06 15:24:58 2025 -0500
+++ b/tests/test-check-pyflakes.t	Thu Feb 06 20:37:22 2025 -0500
@@ -20,9 +20,6 @@
   > 2>/dev/null \
   > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
   contrib/perf.py:*:* undefined name 'xrange' (glob) (?)
-  mercurial/interfaces/types.py:*:*: '._basetypes.FsPathT' imported but unused (glob)
-  mercurial/interfaces/types.py:*:*: '._basetypes.HgPathT' imported but unused (glob)
-  mercurial/interfaces/types.py:*:*: '._basetypes.UserMsgT' imported but unused (glob)
   mercurial/pycompat.py:*:* 'codecs' imported but unused (glob)
   mercurial/pycompat.py:*:* 'concurrent.futures' imported but unused (glob)
   mercurial/pycompat.py:*:* 'http.client as httplib' imported but unused (glob)