Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flake8 links in PyCharm are incorrect and do not take you to the source code

I have setup my PyCharm as described in Descriptive flake8 errors in PyCharm . The argument line looks like the following.

$FilePath$ --format='%(path)s:%(row)d,%(col)d:%(code)s:%(text)s:https://lintlyci.github.io/Flake8Rules/rules/%(code)s.html'

When I run Flake8 in PyCharm, I get the nicely formated text as described.

'C:\Users\XYZ\PycharmProjects\TestProject\test.py:77,80:E501:line too long (106 > 79 characters):https://lintlyci.github.io/Flake8Rules/rules/E501.html'

However, when I click on the error to goto the spot on the code, the link is invalid. For example, the links for above looks like the following.

C:\Users\XYZ\PycharmProjects\TestProject\test.py:77,80:E501:line

If I run the above from the terminal from within PyCharm I get the following output and the links work.

test.py:77,80:E501:line too long (106 > 79 characters):https://lintlyci.github.io/Flake8Rules/rules/E501.html

Any idea on why this is happening?

like image 835
Tim Calderwood Avatar asked Oct 25 '25 10:10

Tim Calderwood


1 Answers

For correct output you have to run flake8 command from working directory (project root)

like image 151
bigEvilBanana Avatar answered Oct 28 '25 00:10

bigEvilBanana



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!