Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "searchcode"
version = "0.4.2"
version = "0.4.4"
description = "Simple, comprehensive code search."
authors = ["Ritchie Mwewa <rly0nheart@duck.com>"]
license = "GPLv3+"
Expand Down
6 changes: 4 additions & 2 deletions searchcode/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""

from datetime import datetime

from .api import Searchcode

__pkg__ = "searchcode"
__version__ = "0.4.2"
__version__ = "0.4.4"
__author__ = "Ritchie Mwewa"


Expand Down Expand Up @@ -576,7 +578,7 @@ class License:

[bold]END OF TERMS AND CONDITIONS[/]
"""
warranty: str = """
warranty: str = f"""
Copyright (C) {datetime.today().year} {__author__}

This program is free software: you can redistribute it and/or modify
Expand Down
11 changes: 8 additions & 3 deletions searchcode/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,12 @@ def cli():
@cli.command("license")
@click.option("--conditions", help="License terms and conditions.", is_flag=True)
@click.option("--warranty", help="License warranty.", is_flag=True)
def licence(conditions: t.Optional[bool], warranty: t.Optional[bool]):
@click.pass_context
def licence(
ctx: click.Context, conditions: t.Optional[bool], warranty: t.Optional[bool]
):
"""
Show license
Show license information
"""
__clear_screen()
__update_window_title(
Expand All @@ -66,12 +69,14 @@ def licence(conditions: t.Optional[bool], warranty: t.Optional[bool]):
justify="center",
style="on #272822", # monokai themed background :)
)
if warranty:
elif warranty:
console.print(
License.warranty,
justify="center",
style="on #272822",
)
else:
click.echo(ctx.get_help())


@cli.command()
Expand Down