Mercurial > kallithea
changeset 8672:2d4bea1c7898
helpers: simplify age
It is just re-export utils2.age .
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sun, 11 Oct 2020 00:25:13 +0200 |
parents | 9685f50a69d0 |
children | 3ccb302bb551 |
files | kallithea/lib/helpers.py |
diffstat | 1 files changed, 2 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/helpers.py Sun Oct 11 12:27:26 2020 +0200 +++ b/kallithea/lib/helpers.py Sun Oct 11 00:25:13 2020 +0200 @@ -49,9 +49,7 @@ from kallithea.lib.diffs import BIN_FILENODE, CHMOD_FILENODE, DEL_FILENODE, MOD_FILENODE, NEW_FILENODE, RENAMED_FILENODE from kallithea.lib.markup_renderer import url_re from kallithea.lib.pygmentsutils import get_custom_lexer -from kallithea.lib.utils2 import MENTIONS_REGEX, AttributeDict -from kallithea.lib.utils2 import age as _age -from kallithea.lib.utils2 import asbool, credentials_filter, safe_bytes, safe_int, safe_str, time_to_datetime +from kallithea.lib.utils2 import MENTIONS_REGEX, AttributeDict, age, asbool, credentials_filter, safe_bytes, safe_int, safe_str, time_to_datetime from kallithea.lib.vcs.backends.base import BaseChangeset, EmptyChangeset from kallithea.lib.vcs.exceptions import ChangesetDoesNotExistError #============================================================================== @@ -77,6 +75,7 @@ assert HasPermissionAny assert HasRepoGroupPermissionLevel assert HasRepoPermissionLevel +assert age assert time_to_datetime assert EmptyChangeset @@ -540,9 +539,6 @@ return [_Message(category, message) for category, message in _session_flash_messages(clear=True)] -def age(x, y=False): - return _age(x, y) - def capitalize(x): return x.capitalize()