| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7db9acb commit 3af5eca
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -72,10 +72,9 @@ def _migration_from_file(self, filename: str) -> migration.Migration: | |||
| 72 | 72 | """Loads a single migration from the given filename in the base dir.""" | |
| 73 | 73 | module_name = re.sub(r'\W', '_', filename) | |
| 74 | 74 | path = os.path.join(self.basedir, filename) | |
| 75 | - spec = importlib.util.spec_from_file_location(module_name, path) | ||
| 76 | - module = importlib.util.module_from_spec(spec) | ||
| 77 | - # TODO(#93): Remove pytype disable below. | ||
| 78 | - spec.loader.exec_module(module) # type: ignore | ||
| 75 | + module = importlib.util.module_from_spec( | ||
| 76 | + importlib.util.spec_from_file_location(module_name, path)) | ||
| 77 | + importlib.machinery.SourceFileLoader(module_name, path).exec_module(module) | ||
| 79 | 78 | try: | |
| 80 | 79 | result = migration.Migration(module.migration_id, | |
| 81 | 80 | module.prev_migration_id, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments