From c98af14a846f78df45f3185cd23c1dbf9fba6105 Mon Sep 17 00:00:00 2001 From: Ivan Habunek Date: Sun, 12 Jan 2025 09:42:03 +0100 Subject: [PATCH] Remove deprecated tags commands --- changelog.yaml | 5 +++++ toot/cli/tags.py | 35 +---------------------------------- 2 files changed, 6 insertions(+), 34 deletions(-) diff --git a/changelog.yaml b/changelog.yaml index e9e9185..abfba10 100644 --- a/changelog.yaml +++ b/changelog.yaml @@ -1,3 +1,8 @@ +0.48.0: + date: TBA + changes: + - "BREAKING: Remove deprecated commands: `tags_followed`, `tags_follow`, and `tags tags_unfollow`. Use `tags followed`, `tags follow`, and `tags tags unfollow` instead." + 0.47.1: date: 2024-11-27 changes: diff --git a/toot/cli/tags.py b/toot/cli/tags.py index b79fdf0..1e79342 100644 --- a/toot/cli/tags.py +++ b/toot/cli/tags.py @@ -4,7 +4,7 @@ import json as pyjson from toot import api from toot.cli import cli, pass_context, json_option, Context from toot.entities import Tag, from_dict -from toot.output import print_tag_list, print_warning +from toot.output import print_tag_list @cli.group() @@ -128,36 +128,3 @@ def unfeature(ctx: Context, tag: str, json: bool): click.echo(response.text) else: click.secho(f"✓ Tag #{featured_tag['name']} is no longer featured", fg="green") - - -# -- Deprecated commands ------------------------------------------------------- - -@cli.command(name="tags_followed", hidden=True) -@pass_context -def tags_followed(ctx: Context): - """List hashtags you follow""" - print_warning("`toot tags_followed` is deprecated in favour of `toot tags followed`") - response = api.followed_tags(ctx.app, ctx.user) - print_tag_list(response) - - -@cli.command(name="tags_follow", hidden=True) -@click.argument("tag") -@pass_context -def tags_follow(ctx: Context, tag: str): - """Follow a hashtag""" - print_warning("`toot tags_follow` is deprecated in favour of `toot tags follow`") - tag = tag.lstrip("#") - api.follow_tag(ctx.app, ctx.user, tag) - click.secho(f"✓ You are now following #{tag}", fg="green") - - -@cli.command(name="tags_unfollow", hidden=True) -@click.argument("tag") -@pass_context -def tags_unfollow(ctx: Context, tag: str): - """Unfollow a hashtag""" - print_warning("`toot tags_unfollow` is deprecated in favour of `toot tags unfollow`") - tag = tag.lstrip("#") - api.unfollow_tag(ctx.app, ctx.user, tag) - click.secho(f"✓ You are no longer following #{tag}", fg="green")