-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add compliant and noncompliant examples of python/[email protected] #61
base: main
Are you sure you want to change the base?
Add compliant and noncompliant examples of python/[email protected] #61
Conversation
@@ -0,0 +1,18 @@ | |||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This rule detects three kinds of violations: empty cell, too many cel, as well as misplaced imports. You need to add them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improved examples.
def __CELL_EDGE__(x): | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the CELL_EDGE markers
@@ -0,0 +1,20 @@ | |||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need separate files for compliant and non compliant? Can these be in the same .py
file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to cover all three types of violation(blank cell, cell limit, misplaced imports) in one file is not possible. Is it ok if we create separate files for each example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this will pass through the Detector Library publish correctly due to being in 2 separate files and failing linter checks. Not approving this one yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's discuss what we want here. In the current state, we can't publish this since the library only supports .py
files.
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# {fact [email protected] defects=1} | ||
# —— Code Cell 1, Execution Count 1 —— # |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this example, remove all Execution Count, as this information is not needed
Write this.
# —— Code Cell 1—— #
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved.
Description of changes: