Refactor anime_list method

Change the method to just return `_read_from_watch_file()`
A small misunderstanding of what the `_read_from_watch_file()` method did caused me to write a fairly redundant line of code.
master
Enderlein 2018-06-17 10:01:34 -04:00 committed by GitHub
parent fa9777b862
commit 459cd293c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 7 deletions

View File

@ -45,13 +45,7 @@ class Watcher:
def anime_list(self):
# Stores list of anime names in watcher's list
anime_names = []
animes = self._read_from_watch_file()
for idx, anime_name in enumerate(animes):
anime_names.append(anime_name)
return anime_names
return self._read_from_watch_file()
def get(self, anime_name):
animes = self._read_from_watch_file()