HomePhabricator

Stringify local user ID before passing into Markup.escape
6fd289376dadUnpublished

Unpublished Commit · Learn More

Publishing Disabled: All publishing is disabled for this repository.

Description

Stringify local user ID before passing into Markup.escape

This caused a type error on Travis (Argument 1 to "escape" of "Markup"
has incompatible type "int"; expected "str"), but not locally. My best
guess is that this is due to python/typeshed#2842 [1], though I’m not
sure about this (does Travis really pull typeshed from master? that
commit is not in any release yet).

While Markup.escape seems to support integer arguments at runtime, its
documentation only talks about strings, so it’s probably safer to only
pass strings into it, instead of trying to silence the type error in
some other way.

[1]: https://github.com/python/typeshed/pull/2842

Details

Provenance
LucasWerkmeisterAuthored on Mar 17 2019, 6:18 PM
Parents
R2494:ca6f17cc1086: Add missing type hints
Branches
Unknown
Tags
Unknown
ChangeId
None