Python-vscode
Python-vscode copied to clipboard
python
Issue Type: Bug
Basic problem - syntax coloring does not work when I put a return signature on a method
Create a python file create a class place the following text into the file
def lp3944_reg_read(self, reg: int) ->int:
return self.bus.read_byte_data(self.address, reg)
def lp3944_reg_write(self, reg: int, value: int) ->int:
return self.bus.write_byte_data(self.address, reg, value)
The syntax coloring will not work. If I remove the return signature from the methods such as
def lp3944_reg_read(self, reg: int):
return self.bus.read_byte_data(self.address, reg)
def lp3944_reg_write(self, reg: int, value: int):
return self.bus.write_byte_data(self.address, reg, value)
the syntax highlighting works (def and return are blue in color)
Extension version: 0.2.3 VS Code version: Code 1.67.0 (57fd6d0195bb9b9d1b49f6da5db789060795de47, 2022-05-04T12:06:02.889Z) OS version: Windows_NT x64 10.0.19043 Restricted Mode: No Remote OS version: Linux arm64 5.15.32-v8+
System Info
Item | Value |
---|---|
CPUs | Intel(R) Core(TM) i3-6320 CPU @ 3.90GHz (4 x 3912) |
GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_renderer: enabled_on video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled |
Load (avg) | undefined |
Memory (System) | 15.89GB (10.16GB free) |
Process Argv | --crash-reporter-id e49935b1-e723-47d0-963f-fcfd0b0f441a |
Screen Reader | no |
VM | 0% |
Item | Value |
---|---|
Remote | SSH: 10.0.0.145 |
OS | Linux arm64 5.15.32-v8+ |
CPUs | unknown (4 x 1400) |
Memory (System) | 0.89GB (0.04GB free) |
VM | 0% |
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
pythonvspyl392:30443607
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
pythonvsnew555:30457759
vscscmwlcmt:30465135
cppdebugcf:30475217
Try changing your theme. I am not facing this issue.
I found if I place the comment #): before the line where the syntax coloring fails, the syntax coloring works.
I don't know what 'themes' are. I have not configured anything with respect to Visual Studio Code. Everything is in its default state. I am new to the product and new to python. All I have done so far is to write a few *.py files and run a set of LEDs by controlling an I2C Lp3944 on the raspberry PI. But I am running Visual Code on Windows.
@brianreinhold does this still happens for you or is the issue gone with the changes that were done to the default templates (a style that applies to the complete vcode software, including syntax highlighting) since you've created this issue?
@GitMensch I have not done any Python coding since last spring and I don't recall if updates in VSCode or the extensions solved the problem or I just got used to it and ignored it. In any case, I dug out that old project and placed the above lines into a class and the problem is no longer present. So I assume at some time one of the many updates in the environment solved the problem!
Thank you for the update - please close the issue as "unplanned/cannot reproduce" then.
Simon,
I think I did it - not how I intended but it ended up as closed.
Brian
From: Simon Sobisch @.> Sent: Thursday, December 28, 2023 5:14 AM To: tht13/Python-vscode @.> Cc: Brian Reinhold @.>; Mention @.> Subject: Re: [tht13/Python-vscode] python (Issue #89)
Thank you for the update - please close the issue as "unplanned/cannot reproduce" then.
— Reply to this email directly, view it on GitHubhttps://github.com/tht13/Python-vscode/issues/89#issuecomment-1871023641, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJMDO64R67MXK2ZF55MOVJTYLVA7NAVCNFSM5VHUUEU2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBXGEYDEMZWGQYQ. You are receiving this because you were mentioned.Message ID: @.***>