pytorch
ef262575 - [pytorch] Fix printing of optional string arguments in schemas (#55196)

Commit
3 years ago
[pytorch] Fix printing of optional string arguments in schemas (#55196) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/55196 This commit fixes printing of default values for optional string type arguments in schemas. At the moment, these default values are not printed as quoted strings. If a schema with an optional string type parameter with a default value that is not `None` is printed and then parsed, the lack of quotes causes a parsing error. ghstack-source-id: 125655241 Test Plan: This commit adds a unit test to `test_function_schema.py` to test this case. Differential Revision: D27525450 fbshipit-source-id: 23a93169e7599e7b385e59b7cfafb17fd76318b7
Author
Meghan Lele
Parents
Loading