diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-27 10:39:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-27 10:39:56 +0000 |
commit | eeeaff8afe94b2806a79a02b7c01c912a984a22f (patch) | |
tree | 97983910e3beb2f21c346165f69f3fc57a411b15 /ptpython/entry_points/run_ptpython.py | |
parent | Adding upstream version 3.0.22. (diff) | |
download | ptpython-eeeaff8afe94b2806a79a02b7c01c912a984a22f.tar.xz ptpython-eeeaff8afe94b2806a79a02b7c01c912a984a22f.zip |
Adding upstream version 3.0.23.upstream/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. |