##// 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 # Code
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 """Get short form of commit hash given directory `pkg_path`
33 """Get short form of commit hash given directory `pkg_path`
34
34
35 We get the commit hash from (in order of preference):
35 We get the commit hash from (in order of preference):
@@ -67,7 +67,7 b' def pkg_commit_hash(pkg_path):'
67 return '(none found)', '<not found>'
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 """Return dict describing the context of this package
71 """Return dict describing the context of this package
72
72
73 Parameters
73 Parameters
@@ -94,7 +94,7 b' def pkg_info(pkg_path):'
94 default_encoding=encoding.DEFAULT_ENCODING,
94 default_encoding=encoding.DEFAULT_ENCODING,
95 )
95 )
96
96
97 def get_sys_info():
97 def get_sys_info() -> dict:
98 """Return useful information about IPython and the system, as a dict."""
98 """Return useful information about IPython and the system, as a dict."""
99 path = Path(__file__, "..").resolve().parent
99 path = Path(__file__, "..").resolve().parent
100 return pkg_info(str(path))
100 return pkg_info(str(path))
General Comments 0
You need to be logged in to leave comments. Login now