salomon-smekecohen commented on code in PR #2929:
URL: https://github.com/apache/thrift/pull/2929#discussion_r1599038035


##########
compiler/cpp/src/thrift/generate/t_py_generator.cc:
##########
@@ -127,6 +128,9 @@ class t_py_generator : public t_generator {
         gen_tornado_ = true;
       } else if( iter->first.compare("coding") == 0) {
         coding_ = iter->second;
+      } else if( iter->first.compare("type_hints") == 0) {
+        gen_type_hints_ = true;
+        gen_enum_ = true;

Review Comment:
   Would it be worth doing:
   
   ```
       if (!gen_enum) { throw "the type_hints py option requires the enum py 
option}
   ```
   instead of setting it to true?



##########
compiler/cpp/src/thrift/generate/t_py_generator.cc:
##########
@@ -127,6 +128,9 @@ class t_py_generator : public t_generator {
         gen_tornado_ = true;
       } else if( iter->first.compare("coding") == 0) {
         coding_ = iter->second;
+      } else if( iter->first.compare("type_hints") == 0) {
+        gen_type_hints_ = true;
+        gen_enum_ = true;

Review Comment:
   Would it be worth doing:
   
   ```
       if (!gen_enum) { throw "the type_hints py option requires the enum py 
option" }
   ```
   instead of setting it to true?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@thrift.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to