diff --git a/.grit/grit.yaml b/.grit/grit.yaml index 865cd4367e9..c93f16d6ecd 100644 --- a/.grit/grit.yaml +++ b/.grit/grit.yaml @@ -1,3 +1,3 @@ version: 0.0.1 patterns: -# - name: github.com/getgrit/stdlib#* + - name: github.com/getgrit/stdlib#* diff --git a/.grit/patterns/runtime_data_migration.md b/.grit/patterns/runtime_data_migration.md index 641ed43596b..0c662a66fea 100644 --- a/.grit/patterns/runtime_data_migration.md +++ b/.grit/patterns/runtime_data_migration.md @@ -15,7 +15,7 @@ pattern refactor_functions($config_entry_type, $file_name, $config_entry_type_de $type <: type(type="ConfigEntry"), $type => $config_entry_type, if ($file_name <: not `__init__`) { - //$config_entry_type <: ensure_import_from(source = `.`), + $config_entry_type <: ensure_import_from(source = `.`), }, }, @@ -63,13 +63,15 @@ multifile { }, $domain_list += $domain, }, - bubble($domain_list) file($name, $body) where { + bubble($domain_list) file($name, $body) as $file where { + $file <: before_each_file(), // migrate files $filename <: r".*components/([^/]+)/([^/]+)\.py$"($domain, $file_name), $domain_list <: includes $domain, $config_entry_type = capitalize($domain), $config_entry_type += "ConfigEntry", $body <: contains refactor_functions($config_entry_type, $file_name, $config_entry_type_defined), + $file <: after_each_file() }, } ``` \ No newline at end of file