-
Notifications
You must be signed in to change notification settings - Fork 90
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 bug in rotatePins() #855
Conversation
The assignment for pinLocation was broken. I am not sure why it was set up the way it was, but it was using ParameterCollection.__setitem__() and setting the `name` argument to the tuple ("pinLocation", pinNum). That throws a TypeError from setattr(), which gets caught and then instead makes an assigment to self._hist because `name` is a tuple. That is definitely not what is intended.
Looping in fellow pin aficionado @mgjarrett |
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.
Great find and fix!
Can someone help me out here? What happens when you call For those users... does |
It's only on the If you do have a |
AH! I'm just blind. (And probably sleep deprived.) Thanks! |
The assignment for pinLocation was broken. I am not sure why it was set up the way it was, but it was using ParameterCollection.__setitem__() and setting the `name` argument to the tuple ("pinLocation", pinNum). That throws a TypeError from setattr(), which gets caught and then instead makes an assigment to self._hist because `name` is a tuple. That is definitely not what is intended.
Description
The assignment for
pinLocation
in therotatePins
method is broken. I am not sure why it was set up the way it was, but it was usingParameterCollection.__setitem__()
to make the assignment. The syntax used ended up setting thename
argument to the tuple("pinLocation", pinNum)
. That throws aTypeError
fromsetattr()
, which gets caught within__setitem__()
and then instead makes an assignment toself._hist
(whereself
is the parameter collection) becausename
is a tuple. That is definitely not what is intended.This PR fixes this bug. Doc string improvements have also been attempted.
Checklist
doc
folder.setup.py
.