diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-27 10:40:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-27 10:40:00 +0000 |
commit | e0719babdc8744144449c81fac14ba7bbf21446f (patch) | |
tree | 36e17925ec537746a9bb1ce7035b216529a957a5 /ptpython/entry_points/run_ptpython.py | |
parent | Releasing debian version 3.0.22-2. (diff) | |
download | ptpython-e0719babdc8744144449c81fac14ba7bbf21446f.tar.xz ptpython-e0719babdc8744144449c81fac14ba7bbf21446f.zip |
Merging upstream version 3.0.23.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ptpython/entry_points/run_ptpython.py')
-rw-r--r-- | ptpython/entry_points/run_ptpython.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ptpython/entry_points/run_ptpython.py b/ptpython/entry_points/run_ptpython.py index edffa44..1b4074d 100644 --- a/ptpython/entry_points/run_ptpython.py +++ b/ptpython/entry_points/run_ptpython.py @@ -21,6 +21,8 @@ environment variables: PTPYTHON_CONFIG_HOME: a configuration directory to use PYTHONSTARTUP: file executed on interactive startup (no default) """ +from __future__ import annotations + import argparse import os import pathlib @@ -44,7 +46,7 @@ __all__ = ["create_parser", "get_config_and_history_file", "run"] class _Parser(argparse.ArgumentParser): - def print_help(self, file: Optional[IO[str]] = None) -> None: + def print_help(self, file: IO[str] | None = None) -> None: super().print_help() print( dedent( @@ -90,7 +92,7 @@ def create_parser() -> _Parser: return parser -def get_config_and_history_file(namespace: argparse.Namespace) -> Tuple[str, str]: +def get_config_and_history_file(namespace: argparse.Namespace) -> tuple[str, str]: """ Check which config/history files to use, ensure that the directories for these files exist, and return the config and history path. |