Skip to content

Commit

Permalink
PEP8 Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
super3 committed Aug 11, 2015
1 parent 66501a2 commit 4c6bb89
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion dataserv/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def secs_to_mins(seconds):
else:
return "{0} hour(s)".format(int(seconds/3600))


def online_farmers():
# maximum number of minutes since the last check in for
# the farmer to be considered an online farmer
Expand Down Expand Up @@ -107,7 +108,7 @@ def total():
app.config["BYTE_SIZE"] = 1024*1024*128
result = total_shards * (app.config["BYTE_SIZE"] / (1024*1024*1024*1024)) # bytes / 1 TB

return "{0} TB".format(round(result,2))
return "{0} TB".format(round(result, 2))


@app.route('/api/height/<btc_addr>/<int:height>', methods=["GET"])
Expand Down
2 changes: 1 addition & 1 deletion tests/test_App.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,4 @@ def test_farmer_total_bytes(self):

# check total bytes
rv = self.app.get('/api/total')
self.assertEqual(b"1.22 TB", rv.data)
self.assertEqual(b"1.22 TB", rv.data)
2 changes: 1 addition & 1 deletion tests/test_Farmer.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ def test_height(self):
self.assertEqual(farmer.height, 5)

farmer2 = farmer.lookup()
self.assertEqual(farmer2.height, 5)
self.assertEqual(farmer2.height, 5)

0 comments on commit 4c6bb89

Please sign in to comment.