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
Implement str.expandtabs() based on CPython #4858
Conversation
Could you please queue the PR for review? |
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.
Thanks for the PR. Couple of comments to resolve then this is good to merge.
numba/unicode.py
Outdated
thety = tabsize | ||
if isinstance(tabsize, types.Omitted): | ||
thety = tabsize.value | ||
# if the type is optional, the concrete type is the captured type |
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.
# if the type is optional, the concrete type is the captured type | |
# if the type is optional, the concrete type is the captured type |
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.
Fixed!
numba/unicode.py
Outdated
found = False | ||
for i in range(length): | ||
code_point = _get_code_point(data, i) | ||
if code_point == 9: # 0x9 '\t' |
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.
For clarity perhaps use variables in the outer scope like TAB = 0x9; LINEFEED = 0xa; CARRIAGE_RETURN = 0xd
etc.
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.
Added such variables.
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.
Thanks for the fixes.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Could you please explain how can I fix the flake8 issue from CI? |
I'd guess it's this line https://github.com/numba/numba/pull/4858/files#diff-a21787256ad779b4c4c5c99915c71025R2 and that master already has an import of Line 1 in 9e12ffe
|
Please could you resolve the conflicts by merging master into this branch. Thanks! |
Resolved all the merge conflicts. |
Resolved another merge conflict caused by merging the other string PRs. Waiting for Azure to confirm this PR is OK, then will merge. |
There are no conflicts. |
No description provided.