@@ -37,7 +37,7 @@ class Options:
3737 warehouse_package_name : str = ''
3838 retry : Optional [Dict [str , Any ]] = None
3939 sample_configs : Tuple [str , ...] = dataclasses .field (default = ())
40- autogen_snippets : bool = True
40+ autogen_snippets : bool = False
4141 templates : Tuple [str , ...] = dataclasses .field (default = ('DEFAULT' ,))
4242 lazy_import : bool = False
4343 old_naming : bool = False
@@ -132,17 +132,6 @@ def tweak_path(p):
132132 # Build the options instance.
133133 sample_paths = opts .pop ('samples' , [])
134134
135- # autogen-snippets is True by default, so make sure users can disable
136- # by passing `autogen-snippets=false`
137- autogen_snippets = opts .pop (
138- "autogen-snippets" , ["True" ])[0 ] in ("True" , "true" , "T" , "t" , "TRUE" )
139-
140- # NOTE: Snippets are not currently correct for the alternative (Ads) templates
141- # so always disable snippetgen in that case
142- # https://github.com/googleapis/gapic-generator-python/issues/1052
143- if opts .get ("old-naming" ):
144- autogen_snippets = False
145-
146135 answer = Options (
147136 name = opts .pop ('name' , ['' ]).pop (),
148137 namespace = tuple (opts .pop ('namespace' , [])),
@@ -154,7 +143,7 @@ def tweak_path(p):
154143 for s in sample_paths
155144 for cfg_path in samplegen_utils .generate_all_sample_fpaths (s )
156145 ),
157- autogen_snippets = autogen_snippets ,
146+ autogen_snippets = bool ( opts . pop ( "autogen-snippets" , False )) ,
158147 templates = tuple (path .expanduser (i ) for i in templates ),
159148 lazy_import = bool (opts .pop ('lazy-import' , False )),
160149 old_naming = bool (opts .pop ('old-naming' , False )),
0 commit comments