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

"#region" with trailing word character (ex. _) triggers an error "#region is missing corresponding #endregion" #3765

Closed
kurtschelfthout opened this issue Dec 16, 2022 · 5 comments
Assignees
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@kurtschelfthout
Copy link

Any comment that contains the word "region" triggers an error "#region is missing corresponding #endregion"

Also I can't find a way to turn region checking off entirely ( e.g. using "python.analysis.diagnosticSeverityOverrides"). Nothing relevant is listed in the settings.

Environment data

  • Language Server version: Pylance language server 2022.12.20 (pyright 621d886b) starting
  • OS and version: Windows 10
  • Python version (& distribution if applicable, e.g. Anaconda): 3.9

Code Snippet

def foo() -> None:
    # region_name
    pass

Repro Steps

Just paste that code in a py file, see the spurious error show up.

Logs

Not relevant here I reckon

@return42
Copy link

IDK if it is related to pylance, but I have this issue when using pyright.

@rchiodo
Copy link
Contributor

rchiodo commented Dec 16, 2022

Thanks for the bug. I believe I've found the root cause, so we should be able to fix this soon.

@PylanceBot PylanceBot added the fixed in next version (main) A fix has been implemented and will appear in an upcoming version label Dec 16, 2022
@heejaechang
Copy link
Contributor

This issue has been fixed in prerelease version 2023.1.11, which we've just released. You can find the changelog here: CHANGELOG.md

@taldcroft
Copy link

I'm seeing this again with the latest releases of VS code 1.77.1 and Pylance v2023.4.20 on Mac OSX.

image

@debonte
Copy link
Contributor

debonte commented Apr 18, 2023

@taldcroft, @HsuanTingLu, that's #3857.

I changed the title of this issue to better distinguish between the two.

@debonte debonte changed the title Any comment that contains the word "region" triggers an error "#region is missing corresponding #endregion" "#region" with trailing word character (ex. _) triggers an error "#region is missing corresponding #endregion" Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

7 participants