##// END OF EJS Templates
refactor: update type hints in utils/sysinfo.py
Martin Matějek -
Show More
@@ -29,7 +29,7 b' from IPython.utils import _sysinfo, encoding'
29 29 # Code
30 30 #-----------------------------------------------------------------------------
31 31
32 def pkg_commit_hash(pkg_path):
32 def pkg_commit_hash(pkg_path: str) -> tuple[str, str]:
33 33 """Get short form of commit hash given directory `pkg_path`
34 34
35 35 We get the commit hash from (in order of preference):
@@ -67,7 +67,7 b' def pkg_commit_hash(pkg_path):'
67 67 return '(none found)', '<not found>'
68 68
69 69
70 def pkg_info(pkg_path):
70 def pkg_info(pkg_path: str) -> dict:
71 71 """Return dict describing the context of this package
72 72
73 73 Parameters
@@ -94,7 +94,7 b' def pkg_info(pkg_path):'
94 94 default_encoding=encoding.DEFAULT_ENCODING,
95 95 )
96 96
97 def get_sys_info():
97 def get_sys_info() -> dict:
98 98 """Return useful information about IPython and the system, as a dict."""
99 99 path = Path(__file__, "..").resolve().parent
100 100 return pkg_info(str(path))
General Comments 0
You need to be logged in to leave comments. Login now