Break up "@generated" string so Phabricator shows changes
authorDavid Reiss <dreiss@fb.com>
Wed, 1 Sep 2021 20:41:37 +0000 (13:41 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 1 Sep 2021 21:34:18 +0000 (14:34 -0700)
Summary: Created from CodeHub with https://fburl.com/edit-in-codehub

Test Plan:
CI

Sandcastle run

Reviewed By: larryliu0820

Differential Revision: D30701781

fbshipit-source-id: 3acab8b65a327c4ec7da90bc855ecf02f801c40a

tools/autograd/gen_variable_type.py

index 8591a68..e3f4d55 100644 (file)
@@ -374,7 +374,7 @@ def gen_variable_type(
     """
     fm = FileManager(install_dir=out, template_dir=template_path, dry_run=False)
     fm.write('VariableType.h', lambda: {
-        'generated_comment': f'@generated from {template_path}/VariableType.h'
+        'generated_comment': "@" f'generated from {template_path}/VariableType.h'
     })
 
     # NOTE: see Note [Sharded File] at the top of the VariableType.cpp
@@ -385,7 +385,7 @@ def gen_variable_type(
         key_fn=lambda fn: cpp.name(fn.func.func),
         base_env={
             'generated_comment':
-            f'@generated from {template_path}/VariableType.cpp',
+            "@" f'generated from {template_path}/VariableType.cpp',
         },
         env_callable=gen_variable_type_func,
         num_shards=5,