-
Notifications
You must be signed in to change notification settings - Fork 2k
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: strip whitespaces safely from FARMReader
's answers
#3526
Conversation
FARMReader
's answersFARMReader
's answers
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.
The changes to the test case look good to me but I have a few questions about the data type of right_offset
and how it is used for calculations.
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.
I agree with the change from rstrip
to lstrip
. 👍 Regarding the int()
call and the right_offest
I still need to be convinced of the change. 🙂 I think we can leave out the int()
call and I would rename right_offset
to left_offset
.
@@ -753,12 +753,6 @@ def no_answer_reader(request): | |||
) | |||
|
|||
|
|||
@pytest.fixture |
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.
I can confirm that prediction
isn't used in any other tests except for the reader.py. However, it might be useful to have this fixture available to other nodes as well no?
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.
I don't think so. I think fixtures should stay close to the tests that use them, and this is such a small one I hardly see the point of having it at all. Let's keep it near the tests.
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.
Looks good to me! 👍 Thank you for patiently addressing the change requests and for the quick responses in our discussions. 🙂
Thank you for catching them! 🙌 |
Related Issues
Proposed Changes:
.strip()
call in_span_to_string
that was messing with the token offsets forFARMReader
.How did you test it?
Notes for the reviewer
n/a
Checklist