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

Same-name Variables with different type in match statements #6791

Closed
moltenwolfcub opened this issue Dec 21, 2024 · 6 comments
Closed

Same-name Variables with different type in match statements #6791

moltenwolfcub opened this issue Dec 21, 2024 · 6 comments
Assignees
Labels
needs repro Issue has not been reproduced yet

Comments

@moltenwolfcub
Copy link

Environment data

  • Pylance version: (211368) Pylance language server 2024.12.1 (pyright version 1.1.389, commit ce1325fc)
  • OS and version: Linux (Xubuntu) 22.04.5 LTS Jammy
  • Python version (& distribution if applicable, e.g. Anaconda): 3.13.1 (running through pyenv)
  • Requirements.txt:pygame==2.6.1

Code Snippet

def handlePacket(self, rawPacket: bytes) -> Optional[Exception]:
	packetType: int = Packet.decodeID(rawPacket)

	match packetType:
		case packetIDs.C2S_HANDSHAKE:
			packet: C2SHandshake = C2SHandshake.decodeData(rawPacket)
			# processing
			
		case packetIDs.C2S_PLAYER_REQUEST:
			packet: C2SRequestPlayerList = C2SRequestPlayerList.decodeData(rawPacket)
			# processing

		case _:
			# processing

Expected behavior

For the 2 different packet variables in different branches of the match statement to be able to have different types with no error

Actual behavior

The first branch produces the following error

  "C2SHandshake" is not assignable to "C2SRequestPlayerList"Pylance[reportAssignmentType](https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportAssignmentType)```

`C2SHandshake` and `C2SRequestPlayerList` both inherit from `Packet` so the code is trying to figure out which type it is and process it respectively.

## Logs

2024-12-21 21:11:54.882 [info] (211368) No configuration file found.
2024-12-21 21:11:54.882 [info] (211368) No pyproject.toml file found.
2024-12-21 21:11:54.882 [info] [Info - 21:11:54] (211368) Setting environmentName for service "squares": "3.13.1 (pygame venv)"
2024-12-21 21:11:54.882 [info] [Info - 21:11:54] (211368) Setting pythonPath for service "squares": "/home/oliver/.pyenv/versions/3.13.1/envs/pygame/bin/python"
2024-12-21 21:11:54.882 [info] [Info - 21:11:54] (211368) No include entries specified; assuming /home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares
2024-12-21 21:11:54.882 [info] [Info - 21:11:54] (211368) Auto-excluding **/node_modules
2024-12-21 21:11:54.882 [info] [Info - 21:11:54] (211368) Auto-excluding **/pycache
2024-12-21 21:11:54.882 [info] [Info - 21:11:54] (211368) Auto-excluding */.
2024-12-21 21:11:54.910 [info] [Info - 21:11:54] (211368) Assuming Python version 3.13.1.final.0
2024-12-21 21:11:54.910 [info] (211368) Assuming Python platform Linux
2024-12-21 21:11:54.953 [info] [Info - 21:11:54] (211368) Execution environment: 3.13.1 (pygame venv)
2024-12-21 21:11:54.953 [info] [Info - 21:11:54] (211368) Extra paths:
2024-12-21 21:11:54.953 [info] [Info - 21:11:54] (211368) (none)
2024-12-21 21:11:54.953 [info] [Info - 21:11:54] (211368) Python version: 3.13.1.final.0
2024-12-21 21:11:54.953 [info] [Info - 21:11:54] (211368) Python platform: Linux
2024-12-21 21:11:54.953 [info] [Info - 21:11:54] (211368) Search paths:
2024-12-21 21:11:54.953 [info] [Info - 21:11:54] (211368) /home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib
2024-12-21 21:11:54.953 [info] [Info - 21:11:54] (211368) /home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares
2024-12-21 21:11:54.953 [info] [Info - 21:11:54] (211368) /home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/typings
2024-12-21 21:11:54.953 [info] [Info - 21:11:54] (211368) /home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stubs/...
2024-12-21 21:11:54.953 [info] [Info - 21:11:54] (211368) /home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/bundled/stubs
2024-12-21 21:11:54.954 [info] [Info - 21:11:54] (211368) /home/oliver/.pyenv/versions/3.13.1/lib/python3.13
2024-12-21 21:11:54.954 [info] [Info - 21:11:54] (211368) /home/oliver/.pyenv/versions/3.13.1/lib/python3.13/lib-dynload
2024-12-21 21:11:54.954 [info] [Info - 21:11:54] (211368) /home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages
2024-12-21 21:11:54.954 [info] [Info - 21:11:54] (211368) Adding fs watcher for library directories:
file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13
file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages
2024-12-21 21:11:54.954 [info] [Info - 21:11:54] (211368) Adding fs watcher for directories:
file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares
2024-12-21 21:11:54.954 [info] (211368) Searching for source files
2024-12-21 21:11:54.956 [info] [Info - 21:11:54] (211368) Found 11 source files
2024-12-21 21:11:54.956 [info] (211368) Adding fs watcher for files:
file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/requirements.txt
file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/pyproject.toml
2024-12-21 21:11:54.994 [info] (211368) No pyproject.toml file found.
2024-12-21 21:11:54.994 [info] [Info - 21:11:54] (211368) Setting environmentName for service "": "3.13.1 (pygame venv)"
2024-12-21 21:11:54.995 [info] [Info - 21:11:54] (211368) Setting pythonPath for service "": "/home/oliver/.pyenv/versions/3.13.1/envs/pygame/bin/python"
2024-12-21 21:11:54.995 [info] [Info - 21:11:54] (211368) No include entries specified; assuming /
2024-12-21 21:11:54.995 [info] [Info - 21:11:54] (211368) Auto-excluding **/node_modules
2024-12-21 21:11:54.995 [info] [Info - 21:11:54] (211368) Auto-excluding **/pycache
2024-12-21 21:11:54.995 [info] [Info - 21:11:54] (211368) Auto-excluding */.
2024-12-21 21:11:55.033 [info] [Info - 21:11:55] (211368) Assuming Python version 3.13.1.final.0
2024-12-21 21:11:55.033 [info] (211368) Assuming Python platform Linux
2024-12-21 21:11:55.083 [info] [Info - 21:11:55] (211368) Execution environment: 3.13.1 (pygame venv)
2024-12-21 21:11:55.084 [info] [Info - 21:11:55] (211368) Extra paths:
2024-12-21 21:11:55.084 [info] [Info - 21:11:55] (211368) (none)
2024-12-21 21:11:55.084 [info] [Info - 21:11:55] (211368) Python version: 3.13.1.final.0
2024-12-21 21:11:55.084 [info] [Info - 21:11:55] (211368) Python platform: Linux
2024-12-21 21:11:55.085 [info] [Info - 21:11:55] (211368) Search paths:
2024-12-21 21:11:55.085 [info] [Info - 21:11:55] (211368) /home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib
2024-12-21 21:11:55.085 [info] [Info - 21:11:55] (211368) /
2024-12-21 21:11:55.085 [info] [Info - 21:11:55] (211368) //typings
2024-12-21 21:11:55.085 [info] [Info - 21:11:55] (211368) /home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stubs/...
2024-12-21 21:11:55.085 [info] [Info - 21:11:55] (211368) /home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/bundled/stubs
2024-12-21 21:11:55.085 [info] [Info - 21:11:55] (211368) /home/oliver/.pyenv/versions/3.13.1/lib/python3.13
2024-12-21 21:11:55.085 [info] [Info - 21:11:55] (211368) /home/oliver/.pyenv/versions/3.13.1/lib/python3.13/lib-dynload
2024-12-21 21:11:55.085 [info] [Info - 21:11:55] (211368) /home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages
2024-12-21 21:11:55.086 [info] [Info - 21:11:55] (211368) Adding fs watcher for library directories:
file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13
file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages
2024-12-21 21:11:55.086 [info] [Info - 21:11:55] (211368) Adding fs watcher for directories:
file:///%3Cdefault%20workspace%20root%3E
2024-12-21 21:11:55.086 [info] (211368) Searching for source files
2024-12-21 21:11:55.086 [info] [Error - 21:11:55] (211368) File or directory "/" does not exist.
2024-12-21 21:11:55.086 [info] [Info - 21:11:55] (211368) No source files found.
2024-12-21 21:11:55.086 [info] (211368) Adding fs watcher for files:
file:///%3Cdefault%20workspace%20root%3E/requirements.txt
file:///%3Cdefault%20workspace%20root%3E/pyproject.toml
2024-12-21 21:11:55.101 [info] (211368) pytest configurations: {"message":"spawn /home/oliver/.pyenv/versions/3.13.1/envs/pygame/bin/python ENOENT","classes":["Test"],"files":["test_.py","test.py"],"functions":["test"]}
2024-12-21 21:11:55.107 [info] (211368) Attempting to resolve using local imports: builtins
2024-12-21 21:11:55.108 [info] (211368) [BG(1)] indexing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/main.py ...
2024-12-21 21:11:55.108 [info] (211368) [BG(1)] parsing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/main.py [fs read 0ms] (17ms)
2024-12-21 21:11:55.109 [info] (211368) [BG(1)] parsing: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/builtins.pyi [fs read 1ms] (35ms)
2024-12-21 21:11:55.109 [info] (211368) [BG(1)] binding: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/builtins.pyi (10ms)
2024-12-21 21:11:55.109 [info] (211368) [BG(1)] binding: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/main.py (3ms)
2024-12-21 21:11:55.109 [info] (211368) [BG(1)] indexing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/main.py [found 2] (65ms)
2024-12-21 21:11:55.109 [info] (211368) Workspace indexing done: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/main.py
2024-12-21 21:11:55.109 [info] [Info - 21:11:55] (211368) Heap stats: total_memory_size=15677MB, total_free_size=7245MB, total_heap_size=101MB, used_heap_size=83MB, cross_worker_used_heap_size=83MB, total_physical_size=101MB, total_available_size=4013MB, heap_size_limit=4096MB
2024-12-21 21:11:55.110 [info] (211368) [BG(1)] indexing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/networkTmp.py ...
2024-12-21 21:11:55.110 [info] (211368) [BG(1)] parsing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/networkTmp.py [fs read 0ms] (1ms)
2024-12-21 21:11:55.110 [info] (211368) [BG(1)] binding: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/networkTmp.py (0ms)
2024-12-21 21:11:55.110 [info] (211368) [BG(1)] indexing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/networkTmp.py [found 1] (1ms)
2024-12-21 21:11:55.110 [info] (211368) Workspace indexing done: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/networkTmp.py
2024-12-21 21:11:55.110 [info] (211368) Attempting to resolve using local imports: builtins
2024-12-21 21:11:55.110 [info] (211368) Attempting to resolve using root path 'file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client'
2024-12-21 21:11:55.111 [info] (211368) [BG(1)] indexing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/main.py ...
2024-12-21 21:11:55.111 [info] (211368) [BG(1)] parsing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/main.py (6ms)
2024-12-21 21:11:55.111 [info] (211368) [BG(1)] binding: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/main.py (1ms)
2024-12-21 21:11:55.111 [info] (211368) [BG(1)] indexing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/main.py [found 1] (8ms)
2024-12-21 21:11:55.111 [info] (211368) Workspace indexing done: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/main.py
2024-12-21 21:11:55.111 [info] (211368) [BG(1)] indexing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/network.py ...
2024-12-21 21:11:55.111 [info] (211368) [BG(1)] parsing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/network.py [fs read 0ms] (1ms)
2024-12-21 21:11:55.111 [info] (211368) [BG(1)] binding: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/network.py (1ms)
2024-12-21 21:11:55.111 [info] (211368) [BG(1)] indexing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/network.py [found 1] (2ms)
2024-12-21 21:11:55.111 [info] (211368) Workspace indexing done: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/network.py
2024-12-21 21:11:55.111 [info] (211368) [BG(1)] indexing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/player.py ...
2024-12-21 21:11:55.111 [info] (211368) [BG(1)] parsing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/player.py [fs read 0ms] (1ms)
2024-12-21 21:11:55.111 [info] (211368) [BG(1)] binding: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/player.py (0ms)
2024-12-21 21:11:55.112 [info] (211368) [BG(1)] indexing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/player.py [found 1] (1ms)
2024-12-21 21:11:55.112 [info] (211368) Workspace indexing done: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/player.py
2024-12-21 21:11:55.112 [info] (211368) [BG(1)] indexing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/settings.py ...
2024-12-21 21:11:55.112 [info] (211368) [BG(1)] parsing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/settings.py (0ms)
2024-12-21 21:11:55.113 [info] (211368) [BG(1)] binding: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/settings.py (1ms)
2024-12-21 21:11:55.113 [info] (211368) [BG(1)] indexing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/settings.py [found 2] (1ms)
2024-12-21 21:11:55.113 [info] (211368) Workspace indexing done: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/settings.py
2024-12-21 21:11:55.113 [info] (211368) Attempting to resolve using local imports: builtins
2024-12-21 21:11:55.114 [info] (211368) Attempting to resolve using root path 'file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common'
2024-12-21 21:11:55.114 [info] (211368) [BG(1)] indexing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/c2sPackets.py ...
2024-12-21 21:11:55.114 [info] (211368) [BG(1)] parsing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/c2sPackets.py [fs read 0ms] (1ms)
2024-12-21 21:11:55.114 [info] (211368) [BG(1)] binding: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/c2sPackets.py (0ms)
2024-12-21 21:11:55.114 [info] (211368) [BG(1)] indexing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/c2sPackets.py [found 2] (1ms)
2024-12-21 21:11:55.114 [info] (211368) Workspace indexing done: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/c2sPackets.py
2024-12-21 21:11:55.114 [info] (211368) [BG(1)] indexing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/packetBase.py ...
2024-12-21 21:11:55.115 [info] (211368) [BG(1)] parsing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/packetBase.py (1ms)
2024-12-21 21:11:55.115 [info] (211368) [BG(1)] binding: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/packetBase.py (0ms)
2024-12-21 21:11:55.115 [info] (211368) [BG(1)] indexing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/packetBase.py [found 1] (1ms)
2024-12-21 21:11:55.115 [info] (211368) Workspace indexing done: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/packetBase.py
2024-12-21 21:11:55.115 [info] (211368) [BG(1)] indexing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/packetIDs.py ...
2024-12-21 21:11:55.115 [info] (211368) [BG(1)] parsing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/packetIDs.py (0ms)
2024-12-21 21:11:55.115 [info] (211368) [BG(1)] binding: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/packetIDs.py (0ms)
2024-12-21 21:11:55.115 [info] (211368) [BG(1)] indexing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/packetIDs.py [found 4] (0ms)
2024-12-21 21:11:55.115 [info] (211368) Workspace indexing done: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/packetIDs.py
2024-12-21 21:11:55.115 [info] (211368) [BG(1)] indexing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/s2cPackets.py ...
2024-12-21 21:11:55.115 [info] (211368) [BG(1)] parsing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/s2cPackets.py (1ms)
2024-12-21 21:11:55.115 [info] (211368) [BG(1)] binding: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/s2cPackets.py (0ms)
2024-12-21 21:11:55.116 [info] (211368) [BG(1)] indexing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/s2cPackets.py [found 2] (1ms)
2024-12-21 21:11:55.116 [info] (211368) Workspace indexing done: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/s2cPackets.py
2024-12-21 21:11:55.116 [info] (211368) Attempting to resolve using local imports: builtins
2024-12-21 21:11:55.116 [info] (211368) Attempting to resolve using root path 'file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/server'
2024-12-21 21:11:55.116 [info] (211368) [BG(1)] indexing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/server/main.py ...
2024-12-21 21:11:55.116 [info] (211368) [BG(1)] parsing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/server/main.py (2ms)
2024-12-21 21:11:55.116 [info] (211368) [BG(1)] binding: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/server/main.py (1ms)
2024-12-21 21:11:55.116 [info] (211368) [BG(1)] indexing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/server/main.py [found 1] (4ms)
2024-12-21 21:11:55.116 [info] (211368) Workspace indexing done: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/server/main.py
2024-12-21 21:11:55.116 [info] (211368) [BG(1)] analyzing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/main.py ...
2024-12-21 21:11:55.116 [info] (211368) [BG(1)] parsing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/main.py (3ms)
2024-12-21 21:11:55.116 [info] (211368) [BG(1)] binding: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/main.py (1ms)
2024-12-21 21:11:55.117 [info] (211368) [BG(1)] checking: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/main.py ...
2024-12-21 21:11:55.117 [info] (211368) [BG(1)] parsing: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/typing.pyi [fs read 0ms] (12ms)
2024-12-21 21:11:55.117 [info] (211368) [BG(1)] binding: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/typing.pyi (4ms)
2024-12-21 21:11:55.117 [info] (211368) pytest configurations: {"message":"script","classes":["Test"],"files":["test
.py","test.py"],"functions":["test"]}
2024-12-21 21:11:55.117 [info] (211368) pytest configurations: {"message":"spawn /home/oliver/.pyenv/versions/3.13.1/envs/pygame/bin/python ENOENT","classes":["Test"],"files":["test
.py","_test.py"],"functions":["test"]}
2024-12-21 21:11:55.118 [info] (211368) [BG(1)] parsing: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/types.pyi [fs read 0ms] (7ms)
2024-12-21 21:11:55.122 [info] (211368) [BG(1)] binding: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/types.pyi (7ms)
2024-12-21 21:11:55.126 [info] (211368) [BG(1)] parsing: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/_typeshed/init.pyi [fs read 0ms] (3ms)
2024-12-21 21:11:55.129 [info] (211368) [BG(1)] binding: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/_typeshed/init.pyi (2ms)
2024-12-21 21:11:55.131 [info] (211368) [BG(1)] parsing: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/abc.pyi [fs read 0ms] (1ms)
2024-12-21 21:11:55.131 [info] (211368) [BG(1)] binding: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/abc.pyi (0ms)
2024-12-21 21:11:55.133 [info] (211368) [BG(1)] parsing: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/_thread.pyi [fs read 1ms] (1ms)
2024-12-21 21:11:55.133 [info] (211368) [BG(1)] binding: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/_thread.pyi (1ms)
2024-12-21 21:11:55.135 [info] (211368) [BG(1)] parsing: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/sys/init.pyi [fs read 0ms] (2ms)
2024-12-21 21:11:55.136 [info] (211368) [BG(1)] binding: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/sys/init.pyi (1ms)
2024-12-21 21:11:55.143 [info] (211368) [BG(1)] parsing: file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages/pygame/init.pyi [fs read 0ms] (6ms)
2024-12-21 21:11:55.145 [info] (211368) [BG(1)] binding: file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages/pygame/init.pyi (2ms)
2024-12-21 21:11:55.146 [info] (211368) [BG(1)] parsing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/network.py [fs read 0ms] (1ms)
2024-12-21 21:11:55.147 [info] (211368) [BG(1)] binding: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/network.py (1ms)
2024-12-21 21:11:55.148 [info] (211368) [BG(1)] parsing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/player.py [fs read 0ms] (0ms)
2024-12-21 21:11:55.148 [info] (211368) [BG(1)] binding: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/player.py (1ms)
2024-12-21 21:11:55.148 [info] (211368) [BG(1)] parsing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/settings.py (0ms)
2024-12-21 21:11:55.149 [info] (211368) [BG(1)] binding: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/settings.py (0ms)
2024-12-21 21:11:55.149 [info] (211368) [BG(1)] parsing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/c2sPackets.py [fs read 0ms] (1ms)
2024-12-21 21:11:55.149 [info] (211368) [BG(1)] binding: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/c2sPackets.py (0ms)
2024-12-21 21:11:55.150 [info] (211368) [BG(1)] parsing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/packetBase.py (0ms)
2024-12-21 21:11:55.150 [info] (211368) [BG(1)] binding: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/packetBase.py (0ms)
2024-12-21 21:11:55.151 [info] (211368) [BG(1)] parsing: file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages/pygame/base.pyi [fs read 1ms] (1ms)
2024-12-21 21:11:55.152 [info] (211368) [BG(1)] binding: file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages/pygame/base.pyi (0ms)
2024-12-21 21:11:55.154 [info] (211368) [BG(1)] parsing: file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages/pygame/display.pyi [fs read 0ms] (1ms)
2024-12-21 21:11:55.155 [info] (211368) [BG(1)] binding: file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages/pygame/display.pyi (0ms)
2024-12-21 21:11:55.156 [info] (211368) [BG(1)] parsing: file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages/pygame/_common.pyi [fs read 0ms] (1ms)
2024-12-21 21:11:55.158 [info] (211368) [BG(1)] binding: file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages/pygame/_common.pyi (0ms)
2024-12-21 21:11:55.158 [info] (211368) [BG(1)] parsing: file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages/pygame/math.pyi [fs read 0ms] (2ms)
2024-12-21 21:11:55.159 [info] (211368) [BG(1)] binding: file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages/pygame/math.pyi (1ms)
2024-12-21 21:11:55.160 [info] (211368) [BG(1)] parsing: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/collections/abc.pyi [fs read 0ms] (0ms)
2024-12-21 21:11:55.161 [info] (211368) [BG(1)] binding: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/collections/abc.pyi ...
2024-12-21 21:11:55.162 [info] (211368) [BG(1)] parsing: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/_collections_abc.pyi [fs read 0ms] (0ms)
2024-12-21 21:11:55.162 [info] (211368) [BG(1)] binding: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/_collections_abc.pyi (1ms)
2024-12-21 21:11:55.162 [info] (211368) [BG(1)] binding: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/collections/abc.pyi (1ms)
2024-12-21 21:11:55.164 [info] (211368) [BG(1)] parsing: file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages/pygame/surface.pyi [fs read 0ms] (2ms)
2024-12-21 21:11:55.167 [info] (211368) [BG(1)] binding: file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages/pygame/surface.pyi (3ms)
2024-12-21 21:11:55.171 [info] (211368) [BG(1)] parsing: file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages/pygame/constants.pyi [fs read 1ms] (2ms)
2024-12-21 21:11:55.173 [info] (211368) [BG(1)] binding: file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages/pygame/constants.pyi (1ms)
2024-12-21 21:11:55.176 [info] (211368) [BG(1)] parsing: file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages/pygame/color.pyi [fs read 0ms] (0ms)
2024-12-21 21:11:55.176 [info] (211368) [BG(1)] binding: file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages/pygame/color.pyi (1ms)
2024-12-21 21:11:55.182 [info] (211368) [BG(1)] parsing: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/typing_extensions.pyi [fs read 0ms] (3ms)
2024-12-21 21:11:55.184 [info] (211368) [BG(1)] binding: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/typing_extensions.pyi (1ms)
2024-12-21 21:11:55.195 [info] (211368) [BG(1)] parsing: file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages/pygame/rect.pyi [fs read 0ms] (2ms)
2024-12-21 21:11:55.196 [info] (211368) [BG(1)] binding: file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages/pygame/rect.pyi (2ms)
2024-12-21 21:11:55.206 [info] (211368) [BG(1)] parsing: file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages/pygame/event.pyi [fs read 0ms] (1ms)
2024-12-21 21:11:55.206 [info] (211368) [BG(1)] binding: file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages/pygame/event.pyi (0ms)
2024-12-21 21:11:55.222 [info] (211368) [BG(1)] checking: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/main.py (133ms)
2024-12-21 21:11:55.222 [info] (211368) [BG(1)] analyzing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/main.py (137ms)
2024-12-21 21:11:55.243 [info] (211368) [BG(1)] analyzing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/settings.py ...
2024-12-21 21:11:55.247 [info] (211368) [BG(1)] checking: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/settings.py (9ms)
2024-12-21 21:11:55.250 [info] (211368) [BG(1)] analyzing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/client/settings.py (9ms)
2024-12-21 21:11:55.251 [info] (211368) [BG(1)] analyzing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/packetBase.py ...
2024-12-21 21:11:55.251 [info] (211368) [BG(1)] checking: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/packetBase.py ...
2024-12-21 21:11:55.251 [info] (211368) [BG(1)] parsing: file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13/abc.py [fs read 0ms] (6ms)
2024-12-21 21:11:55.251 [info] [Info - 21:11:55] (211368) Could not import '_abc' in file '/home/oliver/.pyenv/versions/3.13.1/lib/python3.13/abc.py'
2024-12-21 21:11:55.251 [info] [Info - 21:11:55] (211368) Looking in stubPath 'file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/typings'
2024-12-21 21:11:55.251 [info] [Info - 21:11:55] (211368) Attempting to resolve stub package using root path 'file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/typings'
2024-12-21 21:11:55.252 [info] [Info - 21:11:55] (211368) Attempting to resolve using root path 'file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/typings'
2024-12-21 21:11:55.252 [info] [Info - 21:11:55] (211368) Looking in root directory of execution environment 'file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares'
2024-12-21 21:11:55.252 [info] [Info - 21:11:55] (211368) Attempting to resolve stub package using root path 'file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares'
2024-12-21 21:11:55.252 [info] [Info - 21:11:55] (211368) Attempting to resolve using root path 'file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares'
2024-12-21 21:11:55.252 [info] [Info - 21:11:55] (211368) Looking for typeshed stdlib path
2024-12-21 21:11:55.252 [info] [Info - 21:11:55] (211368) Looking for typeshed stdlib path
2024-12-21 21:11:55.252 [info] [Info - 21:11:55] (211368) Attempting to resolve using root path 'file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib'
2024-12-21 21:11:55.252 [info] [Info - 21:11:55] (211368) Typeshed path not found
2024-12-21 21:11:55.252 [info] [Info - 21:11:55] (211368) Finding python search paths
2024-12-21 21:11:55.252 [info] [Info - 21:11:55] (211368) Executing interpreter: '/home/oliver/.pyenv/versions/3.13.1/envs/pygame/bin/python'
2024-12-21 21:11:55.252 [info] [Info - 21:11:55] (211368) Skipping '/home/oliver/.pyenv/versions/3.13.1/lib/python313.zip' because it is not a valid directory
2024-12-21 21:11:55.252 [info] [Info - 21:11:55] (211368) Received 3 paths from interpreter
2024-12-21 21:11:55.252 [info] [Info - 21:11:55] (211368) file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13
2024-12-21 21:11:55.252 [info] [Info - 21:11:55] (211368) file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13/lib-dynload
2024-12-21 21:11:55.253 [info] [Info - 21:11:55] (211368) file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages
2024-12-21 21:11:55.253 [info] [Info - 21:11:55] (211368) Looking in python search path 'file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13'
2024-12-21 21:11:55.253 [info] [Info - 21:11:55] (211368) Attempting to resolve stub package using root path 'file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13'
2024-12-21 21:11:55.253 [info] [Info - 21:11:55] (211368) Attempting to resolve using root path 'file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13'
2024-12-21 21:11:55.253 [info] [Info - 21:11:55] (211368) Looking in python search path 'file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13/lib-dynload'
2024-12-21 21:11:55.253 [info] [Info - 21:11:55] (211368) Attempting to resolve stub package using root path 'file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13/lib-dynload'
2024-12-21 21:11:55.253 [info] [Info - 21:11:55] (211368) Attempting to resolve using root path 'file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13/lib-dynload'
2024-12-21 21:11:55.254 [info] [Info - 21:11:55] (211368) Looking in python search path 'file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages'
2024-12-21 21:11:55.255 [info] [Info - 21:11:55] (211368) Attempting to resolve stub package using root path 'file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages'
2024-12-21 21:11:55.256 [info] [Info - 21:11:55] (211368) Attempting to resolve using root path 'file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages'
2024-12-21 21:11:55.257 [info] [Info - 21:11:55] (211368) Looking in bundled stubs path 'file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/bundled/stubs'
2024-12-21 21:11:55.257 [info] [Info - 21:11:55] (211368) Attempting to resolve stub package using root path 'file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/bundled/stubs'
2024-12-21 21:11:55.257 [info] [Info - 21:11:55] (211368) Attempting to resolve using root path 'file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/bundled/stubs'
2024-12-21 21:11:55.257 [info] [Info - 21:11:55] (211368) Looking for typeshed third-party path
2024-12-21 21:11:55.257 [info] [Info - 21:11:55] (211368) Looking for typeshed stubs path
2024-12-21 21:11:55.257 [info] [Info - 21:11:55] (211368) Typeshed path not found
2024-12-21 21:11:55.257 [info] (211368) [BG(1)] binding: file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13/abc.py (0ms)
2024-12-21 21:11:55.262 [info] (211368) [BG(1)] checking: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/packetBase.py (28ms)
2024-12-21 21:11:55.262 [info] (211368) [BG(1)] analyzing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/packetBase.py (28ms)
2024-12-21 21:11:55.262 [info] (211368) [BG(1)] analyzing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/packetIDs.py ...
2024-12-21 21:11:55.262 [info] (211368) [BG(1)] parsing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/packetIDs.py (1ms)
2024-12-21 21:11:55.262 [info] (211368) [BG(1)] binding: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/packetIDs.py (0ms)
2024-12-21 21:11:55.262 [info] (211368) [BG(1)] checking: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/packetIDs.py (0ms)
2024-12-21 21:11:55.262 [info] (211368) [BG(1)] analyzing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/packetIDs.py (1ms)
2024-12-21 21:11:55.269 [info] (211368) [BG(1)] analyzing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/s2cPackets.py ...
2024-12-21 21:11:55.270 [info] (211368) [BG(1)] parsing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/s2cPackets.py (3ms)
2024-12-21 21:11:55.270 [info] (211368) [BG(1)] binding: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/s2cPackets.py (1ms)
2024-12-21 21:11:55.323 [info] (211368) [BG(1)] checking: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/s2cPackets.py ...
2024-12-21 21:11:55.324 [info] (211368) [BG(1)] parsing: file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13/typing.py [fs read 5ms] (56ms)
2024-12-21 21:11:55.324 [info] [Info - 21:11:55] (211368) Could not import 'typing' in file '/home/oliver/.pyenv/versions/3.13.1/lib/python3.13/typing.py'
2024-12-21 21:11:55.324 [info] [Info - 21:11:55] (211368) Looking in stubPath 'file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/typings'
2024-12-21 21:11:55.326 [info] [Info - 21:11:55] (211368) Attempting to resolve stub package using root path 'file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/typings'
2024-12-21 21:11:55.327 [info] [Info - 21:11:55] (211368) Attempting to resolve using root path 'file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/typings'
2024-12-21 21:11:55.327 [info] [Info - 21:11:55] (211368) Looking in root directory of execution environment 'file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares'
2024-12-21 21:11:55.327 [info] [Info - 21:11:55] (211368) Attempting to resolve stub package using root path 'file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares'
2024-12-21 21:11:55.327 [info] [Info - 21:11:55] (211368) Attempting to resolve using root path 'file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares'
2024-12-21 21:11:55.327 [info] [Info - 21:11:55] (211368) Looking for typeshed stdlib path
2024-12-21 21:11:55.327 [info] [Info - 21:11:55] (211368) Looking for typeshed stdlib path
2024-12-21 21:11:55.328 [info] [Info - 21:11:55] (211368) Attempting to resolve using root path 'file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib'
2024-12-21 21:11:55.328 [info] [Info - 21:11:55] (211368) Typeshed path not found
2024-12-21 21:11:55.328 [info] [Info - 21:11:55] (211368) Finding python search paths
2024-12-21 21:11:55.328 [info] [Info - 21:11:55] (211368) Executing interpreter: '/home/oliver/.pyenv/versions/3.13.1/envs/pygame/bin/python'
2024-12-21 21:11:55.328 [info] [Info - 21:11:55] (211368) Skipping '/home/oliver/.pyenv/versions/3.13.1/lib/python313.zip' because it is not a valid directory
2024-12-21 21:11:55.328 [info] [Info - 21:11:55] (211368) Received 3 paths from interpreter
2024-12-21 21:11:55.328 [info] [Info - 21:11:55] (211368) file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13
2024-12-21 21:11:55.328 [info] [Info - 21:11:55] (211368) file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13/lib-dynload
2024-12-21 21:11:55.328 [info] [Info - 21:11:55] (211368) file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages
2024-12-21 21:11:55.328 [info] [Info - 21:11:55] (211368) Looking in python search path 'file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13'
2024-12-21 21:11:55.328 [info] [Info - 21:11:55] (211368) Attempting to resolve stub package using root path 'file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13'
2024-12-21 21:11:55.328 [info] [Info - 21:11:55] (211368) Attempting to resolve using root path 'file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13'
2024-12-21 21:11:55.328 [info] [Info - 21:11:55] (211368) Looking in python search path 'file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13/lib-dynload'
2024-12-21 21:11:55.328 [info] [Info - 21:11:55] (211368) Attempting to resolve stub package using root path 'file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13/lib-dynload'
2024-12-21 21:11:55.328 [info] [Info - 21:11:55] (211368) Attempting to resolve using root path 'file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13/lib-dynload'
2024-12-21 21:11:55.328 [info] [Info - 21:11:55] (211368) Looking in python search path 'file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages'
2024-12-21 21:11:55.328 [info] [Info - 21:11:55] (211368) Attempting to resolve stub package using root path 'file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages'
2024-12-21 21:11:55.329 [info] [Info - 21:11:55] (211368) Attempting to resolve using root path 'file:///home/oliver/.pyenv/versions/3.13.1/envs/pygame/lib/python3.13/site-packages'
2024-12-21 21:11:55.329 [info] [Info - 21:11:55] (211368) Looking in bundled stubs path 'file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/bundled/stubs'
2024-12-21 21:11:55.329 [info] [Info - 21:11:55] (211368) Attempting to resolve stub package using root path 'file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/bundled/stubs'
2024-12-21 21:11:55.329 [info] [Info - 21:11:55] (211368) Attempting to resolve using root path 'file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/bundled/stubs'
2024-12-21 21:11:55.329 [info] [Info - 21:11:55] (211368) Looking for typeshed third-party path
2024-12-21 21:11:55.329 [info] [Info - 21:11:55] (211368) Looking for typeshed stubs path
2024-12-21 21:11:55.329 [info] [Info - 21:11:55] (211368) Typeshed path not found
2024-12-21 21:11:55.335 [info] (211368) [BG(1)] binding: file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13/typing.py (13ms)
2024-12-21 21:11:55.340 [info] (211368) [BG(1)] checking: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/s2cPackets.py (74ms)
2024-12-21 21:11:55.341 [info] (211368) [BG(1)] analyzing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/common/s2cPackets.py (78ms)
2024-12-21 21:11:55.342 [info] (211368) pytest configurations: {"message":"script","classes":["Test"],"files":["test
.py","_test.py"],"functions":["test"]}
2024-12-21 21:11:55.347 [info] (211368) [BG(1)] analyzing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/server/main.py ...
2024-12-21 21:11:55.347 [info] (211368) [BG(1)] parsing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/server/main.py (2ms)
2024-12-21 21:11:55.347 [info] (211368) [BG(1)] binding: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/server/main.py (1ms)
2024-12-21 21:11:55.348 [info] (211368) [BG(1)] checking: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/server/main.py ...
2024-12-21 21:11:55.348 [info] (211368) [BG(1)] parsing: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/queue.pyi [fs read 1ms] (2ms)
2024-12-21 21:11:55.348 [info] (211368) [BG(1)] binding: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/queue.pyi (0ms)
2024-12-21 21:11:55.352 [info] (211368) [BG(1)] parsing: file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13/queue.py [fs read 1ms] (3ms)
2024-12-21 21:11:55.356 [info] (211368) [BG(1)] binding: file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13/queue.py (2ms)
2024-12-21 21:11:55.360 [info] (211368) [BG(1)] parsing: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/socket.pyi [fs read 0ms] (6ms)
2024-12-21 21:11:55.366 [info] (211368) [BG(1)] binding: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/socket.pyi (5ms)
2024-12-21 21:11:55.381 [info] (211368) [BG(1)] parsing: file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13/socket.py [fs read 0ms] (13ms)
2024-12-21 21:11:55.387 [info] (211368) [BG(1)] binding: file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13/socket.py ...
2024-12-21 21:11:55.387 [info] (211368) [BG(1)] parsing: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/_socket.pyi [fs read 0ms] (5ms)
2024-12-21 21:11:55.398 [info] (211368) [BG(1)] binding: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/_socket.pyi (11ms)
2024-12-21 21:11:55.404 [info] (211368) [BG(1)] binding: file:///home/oliver/.pyenv/versions/3.13.1/lib/python3.13/socket.py (23ms)
2024-12-21 21:11:55.407 [info] (211368) [BG(1)] parsing: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/time.pyi [fs read 0ms] (3ms)
2024-12-21 21:11:55.408 [info] (211368) [BG(1)] binding: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/time.pyi (1ms)
2024-12-21 21:11:55.440 [info] (211368) [BG(1)] parsing: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/enum.pyi [fs read 0ms] (1ms)
2024-12-21 21:11:55.441 [info] (211368) [BG(1)] binding: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist/typeshed-fallback/stdlib/enum.pyi (1ms)
2024-12-21 21:11:55.461 [info] (211368) [BG(1)] checking: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/server/main.py (115ms)
2024-12-21 21:11:55.462 [info] (211368) [BG(1)] analyzing: file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares/server/main.py (119ms)
2024-12-21 21:11:55.544 [info] [Info - 21:11:55] (211368) Indexer background runner(6) root directory: file:///home/oliver/.vscode/extensions/ms-python.vscode-pylance-2024.12.1/dist (index)
2024-12-21 21:11:55.544 [info] [Info - 21:11:55] (211368) Indexing(6) started
2024-12-21 21:11:55.619 [info] (211368) [IDX(6)] scan packages file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares ...
2024-12-21 21:11:55.619 [info] (211368) [IDX(6)] read stdlib indices (19ms)
2024-12-21 21:11:55.718 [info] (211368) [IDX(6)] scan packages file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares (118ms)
2024-12-21 21:11:55.719 [info] [Info - 21:11:55] (211368) scanned(6) 13 files over 1 exec env
2024-12-21 21:11:55.834 [info] (211368) [IDX(6)] index packages file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares ...
2024-12-21 21:11:55.834 [info] (211368) [IDX(6)] index execution environment file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares [found 1316 in 13 files] (4ms)
2024-12-21 21:11:55.835 [info] (211368) [IDX(6)] index packages file:///home/oliver/Desktop/dev/python/projects/pygame/multiplayer/squares [found 1316 in 1 exec envs] (13ms)
2024-12-21 21:11:55.835 [info] [Info - 21:11:55] (211368) indexed(6) 13 files over 1 exec env
2024-12-21 21:11:55.859 [info] [Info - 21:11:55] (211368) Indexing finished(6).

@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Dec 21, 2024
@moltenwolfcub
Copy link
Author

I apologise if I have over-written or shared too many log files. (Or if it's intended this way and I've written the code wrong)

but I'd appreciate some help

@moltenwolfcub
Copy link
Author

If you need any more info please ask. I'm happy to share whatever is necessary

@moltenwolfcub
Copy link
Author

Simplified code example:

user = input(">")

match user:
	case "hello":
		var: str = "foo"
	case "world":
		var: int = 7
	case _:
		var: bool = True

pylance is complaining Declaration "var" is obscured by a declaration of the same namePylance[reportRedeclaration](https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportRedeclaration)
on vscode hover text (over the first var assignment)

@erictraut
Copy link
Contributor

Pyright (the type checker upon which pylance is based) is working as designed here, so this isn't a bug.

In your code sample, you have a variable named var. By Python scoping rules, there is only one such variable var. Unlike other languages, Python doesn't create a new scope for if or case blocks. For any given symbol, you can declare its type only once. You're attempting to redeclare it with incompatible types, which is disallowed by pyright. For more details, see this documentation.

You can declare the type to be str | int | bool, a union of the three types. You can then assign values of any of these types to the variable without violating its type declaration.

@moltenwolfcub
Copy link
Author

Ah, thank you so much!

I didn't realise that they weren't different scopes. That makes a lot of sense now. (having spent time in statically typed languages, I just assumed this was how it was)

@moltenwolfcub
Copy link
Author

Having looked into what you provided me, I just decided it wasn't worth the hassle and gave the variables different names in the different branches to avoid the issue.

Thanks for everything though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs repro Issue has not been reproduced yet
Projects
None yet
Development

No branches or pull requests

3 participants