Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: add basic implementation of the
Connector
interface and aStreamingAudioInputDevice
Connector
#350feat: add basic implementation of the
Connector
interface and aStreamingAudioInputDevice
Connector
#350Changes from 13 commits
6b42247
f1c2a6d
d3b9ece
e2420ea
f435dbf
a758bbe
0c98d91
011f47f
c234314
48e1206
ed2cf4d
1a78d4a
7601b1f
59351a4
de41ae4
c3f6e79
f99f923
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix typos and enhance exception chaining
resample
call references the incorrect keytarget_samping_rate
; it should readtarget_sampling_rate
.except AttributeError
block, you can leverage exception chaining by usingraise <Exception> from exc
orraise SoundDeviceError(...) from None
to distinguish the new exception from the original cause.📝 Committable suggestion
🧰 Tools
🪛 Ruff (0.8.2)
136-136: Within an
except
clause, raise exceptions withraise ... from err
orraise ... from None
to distinguish them from errors in exception handling(B904)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maciejmajek, here’s what we have from the latest script output:
Typo correction:
"target_samping_rate"
no longer appears in the repository, confirming the mismatch is presumably corrected to"target_sampling_rate"
.Exception chaining:
"from exc"
usage orexcept AttributeError as exc
in the file. The script found anexcept AttributeError:
but not with exception chaining (from exc
).Thus, it appears that the typo fix has been integrated, but the recommended exception chaining is not in place yet. If you wish to apply exception chaining, please modify that block to use, for example:
That should address both points from your earlier feedback. Let me know if you have any other questions!
🔗 Analysis chain
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 416
Script:
Length of output: 3554
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rachwalk please apply exception chaining suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.