Skip to content

Commit

Permalink
🔨 Swap to using the textual-enhanced HelpScreen
Browse files Browse the repository at this point in the history
  • Loading branch information
davep committed Feb 2, 2025
1 parent 62eb000 commit ee71b07
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 172 deletions.
25 changes: 25 additions & 0 deletions src/peplum/app/peplum.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

##############################################################################
# Local imports.
from .. import __version__
from .data import (
load_configuration,
update_configuration,
Expand All @@ -21,6 +22,30 @@
class Peplum(EnhancedApp[None]):
"""The main application class."""

HELP_TITLE = f"Peplum {__version__}"
HELP_ABOUT = """
`Peplum` is a terminal-based Python PEP lookup manager; it was created
by and is maintained by [Dave Pearson](https://www.davep.org/); it is
Free Software and can be [found on
GitHub](https://github.com/davep/peplum).
"""
HELP_LICENSE = """
Peplum - The PEP lookup manager for the terminal. \n Copyright (C) 2025 Dave Pearson
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option)
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <https://www.gnu.org/licenses/>.
"""

COMMANDS = set()

def __init__(self) -> None:
Expand Down
171 changes: 0 additions & 171 deletions src/peplum/app/screens/help.py

This file was deleted.

2 changes: 1 addition & 1 deletion src/peplum/app/screens/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
##############################################################################
# Textual enhanced imports.
from textual_enhanced.commands import Command, CommandsProvider
from textual_enhanced.dialogs import HelpScreen

##############################################################################
# Local imports.
Expand Down Expand Up @@ -78,7 +79,6 @@
TypeCommands,
)
from ..widgets import Navigation, PEPDetails, PEPsView
from .help import HelpScreen
from .notes_editor import NotesEditor
from .pep_viewer import PEPViewer
from .search_input import SearchInput
Expand Down

0 comments on commit ee71b07

Please sign in to comment.