forked from 00dani/lemoncurry
Add mypy types for libraries that have them now
This commit is contained in:
parent
8d79be07da
commit
0ca50252dd
4 changed files with 61 additions and 9 deletions
|
@ -5,10 +5,10 @@ from jinja2 import evalcontextfilter, Markup
|
|||
TAGS = ['cite', 'code', 'details', 'p', 'pre', 'img', 'span', 'summary']
|
||||
TAGS.extend(ALLOWED_TAGS)
|
||||
ATTRIBUTES = {
|
||||
'a': ('href', 'title', 'class'),
|
||||
'details': ('open',),
|
||||
'img': ('alt', 'src', 'title'),
|
||||
'span': ('class',),
|
||||
'a': ['href', 'title', 'class'],
|
||||
'details': ['open'],
|
||||
'img': ['alt', 'src', 'title'],
|
||||
'span': ['class'],
|
||||
}
|
||||
|
||||
cleaner = Cleaner(tags=TAGS, attributes=ATTRIBUTES, filters=(LinkifyFilter,))
|
||||
|
|
|
@ -8,10 +8,10 @@ from bleach.linkifier import LinkifyFilter
|
|||
tags = ['cite', 'code', 'details', 'p', 'pre', 'img', 'span', 'summary']
|
||||
tags.extend(ALLOWED_TAGS)
|
||||
attributes = {
|
||||
'a': ('href', 'title', 'class'),
|
||||
'details': ('open',),
|
||||
'img': ('alt', 'src', 'title'),
|
||||
'span': ('class',),
|
||||
'a': ['href', 'title', 'class'],
|
||||
'details': ['open'],
|
||||
'img': ['alt', 'src', 'title'],
|
||||
'span': ['class'],
|
||||
}
|
||||
|
||||
register = template.Library()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue