Fix warnings on startup + add more TODO
This commit is contained in:
parent
358decd75d
commit
d70b1bc0d8
9
TODO
9
TODO
|
@ -14,8 +14,8 @@ Make the various windows centre themselves
|
||||||
Document all functions
|
Document all functions
|
||||||
Conform to python naming conventions and code style
|
Conform to python naming conventions and code style
|
||||||
Make db_layer use a helper function to handle most of the database queries
|
Make db_layer use a helper function to handle most of the database queries
|
||||||
Unify the db_layer interface w.r.t. whether book_ids should be passed as
|
Unify the db_layer interface w.r.t. whether book_ids should be passed as strings or ints or dicts.
|
||||||
strings or ints or dicts.
|
Deal with unicode in a proper manner.
|
||||||
|
|
||||||
|
|
||||||
_Bugs_
|
_Bugs_
|
||||||
|
@ -27,16 +27,19 @@ When the top element shown is highlighted in the browser window, and pgUp is pre
|
||||||
- does not happen when up_arrow is pressed.
|
- does not happen when up_arrow is pressed.
|
||||||
Error checking out an already checked out book
|
Error checking out an already checked out book
|
||||||
- SQLite integrity check failure
|
- SQLite integrity check failure
|
||||||
|
Multiple failed emails print to the terminal in a way that can't be readable.
|
||||||
|
Database has various quirks and issues, the way queries are done is absolutely wild.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
_Implemented Features_
|
_Implemented Features_
|
||||||
Categories work based on selection, not just highlight
|
Categories work based on selection, not just highlight
|
||||||
Sort by column in browser
|
Sort by column in browser
|
||||||
Support UTF-8 for everything
|
*Support UTF-8 for everything*
|
||||||
Search ignores Case (for lowercase search strings)
|
Search ignores Case (for lowercase search strings)
|
||||||
Text entry supports longer string
|
Text entry supports longer string
|
||||||
Home and End navigate to top and bottom of catalogue respectively.
|
Home and End navigate to top and bottom of catalogue respectively.
|
||||||
|
|
||||||
Support for multiple copies
|
Support for multiple copies
|
||||||
- books will have their book_id written in pencil on inside cover
|
- books will have their book_id written in pencil on inside cover
|
||||||
|
|
||||||
|
|
|
@ -40,13 +40,13 @@ class DaysForm(FormWindow):
|
||||||
|
|
||||||
def _return_values(self):
|
def _return_values(self):
|
||||||
ret = self.entries[0].value
|
ret = self.entries[0].value
|
||||||
if ret is "":
|
if ret == "":
|
||||||
return DEFAULT_DAY_VALUE
|
return DEFAULT_DAY_VALUE
|
||||||
else:
|
|
||||||
#If we didn't get valid input, noisily fail
|
#If we didn't get valid input, noisily fail
|
||||||
assert ret.isdigit() and int(ret) > 0, \
|
assert ret.isdigit() and int(ret) > 0, \
|
||||||
"Max signed out days is not positive: " + ret.__repr__()
|
"Max signed out days is not positive: " + ret.__repr__()
|
||||||
return int(ret)
|
return int(ret)
|
||||||
|
|
||||||
|
|
||||||
class NameForm(FormWindow):
|
class NameForm(FormWindow):
|
||||||
|
@ -55,11 +55,11 @@ class NameForm(FormWindow):
|
||||||
labels = ["Name"]
|
labels = ["Name"]
|
||||||
|
|
||||||
def _return_values(self):
|
def _return_values(self):
|
||||||
if self.entries[0].value is "":
|
if self.entries[0].value == "":
|
||||||
return "Librarian"
|
return "Librarian"
|
||||||
else:
|
|
||||||
assert self.entries[0].value.isprintable()
|
assert self.entries[0].value.isprintable()
|
||||||
return self.entries[0].value
|
return self.entries[0].value
|
||||||
|
|
||||||
|
|
||||||
#Private functions
|
#Private functions
|
||||||
|
@ -108,7 +108,8 @@ def _send_email(quest_id: str,
|
||||||
#Public functions
|
#Public functions
|
||||||
@permissions.check_permissions(permissions.PERMISSION_LIBCOM)
|
@permissions.check_permissions(permissions.PERMISSION_LIBCOM)
|
||||||
@catch_error_with(lambda w, hb, *args: (w, hb, None))
|
@catch_error_with(lambda w, hb, *args: (w, hb, None))
|
||||||
def sendemails_procedure(w, hb, cy, cx, mx):
|
def sendemails_procedure(w, hb, cy, cx, mx):
|
||||||
|
# TODO: This bugs out when multiple emails fail to be sent.
|
||||||
"""Procedure to send emails to those with overdue books
|
"""Procedure to send emails to those with overdue books
|
||||||
|
|
||||||
w: ncurses window for the routine
|
w: ncurses window for the routine
|
||||||
|
|
Loading…
Reference in New Issue