Skip to content

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
@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