Skip to content
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

demisto/python3:3.10.14.100715 | 0-100 | PR batch #5/19 #35238

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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ args:
commonfields:
id: RandomPhotoNasa
version: -1
dockerimage: demisto/python3:3.10.12.63474
dockerimage: demisto/python3:3.10.14.100715
enabled: true
name: RandomPhotoNasa
runas: DBotWeakRole
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ args:
- name: Port
default: true
description: Port to check
defaultValue: "443"
defaultValue: '443'
outputs:
- contextPath: SSLVerifier.Certificate.Expiry
description: Time of expiration
Expand All @@ -30,7 +30,7 @@ outputs:
type: string
scripttarget: 0
subtype: python3
dockerimage: demisto/python3:3.10.12.63474
dockerimage: demisto/python3:3.10.14.100715
runas: DBotWeakRole
fromversion: 5.0.0
tests:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ args:
- name: value
required: true
description: Value to strip accent marks from
comment: |-
comment: |-
Strip accent marks (diacritics) from a given string.
For example: "Niño שָׁלוֹם Montréal اَلسَّلَامُ عَلَيْكُمْ‎"
Will return: "Nino שלום Montreal السلام عليكم"
commonfields:
id: StripAccentMarksFromString
version: -1
dockerimage: demisto/python3:3.10.12.63474
dockerimage: demisto/python3:3.10.14.100715
enabled: true
name: StripAccentMarksFromString
runas: DBotWeakRole
Expand Down
2 changes: 1 addition & 1 deletion Packs/CyberChef/Integrations/CyberChef/CyberChef.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ script:
- contextPath: CyberChef.Magic
description: Output of the Magic operation
type: string
dockerimage: demisto/python3:3.10.12.63474
dockerimage: demisto/python3:3.10.14.100715
runonce: false
script: ''
subtype: python3
Expand Down
2 changes: 1 addition & 1 deletion Packs/DeepL/Integrations/DeepL/DeepL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ script:
description: File Size
- contextPath: InfoFile.Type
description: File type e.g. "PDF"
dockerimage: demisto/python3:3.10.12.63474
dockerimage: demisto/python3:3.10.14.100715
runonce: false
script: ''
subtype: python3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,22 @@ def main():

instance_name = get_instance_name(args)
instance_name = instance_name.replace(" ", "_")
command = '!{0}-fetch'.format(instance_name)
command = f'!{instance_name}-fetch'

response = demisto.executeCommand(command, {})

try:
if not response and expect_data:
raise Exception("Error occurred while fetching incidents from {}".format(instance_name))
raise Exception(f"Error occurred while fetching incidents from {instance_name}")

for inc in response:
contents = inc.get('Contents', '')
error_msg_in_incident = demisto.args().get('error_msg_in_incident')
if error_msg_in_incident and error_msg_in_incident in str(contents):
return_error("Error message '{0}' encountered while fetching incidents from {1}: {2}".format(
return_error("Error message '{}' encountered while fetching incidents from {}: {}".format(
error_msg_in_incident, instance_name, str(contents)))
if re.match("invalid character \'[a-zA-Z]\' looking for beginning of value", str(contents), re.IGNORECASE):
return_error("Error occurred while fetching incidents from {0}: {1}".format(instance_name, str(contents)))
return_error(f"Error occurred while fetching incidents from {instance_name}: {str(contents)}")
if add_to_context:
try:
for entry in contents:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ args:
description: The name of the instance you want to fetch from
- name: expect_data
description: Whether to expect data to return from the fetch
defaultValue: "true"
defaultValue: 'true'
- name: brand_name
description: The name of the brand you want to fetch from
- name: add_to_context
auto: PREDEFINED
predefined:
- "true"
- "false"
- 'true'
- 'false'
description: Add the raw JSON of incidents to context
defaultValue: "false"
defaultValue: 'false'
- name: error_msg_in_incident
description: If this error message appears in the contents of the fetched incidents, will return error
defaultValue: "Error"
defaultValue: Error
outputs:
- contextPath: FetchedIncidents
description: All incidents entries (raw JSON)
scripttarget: 0
runonce: false
tests:
- No test - cannot create a dummy integration inorder to test that
dockerimage: demisto/python3:3.10.12.63474
dockerimage: demisto/python3:3.10.14.100715
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
from typing import Dict, Any, List
from typing import Any


def instance_check(instances, integration_name: str) -> List:
def instance_check(instances, integration_name: str) -> list:
instance_names = []
for instance_name, details in instances.items():
if details.get('brand') == integration_name:
Expand All @@ -13,7 +13,7 @@ def instance_check(instances, integration_name: str) -> List:
return instance_names


def get_instance_name_command(args: Dict[str, Any]) -> CommandResults:
def get_instance_name_command(args: dict[str, Any]) -> CommandResults:
integration_name = args.get('integration_name', '')

instances = demisto.getModules()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ tags:
timeout: '0'
type: python
subtype: python3
dockerimage: demisto/python3:3.10.12.63474
dockerimage: demisto/python3:3.10.14.100715
fromversion: 6.0.0
tests:
- No test
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ outputs:
type: boolean
scripttarget: 0
subtype: python3
dockerimage: demisto/python3:3.10.12.63474
dockerimage: demisto/python3:3.10.14.100715
runas: DBotWeakRole
tests:
- No test
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ outputs:
type: boolean
scripttarget: 0
subtype: python3
dockerimage: demisto/python3:3.10.12.63474
dockerimage: demisto/python3:3.10.14.100715
runas: DBotWeakRole
tests:
- No test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401

from typing import Dict, Any, Tuple
from typing import Any


def check_components(components: list, context: Any):
Expand All @@ -21,7 +21,7 @@ def check_components(components: list, context: Any):
raise KeyError


def check_fields(fields_to_search_array: list, context_json) -> Tuple[bool, Any]:
def check_fields(fields_to_search_array: list, context_json) -> tuple[bool, Any]:
"""
Args:
fields_to_search_array(list): list of fields to search
Expand All @@ -42,7 +42,7 @@ def check_fields(fields_to_search_array: list, context_json) -> Tuple[bool, Any]
return True, None


def check_fields_command(args: Dict[str, Any]) -> CommandResults:
def check_fields_command(args: dict[str, Any]) -> CommandResults:
"""
Args:
args(dict): args from demisto
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ tags:
timeout: '0'
type: python
subtype: python3
dockerimage: demisto/python3:3.10.12.63474
dockerimage: demisto/python3:3.10.14.100715
fromversion: 6.0.0
tests:
- No test
Loading