Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Why do type hints not work? #802

Open
Open
@Msavage314

Description

For example this code:

#!/usr/bin/env python3
s: str = ""

raises this error:

 File "/home/robot/Robotic arm/test.py", line 4
 s: str = ""
 ^
SyntaxError: invalid syntax

Is this due to a different python version? If so, how can I update it?
I want this because I am using rpyc to connect to another ev3dev brick, and want to type hint the remote motors to get intellisense, inspection... etc. I am running from vscode on windows 11 to a python ev3dev brick connected over a cable. The brick info is:

  • brickman: v0.10.3
  • kernel: 4.14.117-ev3dev-2.3.5-ev3
  • I am on python version 3.5.3 according to sys.version

I have tried running sudo apt-get update and upgrade, but it doesn't change the version

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /