Skip to content

Commit 1464d18

Browse files
committed
typing: Type hints for pyright
Without this, pyright assumes the return type of Bottle.app('/') can be ModuleType.
1 parent b0a0a10 commit 1464d18

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bottle.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,8 @@ def hello(name):
917917
skiplist = makelist(skip)
918918

919919
def decorator(callback):
920-
if isinstance(callback, basestring): callback = load(callback)
920+
if isinstance(callback, basestring):
921+
callback = load(callback) # type: Callable
921922
for rule in makelist(path) or yieldroutes(callback):
922923
for verb in makelist(method):
923924
verb = verb.upper()

0 commit comments

Comments
 (0)