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

[Feature] new lint rule to require a comment #. at end each python block. #23541

Closed
EdSaleh opened this issue Jun 2, 2024 · 1 comment
Closed
Labels
feature-request Request for new features or functionality info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team

Comments

@EdSaleh
Copy link

EdSaleh commented Jun 2, 2024

Create a new rule to require that each block must end with # or #.
This would work as a curly braces blocks found in C style languages.
Also, this could also be used to reformat python code by code editor to fix any indentation issues.

Users can also use a different word symbol or use a new line for this purpose. (#., #/, newline, etc). The user has the option to select the keyword they would like to have for the project.

Example:

import string
def atbash(sequence: str) -> str:
    """
    Example
    """
    output = ""
    for i in sequence:
        extract = ord(i)
        if 65 <= extract <= 90:
            output += chr(155 - extract)
        #.
        elif 97 <= extract <= 122:
            output += chr(219 - extract)
        #.
        else:
            output += i
        #.
    #.
    return output
#.
@EdSaleh EdSaleh added the feature-request Request for new features or functionality label Jun 2, 2024
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jun 2, 2024
@karthiknadig
Copy link
Member

Python extension does not implement any particular linting rule. Please file this on a specific linter that you use.

Closing this since this has nothing to do with python extension.
ref: microsoft/vscode-pylint#564

@karthiknadig karthiknadig closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2024
@github-actions github-actions bot added the info-needed Issue requires more information from poster label Jun 3, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

2 participants