-
Notifications
You must be signed in to change notification settings - Fork 91
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
Evaluation of strings #26
Comments
Hi. I also have the same issue. I am trying to add a phone number but its throwing
@InnovArul and @Rizhiy, do you guys know any work around until the PR is merged? |
No fix yet, please note that #35 will introduce problems with |
I see. Thanks for the examples. I didn't think of this scenario. In my case, I just needed to mention the integer as string in YACS config. Not with a "+". For your scenario, one simple workaround I see is to mention the phone numbers within a tuple. Meanwhile, I have pushed the fix for your scenario (into #35) that @Rizhiy was suggesting. It seems good so far/passes all tests in yacs/tests.py. I hope it doesn't affect any other functionalities. |
@InnovArul thanks for the tuple hack suggestion. Though I have used another hack for the time being:
This way I force |
yacs/yacs/config.py
Line 410 in aabe5bd
This part makes yacs inconsistent with yaml.
In yaml if you want a number to be interpreted as a string you can put it in quotes (e.g. 10 vs "10"), but in yacs they will be both converted to numbers.
In which cases is eval used and would it be possible to add an option to disable it?
The text was updated successfully, but these errors were encountered: