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

@NoEffect appears in general documentation examples #1674

Closed
EliahKagan opened this issue Sep 21, 2023 · 1 comment · Fixed by #1677
Closed

@NoEffect appears in general documentation examples #1674

EliahKagan opened this issue Sep 21, 2023 · 1 comment · Fixed by #1677

Comments

@EliahKagan
Copy link
Contributor

@NoEffect annotations appear in code examples in at least one place in the generated and published documentation.

This appears to have been to suppress output from some analysis tool that has been used. I don't know if they are ever still needed in the code itself or, if not, if they may ever be needed again. If not, this can be fixed by removing them. Otherwise, there may or may not be a reasonable way to have them omitted from the documentation.

In #1673, as it currently stands, I have worsened this situation by expanding them into # noqa: B015 # @NoEffect to also suppress the corresponding warning from flake8. But if they are no longer needed, then the suppression comments could be removed altogether, and instead per-file-ignores can be used to configure flake8 not to issue B015 for any code in test modules from which documentation is generated. This is a broader suppression than the current one, but it would leave other checks intact even in those couple modules, and I think the tradeoff would be worthwhile.

@Byron
Copy link
Member

Byron commented Sep 21, 2023

I think the current tooling is happy without these annotations, they can safely be removed. That would be my preference as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants