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

Wrong column for ANN201 #107

Closed
roym899 opened this issue Mar 30, 2021 · 1 comment · Fixed by #109
Closed

Wrong column for ANN201 #107

roym899 opened this issue Mar 30, 2021 · 1 comment · Fixed by #109
Labels
bug Something isn't working
Milestone

Comments

@roym899
Copy link
Contributor

roym899 commented Mar 30, 2021

Describe the bug
ANN201 (probably the other ANN20... too, but I haven't tested them) is reported in the column right after def my_fun():. This can create problems (at least for coc.nvim) since that column (normally) doesn't exist.

I would expect it to report it at the closing bracket ) or at :.

To Reproduce
Minimal code example to reproduce the behavior:

"""ANN201 problem."""


def some_function():
    """Simple function."""
    pass

Results:

test.py:4:21: ANN201 Missing return type annotation for public function

(column 19 would be ), column 20 would be :)

Version Information

$ flake8 --version
3.8.4 (flake8-annotations: 2.6.1, flake8-docstrings: 1.5.0, pydocstyle: 5.1.1,
mccabe: 0.6.1, pycodestyle: 2.6.0, pyflakes: 2.2.0) CPython 3.7.5 on Linux
$ python -V
Python 3.7.5
@roym899 roym899 added the bug Something isn't working label Mar 30, 2021
@sco1 sco1 added this to the 2.6.2 milestone Mar 30, 2021
@sco1
Copy link
Owner

sco1 commented Mar 30, 2021

Thanks for this, I think it makes sense. Appreciate the PR, I'll try to get it patched sometime this week.

@sco1 sco1 mentioned this issue Mar 31, 2021
@sco1 sco1 closed this as completed in #109 Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants