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

ChannelTuple/List correctly handle getting an attribute from an empty list #3856

Merged
merged 5 commits into from
Jan 24, 2022

Conversation

jenshnielsen
Copy link
Collaborator

This will ensure that if you do a instr.channel.parameter you get an attribute error as expected and not an index error.
This also means that getattr etc will work as expected since it can catch the correct error.

Also refactor the getattr code a bit to split out a method for the multiparameter construction to keep the function at a resonable lenght.

This is done on top of #3851 which should be merged first.

@astafan8 astafan8 added this to the 0.32.0 milestone Jan 24, 2022
Copy link
Contributor

@astafan8 astafan8 left a comment

Choose a reason for hiding this comment

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

bors merge

@bors
Copy link
Contributor

bors bot commented Jan 24, 2022

🕐 Waiting for PR status (Github check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

@codecov
Copy link

codecov bot commented Jan 24, 2022

Codecov Report

Merging #3856 (3a57f5c) into master (9c946f1) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #3856   +/-   ##
=======================================
  Coverage   65.77%   65.77%           
=======================================
  Files         228      228           
  Lines       31085    31089    +4     
=======================================
+ Hits        20446    20450    +4     
  Misses      10639    10639           

@jenshnielsen
Copy link
Collaborator Author

bors merge

@bors
Copy link
Contributor

bors bot commented Jan 24, 2022

Canceled.

@astafan8 astafan8 merged commit e56dca6 into microsoft:master Jan 24, 2022
@jenshnielsen jenshnielsen deleted the channel_list_get_attr branch January 24, 2022 14:22
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.

None yet

2 participants