From: Mark Felder Date: Fri, 4 May 2018 21:25:31 +0000 (+0000) Subject: Clean up unused aliases and imports X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=636f0fa40240f567a2171b347f0722d601ba63db;p=akkoma Clean up unused aliases and imports --- diff --git a/lib/mix/tasks/generate_password_reset.ex b/lib/mix/tasks/generate_password_reset.ex index e39134007..6bf640150 100644 --- a/lib/mix/tasks/generate_password_reset.ex +++ b/lib/mix/tasks/generate_password_reset.ex @@ -1,7 +1,6 @@ defmodule Mix.Tasks.GeneratePasswordReset do use Mix.Task - import Mix.Ecto - alias Pleroma.{Repo, User} + alias Pleroma.User @shortdoc "Generate password reset link for user" def run([nickname]) do diff --git a/lib/mix/tasks/register_user.ex b/lib/mix/tasks/register_user.ex index 4bec6b9d9..e74721c49 100644 --- a/lib/mix/tasks/register_user.ex +++ b/lib/mix/tasks/register_user.ex @@ -1,6 +1,5 @@ defmodule Mix.Tasks.RegisterUser do use Mix.Task - import Mix.Ecto alias Pleroma.{Repo, User} @shortdoc "Register user" diff --git a/lib/mix/tasks/rm_user.ex b/lib/mix/tasks/rm_user.ex index 6a698f360..27521b745 100644 --- a/lib/mix/tasks/rm_user.ex +++ b/lib/mix/tasks/rm_user.ex @@ -1,7 +1,6 @@ defmodule Mix.Tasks.RmUser do use Mix.Task - import Mix.Ecto - alias Pleroma.{User, Repo} + alias Pleroma.User @shortdoc "Permanently delete a user" def run([nickname]) do diff --git a/lib/pleroma/stats.ex b/lib/pleroma/stats.ex index 83b896a16..8478fe4ce 100644 --- a/lib/pleroma/stats.ex +++ b/lib/pleroma/stats.ex @@ -1,6 +1,6 @@ defmodule Pleroma.Stats do import Ecto.Query - alias Pleroma.{User, Repo, Activity} + alias Pleroma.{User, Repo} def start_link do agent = Agent.start_link(fn -> {[], %{}} end, name: __MODULE__) diff --git a/lib/pleroma/web/activity_pub/activity_pub_controller.ex b/lib/pleroma/web/activity_pub/activity_pub_controller.ex index 12f61f5f0..d374fd91f 100644 --- a/lib/pleroma/web/activity_pub/activity_pub_controller.ex +++ b/lib/pleroma/web/activity_pub/activity_pub_controller.ex @@ -1,6 +1,6 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController do use Pleroma.Web, :controller - alias Pleroma.{User, Repo, Object, Activity} + alias Pleroma.{User, Object} alias Pleroma.Web.ActivityPub.{ObjectView, UserView, Transmogrifier} alias Pleroma.Web.ActivityPub.ActivityPub alias Pleroma.Web.Federator diff --git a/lib/pleroma/web/channels/user_socket.ex b/lib/pleroma/web/channels/user_socket.ex index fd8918a7d..21b22b409 100644 --- a/lib/pleroma/web/channels/user_socket.ex +++ b/lib/pleroma/web/channels/user_socket.ex @@ -1,7 +1,6 @@ defmodule Pleroma.Web.UserSocket do use Phoenix.Socket alias Pleroma.User - alias Comeonin.Pbkdf2 ## Channels # channel "room:*", Pleroma.Web.RoomChannel diff --git a/lib/pleroma/web/common_api/common_api.ex b/lib/pleroma/web/common_api/common_api.ex index 2c4b591d4..14a68929d 100644 --- a/lib/pleroma/web/common_api/common_api.ex +++ b/lib/pleroma/web/common_api/common_api.ex @@ -1,5 +1,5 @@ defmodule Pleroma.Web.CommonAPI do - alias Pleroma.{Repo, Activity, Object, User} + alias Pleroma.{Repo, Activity, Object} alias Pleroma.Web.ActivityPub.ActivityPub alias Pleroma.Formatter diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex index b142eda95..57f8be894 100644 --- a/lib/pleroma/web/common_api/utils.ex +++ b/lib/pleroma/web/common_api/utils.ex @@ -1,5 +1,5 @@ defmodule Pleroma.Web.CommonAPI.Utils do - alias Pleroma.{Repo, Object, Formatter, User, Activity} + alias Pleroma.{Repo, Object, Formatter, Activity} alias Pleroma.Web.ActivityPub.Utils alias Calendar.Strftime diff --git a/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex b/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex index 36a7802ed..aec77168a 100644 --- a/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex +++ b/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex @@ -1,7 +1,6 @@ defmodule Pleroma.Web.Nodeinfo.NodeinfoController do use Pleroma.Web, :controller - alias Pleroma.Web.Nodeinfo alias Pleroma.Stats alias Pleroma.Web diff --git a/lib/pleroma/web/ostatus/activity_representer.ex b/lib/pleroma/web/ostatus/activity_representer.ex index 921a89bd0..e8841a856 100644 --- a/lib/pleroma/web/ostatus/activity_representer.ex +++ b/lib/pleroma/web/ostatus/activity_representer.ex @@ -1,7 +1,6 @@ defmodule Pleroma.Web.OStatus.ActivityRepresenter do alias Pleroma.{Activity, User, Object} alias Pleroma.Web.OStatus.UserRepresenter - alias Pleroma.Formatter require Logger defp get_href(id) do diff --git a/lib/pleroma/web/ostatus/handlers/note_handler.ex b/lib/pleroma/web/ostatus/handlers/note_handler.ex index bd6e92238..0d4080291 100644 --- a/lib/pleroma/web/ostatus/handlers/note_handler.ex +++ b/lib/pleroma/web/ostatus/handlers/note_handler.ex @@ -1,7 +1,7 @@ defmodule Pleroma.Web.OStatus.NoteHandler do require Logger alias Pleroma.Web.{XML, OStatus} - alias Pleroma.{Object, User, Activity} + alias Pleroma.{Object, Activity} alias Pleroma.Web.ActivityPub.ActivityPub alias Pleroma.Web.ActivityPub.Utils alias Pleroma.Web.CommonAPI diff --git a/lib/pleroma/web/ostatus/ostatus_controller.ex b/lib/pleroma/web/ostatus/ostatus_controller.ex index a02f55fe6..f39ebaf2b 100644 --- a/lib/pleroma/web/ostatus/ostatus_controller.ex +++ b/lib/pleroma/web/ostatus/ostatus_controller.ex @@ -8,7 +8,6 @@ defmodule Pleroma.Web.OStatus.OStatusController do alias Pleroma.Web.XML alias Pleroma.Web.ActivityPub.ActivityPubController alias Pleroma.Web.ActivityPub.ActivityPub - import Ecto.Query def feed_redirect(conn, %{"nickname" => nickname} = params) do user = User.get_cached_by_nickname(nickname) diff --git a/lib/pleroma/web/twitter_api/twitter_api.ex b/lib/pleroma/web/twitter_api/twitter_api.ex index 5a843a3ab..44ea40a4e 100644 --- a/lib/pleroma/web/twitter_api/twitter_api.ex +++ b/lib/pleroma/web/twitter_api/twitter_api.ex @@ -1,7 +1,6 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPI do alias Pleroma.{User, Activity, Repo, Object} alias Pleroma.Web.ActivityPub.ActivityPub - alias Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter alias Pleroma.Web.TwitterAPI.UserView alias Pleroma.Web.{OStatus, CommonAPI} import Ecto.Query diff --git a/lib/pleroma/web/web_finger/web_finger.ex b/lib/pleroma/web/web_finger/web_finger.ex index dc9ad2014..9fe3b2ca1 100644 --- a/lib/pleroma/web/web_finger/web_finger.ex +++ b/lib/pleroma/web/web_finger/web_finger.ex @@ -1,7 +1,7 @@ defmodule Pleroma.Web.WebFinger do @httpoison Application.get_env(:pleroma, :httpoison) - alias Pleroma.{Repo, User, XmlBuilder} + alias Pleroma.{User, XmlBuilder} alias Pleroma.Web alias Pleroma.Web.{XML, Salmon, OStatus} require Jason