Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pybreeze/extend_multi_language/extend_english.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
"ssh_command_widget_dialog_title_key_error": "Key error",
"ssh_command_widget_dialog_message_key_file_not_exist": "Key file does not exist.",
"ssh_command_widget_error_message_unsupported_private_key": "Unsupported or invalid private key.",
"ssh_key_error_passphrase_needed": "The private key is protected by a passphrase: enter it in the Passphrase field.",
"ssh_key_error_passphrase_needed": "The private key is protected by a passphrase: enter it in the Passphrase field.", # nosec B105 # NOSONAR S2068 — UI text
"ssh_key_error_passphrase_wrong": "The passphrase for the private key is wrong.",
"ssh_key_error_putty_key": "This is a PuTTY key (.ppk), which cannot be used here: load it in PuTTYgen, "
"choose Conversions > Export OpenSSH key, and pick the exported file.",
Expand Down Expand Up @@ -275,11 +275,11 @@
"ssh_login_widget_label_user": "User",
"ssh_login_widget_label_key": "Key",
"ssh_login_widget_label_password": "Password",
"ssh_login_widget_label_passphrase": "Passphrase",
"ssh_login_widget_label_passphrase": "Passphrase", # nosec B105 # NOSONAR S2068 — UI text
"ssh_login_widget_placeholder_host": "Host name or IP address",
"ssh_login_widget_placeholder_username": "Username",
"ssh_login_widget_placeholder_password": "Password",
"ssh_login_widget_placeholder_passphrase": "The key's passphrase, if it has one",
"ssh_login_widget_placeholder_passphrase": "The key's passphrase, if it has one", # nosec B105 # NOSONAR S2068 — UI text
"ssh_login_widget_placeholder_private_key": "Private key path (OpenSSH or PEM)",
"ssh_login_widget_button_use_key_auth": "Use key auth",
"ssh_login_widget_button_connect": "Connect",
Expand Down Expand Up @@ -344,7 +344,7 @@
"extend_tools_menu_cot_prompt_editor_tab_action": _COT_PROMPT_EDITOR + " Tab",
"extend_tools_menu_cot_prompt_editor_tab_label": _COT_PROMPT_EDITOR,
"extend_tools_menu_cot_code_review_tab_action": "CoT Code Review Tab",
"extend_tools_menu_cot_code_review_tab_label": "CoT Code Review",

Check failure on line 347 in pybreeze/extend_multi_language/extend_english.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "CoT Code Review" 3 times.

See more on https://sonarcloud.io/project/issues?id=Integration-Automation_PyBreeze&issues=AaDYIKzaTB9cv8bT521w&open=AaDYIKzaTB9cv8bT521w&pullRequest=138
"extend_tools_menu_skill_prompt_editor_tab_action": _SKILL_PROMPT_EDITOR + " Tab",
"extend_tools_menu_skill_prompt_editor_tab_label": _SKILL_PROMPT_EDITOR,
"extend_tools_menu_skill_prompt_send_tab_label": "Skill Send",
Expand Down
4 changes: 2 additions & 2 deletions pybreeze/extend_multi_language/extend_traditional_chinese.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,11 @@
"ssh_login_widget_label_user": "使用者",
"ssh_login_widget_label_key": "金鑰",
"ssh_login_widget_label_password": "密碼",
"ssh_login_widget_label_passphrase": "密語",
"ssh_login_widget_label_passphrase": "密語", # nosec B105 # NOSONAR S2068 — UI text
"ssh_login_widget_placeholder_host": "主機名稱或 IP 位址",
"ssh_login_widget_placeholder_username": "使用者名稱",
"ssh_login_widget_placeholder_password": "密碼",
"ssh_login_widget_placeholder_passphrase": "私鑰的密語(沒有就留空)",
"ssh_login_widget_placeholder_passphrase": "私鑰的密語(沒有就留空)", # nosec B105 # NOSONAR S2068 — UI text
"ssh_login_widget_placeholder_private_key": "私鑰路徑(OpenSSH 或 PEM)",
"ssh_login_widget_button_use_key_auth": "使用金鑰驗證",
"ssh_login_widget_button_connect": "連線",
Expand Down Expand Up @@ -334,7 +334,7 @@
"extend_tools_menu_cot_prompt_editor_tab_action": _COT_PROMPT_EDITOR + "分頁",
"extend_tools_menu_cot_prompt_editor_tab_label": _COT_PROMPT_EDITOR,
"extend_tools_menu_cot_code_review_tab_action": "CoT 程式碼審查分頁",
"extend_tools_menu_cot_code_review_tab_label": "CoT 程式碼審查",

Check failure on line 337 in pybreeze/extend_multi_language/extend_traditional_chinese.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "CoT 程式碼審查" 3 times.

See more on https://sonarcloud.io/project/issues?id=Integration-Automation_PyBreeze&issues=AaDYIKxCTB9cv8bT521v&open=AaDYIKxCTB9cv8bT521v&pullRequest=138
"extend_tools_menu_skill_prompt_editor_tab_action": _SKILL_PROMPT_EDITOR + "分頁",
"extend_tools_menu_skill_prompt_editor_tab_label": _SKILL_PROMPT_EDITOR,
"extend_tools_menu_skill_prompt_send_tab_label": "Skill 提示詞傳送",
Expand Down
2 changes: 1 addition & 1 deletion pybreeze/pybreeze_ui/connect_gui/ssh/ssh_key_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
_PUTTY_HEADER = b"PuTTY-User-Key-File-"

# PKCS#8, which paramiko does not read (openssl genpkey, ssh-keygen -m PKCS8)
_PKCS8_PLAIN = b"-----BEGIN PRIVATE KEY-----"
_PKCS8_PLAIN = b"-----BEGIN PRIVATE KEY-----" # nosemgrep # gitleaks:allow — a format marker, not a key
_PKCS8_ENCRYPTED = b"-----BEGIN ENCRYPTED PRIVATE KEY-----"


Expand Down
3 changes: 2 additions & 1 deletion pybreeze/pybreeze_ui/editor_main/main_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,9 @@ def start_editor(debug_mode: bool = False, theme: str | None = None, **kwargs) -
# Qt objects on the worker and crashed the IDE later
collect_garbage_on_gui_thread(new_ide)
# Held until the application ends: the window is nobody else's
_window = open_main_window(new_ide, debug_mode=debug_mode, theme=theme, **kwargs)
window = open_main_window(new_ide, debug_mode=debug_mode, theme=theme, **kwargs)
ret = new_ide.exec()
del window
os._exit(ret)


Expand Down
3 changes: 2 additions & 1 deletion pybreeze/utils/curl_import/request_body.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ def _exact_float(text: str) -> float:
survives = f"{text} does not survive as a float"
if not math.isfinite(value):
raise ValueError(survives)
if Decimal(repr(value)) != Decimal(text):
# Decimal compares by value: "1.5" round-trips and this is false
if Decimal(repr(value)) != Decimal(text): # NOSONAR S2583
raise ValueError(survives)
return value

Expand Down
Loading