-
Notifications
You must be signed in to change notification settings - Fork 8
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 line numbers reported under Python 3.8 with v0.2.x #36
Comments
All the line numbers that I'd checked seemed OK, so a test case is great. |
Hmm. It is working for me:
So, are we using the same things?
This might be something in Python and/or flake8 from the AST parsing side... |
My output for
I notice that your output is much less concise. |
There is something broken with your flake8 version information, it should be listing all the registered plugins and their versions. However, you do have a newer flake8, and a newer Python. Testing on a Linux system I have access to, works fine but again Python 3.7.x and flake8 v3.8.x
I updated flake8 here,
No change: Looks like time to try Python 3.8.x and/or flake8 3.9.x on the Mac to match yours. |
OK, so this is not due to flake8 version 3.9.1 on Mac,
It might be due to the Python version, given AST parsing is involved. |
Yes, something changed with Python 3.8 - I can see this on TravisCI too, e.g. https://travis-ci.org/github/peterjc/flake8-rst-docstrings/jobs/768133481 Python 3.4 and
https://travis-ci.org/github/peterjc/flake8-rst-docstrings/jobs/768133485 Python 3.8 includes:
|
It seems https://bugs.python.org/issue33416 explicitly added There seems to have been related changes in Python 3.7, e.g. https://bugs.python.org/issue30497 and PyCQA/pyflakes#271 I have a possible fix in hand... |
Thanks a lot for your prompt response, @peterjc. |
The fix is working, just struggling with some off by one "fun" between the different versions. |
Thanks. I tested it locally on my MacOS and the line numbers are correctly reported again. 🎉
|
That's v0.2.2 released on PyPI now, conda-forge will follow usually within a day. Thank you for taking the time to report this, and help test my changes. |
Great! Thank you for the prompt response and resolution. |
Hello
Given the following code snippet
I have the following flake8 configuration (nothing specific for rst-docstrings, but including for completeness' sake):
Python version:
Python 3.8.8
Then when I run the flake8 (with
flake8-rst-docstrings==0.2.1
) on the following snippet I receive:/SCRATCHES/poc_flake8_docstrings.py:17:1: RST306 Unknown target name: "id".
when I run the flake8 (with
flake8-rst-docstrings==0.1.2
) on the following snippet I receive:/SCRATCHES/poc_flake8_docstrings.py:23:1: RST306 Unknown target name: "id".
As you can observe, when using the latest version (happens for 0.2.0 as well), flake8 shows us the wrong line number.
Since I don't wan't to fix the doc, but ignore it. I now have to place a
# noqa: RST306
on line 17. But in my real code, I have my function decorated, so I have to put the noqa behind an argument in my decorator and that makes no sense at all.The behaviour is actually wrong as well, but this is mentioned in #26
If you need any more info, or if I can be of any more assistance, don't hesitate :)
The text was updated successfully, but these errors were encountered: