Skip to content

Commit

Permalink
refactor: update type hints in utils/sysinfo.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mmtj committed Oct 27, 2023
1 parent 66b7ea3 commit 2710ec6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions IPython/utils/sysinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# Code
#-----------------------------------------------------------------------------

def pkg_commit_hash(pkg_path):
def pkg_commit_hash(pkg_path: str) -> tuple[str, str]:
"""Get short form of commit hash given directory `pkg_path`
We get the commit hash from (in order of preference):
Expand Down Expand Up @@ -67,7 +67,7 @@ def pkg_commit_hash(pkg_path):
return '(none found)', '<not found>'


def pkg_info(pkg_path):
def pkg_info(pkg_path: str) -> dict:
"""Return dict describing the context of this package
Parameters
Expand All @@ -94,7 +94,7 @@ def pkg_info(pkg_path):
default_encoding=encoding.DEFAULT_ENCODING,
)

def get_sys_info():
def get_sys_info() -> dict:
"""Return useful information about IPython and the system, as a dict."""
path = Path(__file__, "..").resolve().parent
return pkg_info(str(path))
Expand Down

0 comments on commit 2710ec6

Please sign in to comment.