Skip to content

Commit be6f9bf

Browse files
committed
* linting cleanups
1 parent dc54c98 commit be6f9bf

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

index.py

+7-10
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@
33
"""
44

55
import datetime
6-
import re
6+
import hashlib
77
from html import escape, unescape
8-
import psycopg2
9-
import psycopg2.extras
10-
from bottle import request, get, response
118
from math import ceil
12-
from bs4 import BeautifulSoup
13-
import hashlib
9+
import re
1410
from urllib.parse import parse_qs
1511

12+
from bs4 import BeautifulSoup
13+
from bottle import request, get, response
14+
import psycopg2
15+
import psycopg2.extras
16+
1617

1718
CONN_STRING = 'host=127.0.0.1 dbname=tasti user=tasti password="" port=5432'
1819

@@ -238,9 +239,6 @@ def do_bmarks():
238239
<BR><BR>'''.format(old_bmark_sql)
239240
return return_data
240241
old_bmark = old_bmark_res[0]
241-
old_created = old_bmark[0]
242-
old_url = old_bmark[1]
243-
old_notes = old_bmark[2]
244242
old_name = old_bmark[3]
245243
bmark_del_sql = 'DELETE FROM bmarks WHERE id=%s AND owner=%s'
246244
del_sql_vals = [bmark_id, username]
@@ -582,7 +580,6 @@ def edit_bmarks_process(username):
582580
return return_data
583581
old_created = old_bmark_qry[0][0]
584582
old_url = old_bmark_qry[0][1]
585-
old_notes = old_bmark_qry[0][2]
586583
old_name = old_bmark_qry[0][3]
587584
bmark_del_sql = 'DELETE FROM bmarks WHERE owner=%s AND url=%s AND name=%s'
588585
bmark_del_vals = [username, old_url, old_name]

tastiapp.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ def send_font(filename):
8989
return static_file(filename, root='fonts')
9090

9191
@error(404)
92-
def handle404(error):
92+
def handle404():
9393
return '<H1>Ooops, its not here<BR>'
9494

9595
@error(500)
96-
def handle500(error):
97-
return '<H1>Oops, its broken:&nbsp;{}<BR>'.format(error)
96+
def handle500(err):
97+
return f'<H1>Oops, its broken:&nbsp;{err}<BR>'

0 commit comments

Comments
 (0)