Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

set_treeclosed should not do any slicing #153

Closed
jdm opened this issue Mar 23, 2018 · 4 comments
Closed

set_treeclosed should not do any slicing #153

jdm opened this issue Mar 23, 2018 · 4 comments
Labels
E-easy Good first issues

Comments

@jdm
Copy link
Member

jdm commented Mar 23, 2018

The contract with set_treeclosed should be that it accepts a string that will be converted to an integer. The slicing should happen in the caller instead.

@jdm jdm added the E-easy Good first issues label Mar 23, 2018
@dtchanpura
Copy link

We can use action.set_treeclosed(state, word.lstrip("treeclosed=")) in place of action.set_treeclosed(state, word) in main.py at line 530

action.set_treeclosed(state, word)

@jdm
Copy link
Member Author

jdm commented Mar 27, 2018

That is indeed a nicer way of writing that.

bors-servo pushed a commit that referenced this issue Mar 28, 2018
Replaced slicing text from set_treeclosed method to its caller #153

This pull request is for issue #153

Replaced the slicing with strip by using `word.lstrip()`

The occurrences are been replaced up to my knowledge. @jdm let me know in case if I missed anything.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/homu/158)
<!-- Reviewable:end -->
@orestisfl
Copy link

This can be closed?

@jdm
Copy link
Member Author

jdm commented Mar 31, 2018

Yes.

@jdm jdm closed this as completed Mar 31, 2018
yshui pushed a commit to hadeaninc/homu that referenced this issue Apr 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
E-easy Good first issues
Projects
None yet
Development

No branches or pull requests

3 participants