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

Python comments ignored #47

Open
stefanthorpe opened this issue Sep 4, 2017 · 1 comment
Open

Python comments ignored #47

stefanthorpe opened this issue Sep 4, 2017 · 1 comment

Comments

@stefanthorpe
Copy link

stefanthorpe commented Sep 4, 2017

If I run GrammarCheck --comments-only against the following python example:

def myfunction():
    """It doesn't works for multi line python."""

    # I doesn't work for single line comments.
    pass

The first mistakes are ignored. They are both picked up if I remove '--comments-only' but so is all the code.

I get the same result if I use in .vimrc:

let g:grammarous#default_comments_only_filetypes = {
            \ '*' : 1, 'help' : 0, 'markdown' : 0,
            \ }
@rhysd
Copy link
Owner

rhysd commented Sep 5, 2017

""" ... """ is not a comment actually. It's multi-line string literal. So Vim cannot detect it as comment from its syntax only. It is an expected behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants