-
Notifications
You must be signed in to change notification settings - Fork 413
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
chore(iast): BytesIO only aspect #10735
Conversation
|
# try_unwrap("_io", "StringIO.read") | ||
|
||
|
||
def wrapped_read_F3E51D71B4EC16EF(original_read_callable, instance, args, kwargs): |
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.
⚪ Code Quality Violation
def wrapped_read_F3E51D71B4EC16EF(original_read_callable, instance, args, kwargs): | |
def wrapped_read_f3_e51_d71_b4_e_c16_e_f(original_read_callable, instance, args, kwargs): |
use snake_case and not camelCase (...read more)
Ensure that function use snake_case
.
This rule is not valid for tests files (prefixed by test_
or suffixed by _test.py
) because testing requires some camel case methods, such as, tearDown
, setUp
, and more.
Learn More
] | ||
|
||
|
||
def stringio_aspect(orig_function: Optional[Callable], flag_added_args: int, *args: Any, **kwargs: Any) -> _io.StringIO: |
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.
🟠 Code Quality Violation
do not use Any, use a concrete type (...read more)
Use the Any
type very carefully. Most of the time, the Any
type is used because we do not know exactly what type is being used. If you want to specify that a value can be of any type, use object
instead of Any
.
Learn More
return result | ||
|
||
|
||
def bytesio_aspect(orig_function: Optional[Callable], flag_added_args: int, *args: Any, **kwargs: Any) -> _io.BytesIO: |
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.
🟠 Code Quality Violation
do not use Any, use a concrete type (...read more)
Use the Any
type very carefully. Most of the time, the Any
type is used because we do not know exactly what type is being used. If you want to specify that a value can be of any type, use object
instead of Any
.
Learn More
Datadog ReportBranch report: ✅ 0 Failed, 1888 Passed, 217 Skipped, 866.99ms Total duration (18.46s time saved) |
BenchmarksBenchmark execution time: 2024-09-20 16:57:50 Comparing candidate commit 547c31c in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 356 metrics, 48 unstable metrics. |
Checklist
Reviewer Checklist