import importlib.utilCan you move this import to the top of the file?
check_json_format = importlib.util.module_from_spec(spec)If `exec_module` raises a `FileNotFoundError` (or any other exception), `check_json_format` will still refer to the unexecuted module object. Because it is not `None`, the script will later attempt to call `check_json_format.CheckFormatting(...)` which will crash with an `AttributeError`.\n\nConsider using a temporary variable and only assigning `check_json_format` upon success:\n```python\n if spec:\n mod = importlib.util.module_from_spec(spec)\n spec.loader.exec_module(mod)\n check_json_format = mod\n```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Can you move this import to the top of the file?
Done
check_json_format = importlib.util.module_from_spec(spec)If `exec_module` raises a `FileNotFoundError` (or any other exception), `check_json_format` will still refer to the unexecuted module object. Because it is not `None`, the script will later attempt to call `check_json_format.CheckFormatting(...)` which will crash with an `AttributeError`.\n\nConsider using a temporary variable and only assigning `check_json_format` upon success:\n```python\n if spec:\n mod = importlib.util.module_from_spec(spec)\n spec.loader.exec_module(mod)\n check_json_format = mod\n```
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
Thanks!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Add a JSON checker and formatter for MAGI
AFAICT the normal Chromium linter and formatters do not handle
JSON so I added a script to handle this and ensure all of the
MAGI JSON files are formatted consistently.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |