mirror of
https://github.com/zulip/zulip.git
synced 2026-06-21 21:32:29 +08:00
I remove `is_force` from `file_or_package_hash_updated` and modernize its mypy annotations. If `is_force` is `True`, we just now run the thing we want to force-run without having to call `file_or_package_hash_updated` to expensively and riskily return `True`. Another nice outcome of this change is that if `file_or_package_hash_updated` returns `True`, you can know that the file or package has indeed been updated. For the case of `build_pygments_data` we also skip an `os.path.exists` check when `is_force` is `True`. We will short-circuit more logic in the next few commits, as well as cleaning up some of the long/wrapper lines in the `if` statements. |
||
|---|---|---|
| .. | ||
| data_import | ||
| lib | ||
| management | ||
| migrations | ||
| openapi | ||
| templatetags | ||
| tests | ||
| tornado | ||
| views | ||
| webhooks | ||
| worker | ||
| __init__.py | ||
| apps.py | ||
| context_processors.py | ||
| decorator.py | ||
| filters.py | ||
| forms.py | ||
| logging_handlers.py | ||
| middleware.py | ||
| models.py | ||
| signals.py | ||