From aaacebd906b0506b1d0f55df3047f0d730bd4b26 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Fri, 4 May 2018 21:42:20 +0000 Subject: [PATCH] Fix unused variables, imports, and aliases --- lib/mix/tasks/fix_ap_users.ex | 1 - lib/pleroma/web/activity_pub/activity_pub_controller.ex | 2 +- lib/pleroma/web/mastodon_api/views/status_view.ex | 2 +- lib/pleroma/web/twitter_api/controllers/util_controller.ex | 2 +- lib/pleroma/web/twitter_api/views/notification_view.ex | 1 - 5 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/mix/tasks/fix_ap_users.ex b/lib/mix/tasks/fix_ap_users.ex index 2523cdbcb..7e970850e 100644 --- a/lib/mix/tasks/fix_ap_users.ex +++ b/lib/mix/tasks/fix_ap_users.ex @@ -1,6 +1,5 @@ defmodule Mix.Tasks.FixApUsers do use Mix.Task - import Mix.Ecto import Ecto.Query alias Pleroma.{Repo, User} diff --git a/lib/pleroma/web/activity_pub/activity_pub_controller.ex b/lib/pleroma/web/activity_pub/activity_pub_controller.ex index d374fd91f..80aae4f0f 100644 --- a/lib/pleroma/web/activity_pub/activity_pub_controller.ex +++ b/lib/pleroma/web/activity_pub/activity_pub_controller.ex @@ -1,7 +1,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController do use Pleroma.Web, :controller alias Pleroma.{User, Object} - alias Pleroma.Web.ActivityPub.{ObjectView, UserView, Transmogrifier} + alias Pleroma.Web.ActivityPub.{ObjectView, UserView} alias Pleroma.Web.ActivityPub.ActivityPub alias Pleroma.Web.Federator diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex index df360644a..cbc2dd770 100644 --- a/lib/pleroma/web/mastodon_api/views/status_view.ex +++ b/lib/pleroma/web/mastodon_api/views/status_view.ex @@ -83,7 +83,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do end def get_reply_to(activity, %{replied_to_activities: replied_to_activities}) do - id = activity.data["object"]["inReplyTo"] + _id = activity.data["object"]["inReplyTo"] replied_to_activities[activity.data["object"]["inReplyTo"]] end diff --git a/lib/pleroma/web/twitter_api/controllers/util_controller.ex b/lib/pleroma/web/twitter_api/controllers/util_controller.ex index c7b1a5b95..ea540b34c 100644 --- a/lib/pleroma/web/twitter_api/controllers/util_controller.ex +++ b/lib/pleroma/web/twitter_api/controllers/util_controller.ex @@ -92,7 +92,7 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do with %User{} = user <- User.get_cached_by_nickname(username), true <- Pbkdf2.checkpw(password, user.password_hash), - %User{} = followed <- Repo.get(User, id), + %User{} = _followed <- Repo.get(User, id), {:ok, follower} <- User.follow(user, followee), {:ok, _activity} <- ActivityPub.follow(follower, followee) do conn diff --git a/lib/pleroma/web/twitter_api/views/notification_view.ex b/lib/pleroma/web/twitter_api/views/notification_view.ex index f41edea0b..9eeb3afdc 100644 --- a/lib/pleroma/web/twitter_api/views/notification_view.ex +++ b/lib/pleroma/web/twitter_api/views/notification_view.ex @@ -2,7 +2,6 @@ defmodule Pleroma.Web.TwitterAPI.NotificationView do use Pleroma.Web, :view alias Pleroma.{Notification, User} alias Pleroma.Web.CommonAPI.Utils - alias Pleroma.Web.MediaProxy alias Pleroma.Web.TwitterAPI.UserView alias Pleroma.Web.TwitterAPI.ActivityView