-
Notifications
You must be signed in to change notification settings - Fork 145
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
fix: type hint error #1553
fix: type hint error #1553
Conversation
dongtai_engine/tasks.py
Outdated
@@ -576,7 +577,7 @@ def vul_recheck(): | |||
header_raw[index] = f'{_header_name}:{recheck_payload}' | |||
break | |||
try: | |||
headers = base64.b64encode('\n'.join(header_raw)) | |||
headers = base64.b64encode('\n'.join(header_raw).encode("utf-8")) |
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.
should use raw_unicode_escape
instead of utf-8
.
# skip until sca data stable | ||
self.assertGreaterEqual(asset.vul_count, 0) | ||
self.assertGreaterEqual(cast(int, asset.vul_count), 0) |
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.
try annotate in asset
model class
dongtai_engine/tasks.py
Outdated
@@ -603,7 +604,7 @@ def vul_recheck(): | |||
cookie_raw = ';'.join(cookie_raw_items) | |||
header_raw[cookie_index] = cookie_raw | |||
try: | |||
headers = base64.b64encode('\n'.join(header_raw)) | |||
headers = base64.b64encode('\n'.join(header_raw).encode("utf-8")) |
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.
here
No description provided.