Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intellisense support for wrapped functions #63

Closed
channelcat opened this issue Jul 6, 2020 · 3 comments
Closed

Intellisense support for wrapped functions #63

channelcat opened this issue Jul 6, 2020 · 3 comments
Labels
enhancement New feature or request waiting for user response Requires more information from user

Comments

@channelcat
Copy link

Environment data

  • Language Server version: 2020.6.1
  • OS and version: Windows 10 1909
  • Python version: 3.7.4

Expected behaviour

Intellisense shows the suggested arguments for the decorated/wrapped function

Actual behaviour

Intellisense shows the suggested arguments for the wrapper function

Logs

[Info  - 11:49:29 AM] Pylance language server 2020.6.1 starting
[Info  - 11:49:29 AM] Server root directory: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server
[Info  - 11:50:08 AM] No configuration file found.
[Info  - 11:50:08 AM] Setting pythonPath for service "scripts": "C:\Python37\python.exe"
[Info  - 11:50:08 AM] stubPath c:\Users\mhill\Documents\GitHub\scripts\typings is not a valid directory.
[Info  - 11:50:08 AM] Assuming Python version 3.7
[Info  - 11:50:08 AM] Assuming Python platform Windows
[Info  - 11:50:08 AM] Searching for source files
[Info  - 11:50:08 AM] Found 3 source files
[BG] analyzing: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data.py ...
[BG]   parsing: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data.py (60ms)
[BG]   parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\builtins.pyi (277ms)
[BG]   binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\builtins.pyi (68ms)
[BG]   binding: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data.py (2ms)
[BG]   checking: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data.py ...
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\csv.pyi (26ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\csv.pyi (2ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\json\__init__.pyi (10ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\json\__init__.pyi (2ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\third_party\2and3\pymysql\__init__.pyi (8ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\third_party\2and3\pymysql\__init__.pyi (4ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\typing.pyi (37ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\typing.pyi (24ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\abc.pyi (1ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\abc.pyi (1ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\_typeshed\__init__.pyi (7ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\_typeshed\__init__.pyi (1ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\third_party\2and3\pymysql\connections.pyi (6ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\third_party\2and3\pymysql\connections.pyi (3ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\third_party\2and3\pymysql\cursors.pyi (2ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\third_party\2and3\pymysql\cursors.pyi (2ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\os\__init__.pyi (22ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\os\__init__.pyi (11ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\third_party\2and3\typing_extensions.pyi (4ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\third_party\2and3\typing_extensions.pyi (1ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\io.pyi (14ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\io.pyi (7ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\types.pyi (12ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\types.pyi (5ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\_csv.pyi (1ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\_csv.pyi (2ms)
[BG]   checking: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data.py (373ms)
[BG] analyzing: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data.py (781ms)
[FG] parsing: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data.py (78ms)
[FG] parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\builtins.pyi (149ms)
[FG] binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\builtins.pyi (84ms)
[FG] binding: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data.py (2ms)
[FG] parsing: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data copy.py (6ms)
[FG] binding: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data copy.py (3ms)
[BG] analyzing: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data copy.py ...
[BG]   parsing: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data copy.py (8ms)
[BG]   binding: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data copy.py (2ms)
[BG]   checking: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data copy.py (41ms)
[BG] analyzing: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data copy.py (51ms)
[Info  - 11:50:17 AM] Searching for source files
[Info  - 11:50:17 AM] Found 4 source files
[BG] analyzing: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data.py ...
[BG]   parsing: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data.py (39ms)
[BG]   parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\builtins.pyi (82ms)
[BG]   binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\builtins.pyi (64ms)
[BG]   binding: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data.py (1ms)
[BG]   checking: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data.py ...
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\csv.pyi (10ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\csv.pyi (3ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\json\__init__.pyi (2ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\json\__init__.pyi (1ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\third_party\2and3\pymysql\__init__.pyi (2ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\third_party\2and3\pymysql\__init__.pyi (0ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\typing.pyi (15ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\typing.pyi (6ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\abc.pyi (0ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\abc.pyi (1ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\_typeshed\__init__.pyi (6ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\_typeshed\__init__.pyi (1ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\third_party\2and3\pymysql\connections.pyi (6ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\third_party\2and3\pymysql\connections.pyi (2ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\third_party\2and3\pymysql\cursors.pyi (2ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\third_party\2and3\pymysql\cursors.pyi (0ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\os\__init__.pyi (22ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\os\__init__.pyi (6ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\third_party\2and3\typing_extensions.pyi (3ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\third_party\2and3\typing_extensions.pyi (1ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\io.pyi (10ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\io.pyi (3ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\types.pyi (8ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\types.pyi (6ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\_csv.pyi (1ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\_csv.pyi (1ms)
[BG]   checking: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data.py (252ms)
[BG] analyzing: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data.py (438ms)
[BG] analyzing: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data copy.py ...
[BG]   parsing: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data copy.py (4ms)
[BG]   binding: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data copy.py (1ms)
[BG]   checking: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data copy.py (38ms)
[BG] analyzing: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data copy.py (43ms)
[FG] parsing: c:\Users\mhill\Documents\GitHub\scripts\test.py (60ms)
[FG] parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\builtins.pyi (157ms)
[FG] binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\builtins.pyi (52ms)
[FG] binding: c:\Users\mhill\Documents\GitHub\scripts\test.py (2ms)
[BG] analyzing: c:\Users\mhill\Documents\GitHub\scripts\test.py ...
[BG]   parsing: c:\Users\mhill\Documents\GitHub\scripts\test.py (2ms)
[BG]   binding: c:\Users\mhill\Documents\GitHub\scripts\test.py (2ms)
[BG]   checking: c:\Users\mhill\Documents\GitHub\scripts\test.py (90ms)
[BG] analyzing: c:\Users\mhill\Documents\GitHub\scripts\test.py (95ms)
[Info  - 11:50:20 AM] Searching for source files
[Info  - 11:50:20 AM] Found 4 source files
[BG] analyzing: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data.py ...
[BG]   parsing: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data.py (35ms)
[BG]   parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\builtins.pyi (73ms)
[BG]   binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\builtins.pyi (48ms)
[BG]   binding: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data.py (1ms)
[BG]   checking: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data.py ...
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\csv.pyi (21ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\csv.pyi (1ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\json\__init__.pyi (6ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\json\__init__.pyi (1ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\third_party\2and3\pymysql\__init__.pyi (4ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\third_party\2and3\pymysql\__init__.pyi (1ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\typing.pyi (21ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\typing.pyi (13ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\abc.pyi (2ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\abc.pyi (0ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\_typeshed\__init__.pyi (17ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\_typeshed\__init__.pyi (3ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\third_party\2and3\pymysql\connections.pyi (11ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\third_party\2and3\pymysql\connections.pyi (6ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\third_party\2and3\pymysql\cursors.pyi (3ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\third_party\2and3\pymysql\cursors.pyi (1ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\os\__init__.pyi (22ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\os\__init__.pyi (13ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\third_party\2and3\typing_extensions.pyi (3ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\third_party\2and3\typing_extensions.pyi (1ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\io.pyi (13ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\io.pyi (3ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\types.pyi (9ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\types.pyi (2ms)
[BG]     parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\_csv.pyi (1ms)
[BG]     binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\_csv.pyi (3ms)
[BG]   checking: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data.py (305ms)
[BG] analyzing: c:\Users\mhill\Documents\GitHub\scripts\capture_ticket_data.py (463ms)
[BG] analyzing: c:\Users\mhill\Documents\GitHub\scripts\test.py ...
[BG]   parsing: c:\Users\mhill\Documents\GitHub\scripts\test.py (2ms)
[BG]   binding: c:\Users\mhill\Documents\GitHub\scripts\test.py (1ms)
[BG]   checking: c:\Users\mhill\Documents\GitHub\scripts\test.py (37ms)
[BG] analyzing: c:\Users\mhill\Documents\GitHub\scripts\test.py (40ms)
[FG] parsing: c:\Users\mhill\Documents\GitHub\scripts\test.py (72ms)
[FG] parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\builtins.pyi (290ms)
[FG] binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\builtins.pyi (74ms)
[FG] binding: c:\Users\mhill\Documents\GitHub\scripts\test.py (2ms)
[FG] parsing: c:\Users\mhill\Documents\GitHub\scripts\test.py (2ms)
[FG] binding: c:\Users\mhill\Documents\GitHub\scripts\test.py (0ms)
[BG] analyzing: c:\Users\mhill\Documents\GitHub\scripts\test.py ...
[BG]   parsing: c:\Users\mhill\Documents\GitHub\scripts\test.py (0ms)
[BG]   binding: c:\Users\mhill\Documents\GitHub\scripts\test.py (0ms)
[BG]   checking: c:\Users\mhill\Documents\GitHub\scripts\test.py (1ms)
[BG] analyzing: c:\Users\mhill\Documents\GitHub\scripts\test.py (1ms)
[FG] parsing: c:\Users\mhill\Documents\GitHub\scripts\test.py (2ms)
[FG] binding: c:\Users\mhill\Documents\GitHub\scripts\test.py (0ms)
[BG] analyzing: c:\Users\mhill\Documents\GitHub\scripts\test.py ...
[BG]   parsing: c:\Users\mhill\Documents\GitHub\scripts\test.py (1ms)
[BG]   binding: c:\Users\mhill\Documents\GitHub\scripts\test.py (3ms)
[BG]   checking: c:\Users\mhill\Documents\GitHub\scripts\test.py (22ms)
[BG] analyzing: c:\Users\mhill\Documents\GitHub\scripts\test.py (26ms)
[FG] parsing: c:\Users\mhill\Documents\GitHub\scripts\test.py (0ms)
[FG] binding: c:\Users\mhill\Documents\GitHub\scripts\test.py (1ms)
[BG] analyzing: c:\Users\mhill\Documents\GitHub\scripts\test.py ...
[BG]   parsing: c:\Users\mhill\Documents\GitHub\scripts\test.py (0ms)
[BG]   binding: c:\Users\mhill\Documents\GitHub\scripts\test.py (0ms)
[BG]   checking: c:\Users\mhill\Documents\GitHub\scripts\test.py (16ms)
[BG] analyzing: c:\Users\mhill\Documents\GitHub\scripts\test.py (16ms)
[FG] parsing: c:\Users\mhill\Documents\GitHub\scripts\test.py (1ms)
[FG] binding: c:\Users\mhill\Documents\GitHub\scripts\test.py (0ms)
[BG] analyzing: c:\Users\mhill\Documents\GitHub\scripts\test.py ...
[BG]   parsing: c:\Users\mhill\Documents\GitHub\scripts\test.py (0ms)
[BG]   binding: c:\Users\mhill\Documents\GitHub\scripts\test.py (0ms)
[BG]   checking: c:\Users\mhill\Documents\GitHub\scripts\test.py (11ms)
[BG] analyzing: c:\Users\mhill\Documents\GitHub\scripts\test.py (12ms)
[FG] parsing: c:\Users\mhill\Documents\GitHub\scripts\test.py (0ms)
[FG] binding: c:\Users\mhill\Documents\GitHub\scripts\test.py (0ms)
[FG] parsing: c:\Users\mhill\Documents\GitHub\scripts\test.py (1ms)
[FG] binding: c:\Users\mhill\Documents\GitHub\scripts\test.py (1ms)
[FG] parsing: c:\Users\mhill\Documents\GitHub\scripts\test.py (0ms)
[FG] binding: c:\Users\mhill\Documents\GitHub\scripts\test.py (1ms)
[FG] parsing: c:\Users\mhill\Documents\GitHub\scripts\test.py (1ms)
[FG] binding: c:\Users\mhill\Documents\GitHub\scripts\test.py (0ms)
[FG] parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\typing.pyi (36ms)
[FG] binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\3\typing.pyi (25ms)
[FG] parsing: c:\Users\mhill\Documents\GitHub\scripts\test.py (4ms)
[FG] binding: c:\Users\mhill\Documents\GitHub\scripts\test.py (0ms)
[BG] analyzing: c:\Users\mhill\Documents\GitHub\scripts\test.py ...
[BG]   parsing: c:\Users\mhill\Documents\GitHub\scripts\test.py (0ms)
[BG]   binding: c:\Users\mhill\Documents\GitHub\scripts\test.py (0ms)
[BG]   checking: c:\Users\mhill\Documents\GitHub\scripts\test.py (23ms)
[BG] analyzing: c:\Users\mhill\Documents\GitHub\scripts\test.py (24ms)
[FG] parsing: c:\Users\mhill\Documents\GitHub\scripts\test.py (1ms)
[FG] binding: c:\Users\mhill\Documents\GitHub\scripts\test.py (0ms)
[FG] parsing: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\_typeshed\__init__.pyi (8ms)
[FG] binding: c:\Users\mhill\.vscode\extensions\ms-python.vscode-pylance-2020.6.1\server\typeshed-fallback\stdlib\2and3\_typeshed\__init__.pyi (2ms)
[BG] analyzing: c:\Users\mhill\Documents\GitHub\scripts\test.py ...
[BG]   parsing: c:\Users\mhill\Documents\GitHub\scripts\test.py (1ms)
[BG]   binding: c:\Users\mhill\Documents\GitHub\scripts\test.py (0ms)
[BG]   checking: c:\Users\mhill\Documents\GitHub\scripts\test.py (8ms)
[BG] analyzing: c:\Users\mhill\Documents\GitHub\scripts\test.py (9ms)

Code Snippet / Additional information

def my_decorator(f):
    @wraps(f)
    def wrapper(*args, **kwargs):
        print('Calling decorated function')
        return f(*args, **kwargs)
    return wrapper

@my_decorator
def example(a: int):
    print(f"The number is {a}")

image

@erictraut
Copy link
Contributor

Please refer to this issue: microsoft/pyright#774. It provides an explanation of why you're seeing this behavior when you use wraps method and provides a recommended workaround using a TypeVar to annotate your decorator.

@judej
Copy link
Contributor

judej commented Jul 9, 2020

@channelcat, did the workaround using TypeVar fix the issue?

@judej judej added enhancement New feature or request waiting for user response Requires more information from user labels Jul 9, 2020
@channelcat
Copy link
Author

Yep, that fixed my issue. I don't think I would have realized this on my own, but I'm not sure how you would make it obvious. Thanks for your help :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request waiting for user response Requires more information from user
Projects
None yet
Development

No branches or pull requests

3 participants