Skip to content

Commit

Permalink
Refactor remove_prefix_from_names function for improved readability
Browse files Browse the repository at this point in the history
This PR refactors the remove_prefix_from_names function to improve code readability. Specifically, it replaces the usage of update with direct dictionary key assignment.
  • Loading branch information
defitricks authored Nov 21, 2024
1 parent 3fdef27 commit 98d572c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/get_hashes_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def generate_doc_file(cmp_version, contracts):

def remove_prefix_from_names(contracts):
for contract in contracts:
contract.update([("name", remove_prefix(contract['name'], 'openzeppelin_presets_'))])
contract['name'] = remove_prefix(contract['name'], 'openzeppelin_presets_')
return contracts


Expand Down

0 comments on commit 98d572c

Please sign in to comment.