-
Notifications
You must be signed in to change notification settings - Fork 6
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
Ignore individual lines #34
Comments
A construct like |
I don't know how linters robustly check if the end-of-line comment includes Of course, how to allow one construct but not another that occurs in the same line, is a different issue :-) |
Actually, low effort: just ~5 LOC. The try/except separation was resolved in previous commit. |
Forgot to update docs... |
Most linters permit creating exceptions when we know it's OK to break a rule. This is typically done by adding a comment like
# noqa: F401
to disable reporting error F401 just for that line. The exact form of the comment depends on the linter.In the case of
allowed
, this would be useful when creating an assignment that contains scaffolding code that students aren't required to understand or change. If the scaffolding code contains non-taught constructs,allowed
will report them. This may confuse students and makes it harder to distinguish violations in teacher's code and student's code.Since
allowed
doesn't have different error codes, a comment like# allowed
should be enough, stating that the constructs in that line are allowed.The text was updated successfully, but these errors were encountered: