You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
Python version (& distribution if applicable, e.g. Anaconda): Anaconda with Python 3.7.7
Expected behaviour
When using function decorators with a return value type hint, the decorated function should assume the type of the return value.
Actual behaviour
Instead, the language server thinks that the function is of type function, or some unknown type (see image below).
Code snippet available below.
Logs
[Info - 10:15:37 PM] Analysis cache path: C:\Users\**\AppData\Local\Microsoft\Python Language Server
[Info - 10:15:37 PM] Microsoft Python Language Server version 0.5.51.0
[Info - 10:15:37 PM] Workspace root: c:\Users\**\Desktop\**
[Info - 10:15:37 PM] GetCurrentSearchPaths C:\Users\**\anaconda3\envs\**\python.exe
[Info - 10:15:37 PM] Interpreter search paths:
[Info - 10:15:37 PM] c:\users\**\anaconda3\envs\**\dlls
[Info - 10:15:37 PM] c:\users\**\anaconda3\envs\**\lib
[Info - 10:15:37 PM] c:\users\**\anaconda3\envs\**
[Info - 10:15:37 PM] c:\users\**\anaconda3\envs\**\lib\site-packages
[Info - 10:15:37 PM] User search paths:
[Info - 10:15:42 PM] Initializing for C:\Users\**\anaconda3\envs\**\python.exe
[Info - 10:15:42 PM] Analysis caching mode: None.
[Info - 10:23:25 PM] Analysis caching mode: None.
[Info - 10:26:11 PM] Analysis caching mode: None.
Analysis of Untitled-1 (User) on depth 0 completed in 0.16 ms.
Analysis complete: 1 modules in 0.29 ms.
Analysis version 68 of 1 entries has been completed in 0.21 ms.
Analysis of Untitled-1 (User) queued. Dependencies:
Analysis version 69 of 1 entries has started.
Analysis of Untitled-1 (User) on depth 0 completed in 0.16 ms.
Analysis complete: 1 modules in 0.27 ms.
Analysis version 69 of 1 entries has been completed in 0.2 ms.
Code Action in file:///c:/Users/**/Desktop/**/Untitled-1.py at (13, 3) - (13, 3)
Analysis of Untitled-1 (User) queued. Dependencies:
Analysis version 70 of 1 entries has started.
Analysis of Untitled-1 (User) on depth 0 completed in 0.14 ms.
Analysis complete: 1 modules in 0.26 ms.
Analysis version 70 of 1 entries has been completed in 0.2 ms.
Code Action in file:///c:/Users/**/Desktop/**/Untitled-1.py at (13, 13) - (13, 13)
Completions in file:///c:/Users/**/Desktop/**/Untitled-1.py at (13, 14)
Analysis of Untitled-1 (User) queued. Dependencies:
Analysis version 71 of 1 entries has started.
Analysis of Untitled-1 (User) on depth 0 completed in 0.17 ms.
Analysis complete: 1 modules in 0.31 ms.
Analysis version 71 of 1 entries has been completed in 0.24 ms.
Code Action in file:///c:/Users/**/Desktop/**/Untitled-1.py at (13, 14) - (13, 14)
Code Action in file:///c:/Users/**/Desktop/**/Untitled-1.py at (13, 14) - (13, 14)
Code Snippet / Additional lnformation
The following code reproduces the issue:
classExample(object):
defdo_something(self):
passdefdecorator(func) ->Example:
returnExample()
@decoratordefsome_function():
pass# Then type "some_function." and ctrl-space
This is the box that pops up:
If the line some_function: Example is explicitly given, Intellisense suggestions change correctly to:
The text was updated successfully, but these errors were encountered:
Environment data
Expected behaviour
When using function decorators with a return value type hint, the decorated function should assume the type of the return value.
Actual behaviour
Instead, the language server thinks that the function is of type function, or some unknown type (see image below).
Code snippet available below.
Logs
Code Snippet / Additional lnformation
The following code reproduces the issue:
This is the box that pops up:

If the line

some_function: Example
is explicitly given, Intellisense suggestions change correctly to:The text was updated successfully, but these errors were encountered: