question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[DOC] #noqa comment appears in docs

See original GitHub issue

Brief Description of Fix

A #noqa:E501 comment in the docstring from encode_categorical() appears in the docs. The #noqa:E501 comment exists due to a long url in the docstring which angers pycodestyle.

I’m currently not familiar enough with reStructuredText or Sphinx to know how to solve this issue.

A quick search of the published docs shows a number of #noqa comments that may not be desired.

Relevant Context

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
bdicecommented, Oct 14, 2019

I had this problem in a package I maintain, and we solved it by moving #noqa to the line where the triple quote ends, like this:

"""A fancy docstring.

It'd be a shame if we ruined this beautiful docstring with a long
`StackOverflow`_ link.

.. _StackOverflow: https://stackoverflow.com/questions/38884538/python-pandas-find-all-rows-where-all-values-are-nan
"""  # noqa: E501

Example from my package’s code: https://github.com/glotzerlab/freud/blob/0dae9cee1423ae9a0ed8923547e44c41b93b5672/freud/order.pyx#L188-L194

1reaction
bdicecommented, Oct 14, 2019

@ericmjl I see what you did there. 😆 Glad to see that worked for you. Good luck!

Read more comments on GitHub >

github_iconTop Results From Across the Web

[DOC] #noqa comment appears in docs · Issue #555 - GitHub
A #noqa:E501 comment in the docstring from encode_categorical() appears in the docs. The #noqa:E501 comment exists due to a long url in the ......
Read more >
Use comments, action items, & emoji reactions - Google Support
Reply to comments in documents or presentations · On your computer, open a document or presentation. · Click the comment. · Click Reply...
Read more >
What does '# noqa' mean in Python comments? - Stack Overflow
Adding # noqa to a line indicates that the linter (a program that automatically checks code quality) should not check this line. Any...
Read more >
Ambient Water Quality Criteria for Bacteria - Regulations.gov
Document Details · Browse Posted Comments1 ... Guidance Document that appears on the agency's list of significant guidance documents.
Read more >
Request for Information on NOAA Actions To Advance the ...
Interested persons are invited to submit comments on or before December 28, 2021. Comments Close: 12/28/2021; Document Type: Notice; Document ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found