zulip/zerver
Steve Howell 067196c508 provision: Simplify is_force codepaths.
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.
2020-04-17 09:45:59 -07:00
..
data_import help: Add doc for setting profile picture back to gravatar. 2020-04-16 20:27:52 -07:00
lib provision: Simplify is_force codepaths. 2020-04-17 09:45:59 -07:00
management send_custom_email: Improve docstrings a bit. 2020-04-14 10:55:04 -07:00
migrations python: Modernize legacy Python 2 syntax with pyupgrade. 2020-04-09 16:43:22 -07:00
openapi upload: Support requesting a temporary unauthenticated URL. 2020-04-17 09:08:10 -07:00
templatetags openapi: Pass api_url to curl example generation. 2019-08-17 11:35:08 -07:00
tests upload: Support requesting a temporary unauthenticated URL. 2020-04-17 09:08:10 -07:00
tornado python: Modernize legacy Python 2 syntax with pyupgrade. 2020-04-09 16:43:22 -07:00
views upload: Support requesting a temporary unauthenticated URL. 2020-04-17 09:08:10 -07:00
webhooks webhooks/teamcity: Change teamcity build triggering user to iago. 2020-04-17 09:41:55 -07:00
worker queue_processors: Write a newline char at the end of stats files. 2020-04-10 13:48:16 -07:00
__init__.py
apps.py cleanup: Delete leading newlines. 2019-08-06 23:29:11 -07:00
context_processors.py decorators: Restructure get_client_name interface. 2020-03-08 14:19:50 -07:00
decorator.py rate_limit: Move functions called by external code to RateLimitedObject. 2020-03-22 18:42:35 -07:00
filters.py cleanup: Delete leading newlines. 2019-08-06 23:29:11 -07:00
forms.py python: Modernize legacy Python 2 syntax with pyupgrade. 2020-04-09 16:43:22 -07:00
logging_handlers.py python: Modernize legacy Python 2 syntax with pyupgrade. 2020-04-09 16:43:22 -07:00
middleware.py middleware: Remove unused cookie_domain setting. 2020-04-12 11:55:55 -07:00
models.py python: Further pyupgrade changes following merge conflict. 2020-04-09 16:59:47 -07:00
signals.py emails: Translate from_name of account security emails. 2020-02-18 17:45:33 -08:00