changeset 52382:d4e30c15626d

typing: add missing `from __future__ import annotations` to core modules
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 29 Nov 2024 19:18:33 -0500
parents 662b08ac9869
children 9042ffea4edd
files mercurial/cmd_impls/graft.py mercurial/testing/ps_util.py tests/test-check-module-imports.t
diffstat 3 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmd_impls/graft.py	Fri Nov 29 19:11:30 2024 -0500
+++ b/mercurial/cmd_impls/graft.py	Fri Nov 29 19:18:33 2024 -0500
@@ -1,5 +1,7 @@
 # graft.py - implementation of the graft command
 
+from __future__ import annotations
+
 from ..i18n import _
 
 from .. import cmdutil, error, logcmdutil, merge as mergemod, state as statemod
--- a/mercurial/testing/ps_util.py	Fri Nov 29 19:11:30 2024 -0500
+++ b/mercurial/testing/ps_util.py	Fri Nov 29 19:18:33 2024 -0500
@@ -1,5 +1,8 @@
 # This python code can be imported into tests in order to terminate a process
 # with signal.SIGKILL on posix, or a roughly equivalent procedure on Windows.
+
+from __future__ import annotations
+
 import os
 import signal
 import subprocess
--- a/tests/test-check-module-imports.t	Fri Nov 29 19:11:30 2024 -0500
+++ b/tests/test-check-module-imports.t	Fri Nov 29 19:18:33 2024 -0500
@@ -48,5 +48,3 @@
 
   $ testrepohg files 'set:**.py and size(">0")' -I mercurial -I hgext -X mercurial/thirdparty -0 \
   > | xargs -0 grep -L '^from __future__ import annotations$'
-  mercurial/cmd_impls/graft.py
-  mercurial/testing/ps_util.py