Skip to content

Commit

Permalink
final pylint reconfigurations
Browse files Browse the repository at this point in the history
  • Loading branch information
rilesdun committed Sep 17, 2023
1 parent dce7d50 commit 1904c9d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 15 deletions.
4 changes: 2 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def account_info(account_name):
return jsonify(account_info=info)
except AccountDoesNotExistsException:
return jsonify(error="Account does not exist"), 404
except Exception as error:
except Exception as error: # pylint: disable=broad-except
return str(error), 400

@app.route('/api/accounts/witnesses', methods=['GET'])
Expand Down Expand Up @@ -189,4 +189,4 @@ def active_sons():
return sons

if __name__ == '__main__':
app.run(app)
app.run()
2 changes: 1 addition & 1 deletion src/accounts/sons/active_sons.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def get_active_sons():
results.append(obj)
son_count += 1
object_id_number += 1
except Exception as error:
except Exception as error: # pylint: disable=broad-except
print(f"Error fetching object {object_id}: {error}", file=sys.stderr)
break

Expand Down
4 changes: 2 additions & 2 deletions src/accounts/witnesses/witnesses.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ def list_active_witnesses():
account = Account(witness["witness_account"], blockchain_instance=peerplays)
witness_info.append({
"account_name": account['name'],
"witness_data": {key: value for key, value in witness.items()}
"witness_data": dict(witness.items())
})

witness_info = sorted(witness_info, key=lambda x: x['witness_data']['total_votes'],
witness_info = sorted(witness_info, key=lambda x: x['witness_data']['total_votes'],
reverse=True)

logger.info("Successfully fetched %s active witnesses", len(witness_info))
Expand Down
2 changes: 1 addition & 1 deletion src/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def get_block_info(block_num=None):
logger.info("Successfully fetched block %s", block_num)
return block_info

except Exception as exception:
except Exception as exception: # pylint: disable=broad-except
logger.error("Error fetching block %s: %s", block_num, exception, exc_info=True)
return None

9 changes: 0 additions & 9 deletions src/supply/max_supply.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@
from src.supply.common import get_supplies, peerplays, ASSET_IDS


ASSET_IDS = {
"ppy": "1.3.0",
"btfun": "1.3.1",
"bitcoin": "1.3.22",
"hive": "1.3.24",
"hbd": "1.3.23",
# Add more mappings as needed
}

def max_supply(coin_name):
"""
This endpoint returns the maximum supply for the given coin name.
Expand Down

0 comments on commit 1904c9d

Please sign in to comment.