Ver código fonte

Make inspector happy again

Eren Yilmaz 6 anos atrás
pai
commit
4891de3c3e
4 arquivos alterados com 7 adições e 7 exclusões
  1. 3 3
      client_controller.py
  2. 1 1
      db_setup.py
  3. 2 2
      model.py
  4. 1 1
      trading_bot.py

+ 3 - 3
client_controller.py

@@ -392,8 +392,8 @@ def trades_on(obj_name=None, limit=5):
         obj_name = input('Name of object to check: ')
     fake_loading_bar('Loading Data', duration=1.3)
     response = client_request('trades_on', {"session_id": connection.session_id,
-                                               "ownable": obj_name,
-                                               "limit": limit})
+                                            "ownable": obj_name,
+                                            "limit": limit})
     success = 'data' in response
     if success:
         print(my_tabulate(response['data'],
@@ -410,7 +410,7 @@ def trades(limit=10):
     limit = float(limit)
     fake_loading_bar('Loading Data', duration=2.7)
     response = client_request('trades', {"session_id": connection.session_id,
-                                               "limit": limit})
+                                         "limit": limit})
     success = 'data' in response
     if success:
         print(my_tabulate(response['data'],

+ 1 - 1
db_setup.py

@@ -430,4 +430,4 @@ def _add_column_if_not_exists(cursor, query):
         cursor.execute(query)
     except OperationalError as e:  # if the column already exists this will happen
         if 'duplicate column name' not in e.args[0]:
-            raise
+            raise

+ 2 - 2
model.py

@@ -662,8 +662,8 @@ def execute_orders(ownable_id):
                 break
 
         buy_ownership_id, _, buy_limit, _, buy_order_amount, buy_executed_amount, buy_expiry_dt, \
-        sell_ownership_id, _, sell_limit, _, sell_order_amount, sell_executed_amount, sell_expiry_dt, \
-        buyer_id, seller_id, buy_order_id, sell_order_id \
+            sell_ownership_id, _, sell_limit, _, sell_order_amount, sell_executed_amount, sell_expiry_dt, \
+            buyer_id, seller_id, buy_order_id, sell_order_id \
             = matching_orders
 
         if buy_limit is None and sell_limit is None:

+ 1 - 1
trading_bot.py

@@ -32,7 +32,7 @@ def main():  # TODO testen
     """the initial part of the trading bot algorithm"""
     if model.get_user_orders(model.bank_id()):
         raise AssertionError('The trading bot already has some orders.')
-    if input('Are you sure you want to set the trading bots initial orders? (type in "yes" or something else):') == 'yes':
+    if input('Are you sure you want to place the initial orders? (type in "yes" or something else):') == 'yes':
         for ownable_id in model.ownable_ids():
             if ownable_id != model.currency_id():
                 place_order(ownable_id)