Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/2.2.1 #66

Merged
merged 8 commits into from
May 13, 2024
Merged

Feat/2.2.1 #66

merged 8 commits into from
May 13, 2024

Conversation

guidiaz
Copy link
Contributor

@guidiaz guidiaz commented Apr 1, 2024

No description provided.

configs.py Outdated
Comment on lines 30 to 36
value = network_config.get('feeds', {}).get(caption, {}).get(param, None)
if value is None:
value = config['conditions'].get(caption, {}).get(param, None)
if value is None:
value = config['conditions']['default'].get(param, None)
if value is None:
value = default
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use the or operator to make this more concise and readable.

Suggested change
value = network_config.get('feeds', {}).get(caption, {}).get(param, None)
if value is None:
value = config['conditions'].get(caption, {}).get(param, None)
if value is None:
value = config['conditions']['default'].get(param, None)
if value is None:
value = default
value = (network_config.get('feeds', {}).get(caption, {}).get(param, None)
or config['conditions'].get(caption, {}).get(param, None)
or config['conditions']['default'].get(param, default))

"secs": []
})
print(f" => ID4 : {pf_id}")
if routed == True:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we modifying the routed value? if not, this if statement seems unnecessary

Comment on lines 133 to 136
for index in range(len(supports[0])):
caption = supports[1][index]
pf_id = supports[0][index].hex()
rad_hash = supports[2][index].hex()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can use zip here.

Suggested change
for index in range(len(supports[0])):
caption = supports[1][index]
pf_id = supports[0][index].hex()
rad_hash = supports[2][index].hex()
for (pf_id_bytes, caption_bytes, rad_hash_bytes) in zip(*supports):
caption = caption_bytes.decode()
pf_id = pf_id_bytes.hex()
rad_hash = rad_hash_bytes.hex()

@guidiaz guidiaz merged commit fd9ad24 into witnet:2.2.x May 13, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants