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

Fix s3.get_subdevices() #790

Merged
merged 2 commits into from
Apr 11, 2024
Merged

Fix s3.get_subdevices() #790

merged 2 commits into from
Apr 11, 2024

Conversation

felipediel
Copy link
Collaborator

Context

Bug report: #754.

Proposed change

Improve s3.get_subdevices() logic:

  • Make "step" a parameter;
  • Use a set to ignore duplicate devices;
  • Leverage on resp["total"] to break the loop before the time (more efficient);
  • Improve logic if len(seen) == total -> if len(seen) >= total.

Thanks @stevendodd!

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New device
  • New product id (the device is already supported with a different id)
  • New feature (which adds functionality to an existing device)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests
  • Documentation

Additional information

  • This PR fixes issue: fixes #
  • This PR is related to:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • The code has been formatted using Black.
  • The code follows the Zen of Python.
  • I am creating the Pull Request against the correct branch.
  • Documentation added/updated.

@felipediel felipediel added the bug label Apr 11, 2024
@felipediel felipediel merged commit 24b9d30 into mjg59:dev Apr 11, 2024
4 checks passed
@felipediel felipediel mentioned this pull request Apr 11, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant