Skip to content

Commit 9525666

Browse files
committed
stick to conventions
1 parent 188187d commit 9525666

File tree

5 files changed

+18
-15
lines changed

5 files changed

+18
-15
lines changed

clid.egg-info/PKG-INFO

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 1.1
22
Name: clid
3-
Version: 0.6.1
3+
Version: 0.6.3
44
Summary: Command line app based on ncurses to edit ID3 tags of mp3 files
55
Home-page: https://github.com/GokulSoumya/clid
66
Author: Gokul

clid.egg-info/SOURCES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ clid/database.py
1010
clid/editmeta.py
1111
clid/main.py
1212
clid/pref.py
13+
clid/validators.py
1314
clid.egg-info/PKG-INFO
1415
clid.egg-info/SOURCES.txt
1516
clid.egg-info/dependency_links.txt

clid/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import npyscreen as npy
88

99
class ClidActionController(npy.ActionControllerSimple):
10-
"""Base class for the command line at the bootom of the screen"""
10+
"""Base class for the command line at the bottom of the screen"""
1111

1212
def create(self):
1313
self.add_action('^:q$', self.exit_app, live=False) # quit with ':q'

clid/main.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,22 @@ class ClidMultiline(npy.MultiLine):
5959
self.parent refers to ClidInterface -> class
6060
self.parent.value refers to database.Mp3DataBase -> class
6161
"""
62+
63+
def set_status(self, filename):
64+
"""Set the the value of self.parent.wStatus2 with metadata of file under cursor."""
65+
self.parent.wStatus2.value = self.parent.value.parse_meta_for_status(filename=filename)
66+
67+
def get_selected(self):
68+
return self.values[self.cursor_line]
69+
6270
def set_up_handlers(self):
6371
super().set_up_handlers()
64-
self.handlers['u'] = self.reload_files
65-
self.handlers['2'] = self.switch_to_settings
72+
self.handlers['u'] = self.h_reload_files
73+
self.handlers['2'] = self.h_switch_to_settings
6674
self.handlers[curses.ascii.ESC] = self.h_revert_escape
6775

6876

69-
def reload_files(self, char):
77+
def h_reload_files(self, char):
7078
"""Reload files in `music_dir`"""
7179
self.parent.value.load_files_and_set_values()
7280
self.parent.load_files()
@@ -83,16 +91,10 @@ def h_revert_escape(self, char):
8391

8492
# TODO: make it faster
8593

86-
def switch_to_settings(self, char):
94+
def h_switch_to_settings(self, char):
8795
self.parent.parentApp.switchForm("SETTINGS")
8896

89-
def set_status(self, filename):
90-
"""Set the the value of self.parent.wStatus2 with metadata of file under cursor."""
91-
self.parent.wStatus2.value = self.parent.value.parse_meta_for_status(filename=filename)
92-
93-
def get_selected(self):
94-
return self.values[self.cursor_line]
95-
97+
9698
# NOTE: The if blocks with self.cursor_line is mainly to prevent the app from
9799
# crashing Eg: when there is nothing to display(empty folder)
98100

clid/pref.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ class PrefMultiline(npy.MultiLine):
2121
def set_up_handlers(self):
2222
super().set_up_handlers()
2323

24-
self.handlers['1'] = self.switch_to_main
24+
self.handlers['1'] = self.h_switch_to_main
2525

26-
def switch_to_main(self, char):
26+
def h_switch_to_main(self, char):
2727
self.parent.parentApp.switchForm("MAIN")
2828

2929
def h_select(self, char):

0 commit comments

Comments
 (0)