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

Solution needed to allow long URLs to be embedded in example scripts #95

Open
ansjsia opened this issue Nov 1, 2023 · 0 comments
Open
Labels
documentation Improvements or additions to documentation

Comments

@ansjsia
Copy link
Collaborator

ansjsia commented Nov 1, 2023

Description of the modifications

Sometimes, example scripts require embedding long URLs, which can violate the line length limit imposed by flake8 and trigger the error E501: line too long.

Potential solutions that are suboptimal:

  • Attempting to break the URL across multiple lines usually results in the build failing.
  • A line of code with a URL can be appended with the flag # noqa: E501 to avoid checking line length there. However, the text of this flag also appears in the final generated HTML file, when it shouldn't. For example (image from @raph-luc):
    image
  • Shortening the URL using a link shortener requires relying on a link shortening service. This could potentially be a security issue since a shortened link obfuscates what its target is, so it would be difficult to tell if it leads to the wrong site, or even to a malicious site.

A solution is needed to allow URLs to be embedded cleanly in example scripts.

Useful links and references

See this conversation for an example: #84 (comment)

@ansjsia ansjsia added the documentation Improvements or additions to documentation label Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant