Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
dorschw committed Apr 16, 2024
1 parent 87f3da8 commit 797acc7
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 26 deletions.
Expand Up @@ -16,9 +16,7 @@

class PackNameValidator(BaseValidator[ContentTypes]):
error_code = "BA114"
description = (
"Validate that a content item wasn't moved from one pack to another."
)
description = "Validate that a content item wasn't moved from one pack to another."
rationale = "Pack of a content item should not be changed."
error_message = "Pack for content item '{0}' and all related files were changed from '{1}' to '{2}', please undo."
related_field = "path"
Expand Down
Expand Up @@ -20,7 +20,9 @@
class IsHaveUnitTestFileValidator(BaseValidator[ContentTypes]):
error_code = "BA124"
description = "Validate that the script/integration has a unit test file."
rationale = "Unit tests verify that behavior in code is consistent between versions."
rationale = (
"Unit tests verify that behavior in code is consistent between versions."
)
error_message = "The given {0} is missing a unit test file, please make sure to add one with the following name {2}."
related_field = "test"
is_auto_fixable = False
Expand Down
Expand Up @@ -18,9 +18,7 @@

class ShouldHaveDisplayFieldValidator(BaseValidator[ContentTypes]):
error_code = "IN117"
description = (
"Validate that type 17 configuration parameters do not include the display field."
)
description = "Validate that type 17 configuration parameters do not include the display field."
rationale = "The display name is handle by the platform."
error_message = "The following params are expiration fields and therefore can't have a 'display' field. Make sure to remove the field for the following: {0}."
fix_message = "Removed display field for the following params: {0}."
Expand Down
Expand Up @@ -22,9 +22,7 @@

class IsValidFetchValidator(BaseValidator[ContentTypes]):
error_code = "IN121"
description = (
"Validate that fetch integration has the required parameters in the right format."
)
description = "Validate that fetch integration has the required parameters in the right format."
rationale = (
"Malformed or missing parameters can lead to errors or incomplete data. "
"For more details, see https://xsoar.pan.dev/docs/integrations/fetching-incidents"
Expand Down
Expand Up @@ -18,9 +18,7 @@

class IsValidFeedIntegrationValidator(BaseValidator[ContentTypes]):
error_code = "IN122"
description = (
"Validate that all existing parameters are in the correct format for feed parameters."
)
description = "Validate that all existing parameters are in the correct format for feed parameters."
rationale = (
"Malformed or missing parameters can lead to errors or incomplete data. "
"For more details, see https://xsoar.pan.dev/docs/integrations/feeds"
Expand Down
Expand Up @@ -15,9 +15,7 @@
class IsNoneCommandArgsValidator(BaseValidator[ContentTypes]):
error_code = "IN151"
description = "Validate that all commands have at least one argument."
rationale = (
"Prevents potential errors during execution due to missing arguments."
)
rationale = "Prevents potential errors during execution due to missing arguments."
error_message = "The following commands arguments are None: {0}.\nIf the command has no arguments, use `arguments: []` or remove the `arguments` field."
related_field = "script.commands"
is_auto_fixable = True
Expand Down
Expand Up @@ -17,9 +17,7 @@

class IsValidUrlDefaultValueValidator(BaseValidator[ContentTypes]):
error_code = "IN153"
description = (
"Validate that that the URL default parameter starts with https rather than http."
)
description = "Validate that that the URL default parameter starts with https rather than http."
rationale = "URL parameters should default to 'https' for secure communication, as 'http' could expose sensitive data."
error_message = "The following params have an invalid default value. If possible, replace the http prefix with https: {0}."
fix_message = (
Expand Down
Expand Up @@ -16,9 +16,7 @@
class MissingFieldInPackMetadataValidator(BaseValidator[ContentTypes]):
error_code = "PA107"
description = "Ensure that mandatory fields exist in the pack_metadata."
rationale = (
"If these fields are missing, it may lead to unexpected behavior when uploading content packs."
)
rationale = "If these fields are missing, it may lead to unexpected behavior when uploading content packs."
fix_message = "The following fields were added to the file as empty fields: {0}."
error_message = "The following fields are missing from the file: {0}."
related_field = "name, desc, support, currentVersion, author, url, categories, tags, useCases, keywords"
Expand Down
Expand Up @@ -11,9 +11,7 @@

class PackMetadataNameValidator(BaseValidator[ContentTypes]):
error_code = "PA108"
description = (
"Validate that the pack name field exists and is different from the default name."
)
description = "Validate that the pack name field exists and is different from the default name."
rationale = "A unique and meaningful pack name is crucial for identifying the pack and its contents."
error_message = "Pack metadata name field is either missing or invalid. Please fill valid pack name."
related_field = "pack name"
Expand Down
Expand Up @@ -15,7 +15,9 @@

class IsValidUseCasesValidator(BaseValidator[ContentTypes]):
error_code = "PA119"
description = "Validate that the metadata's use cases field include valid use cases."
description = (
"Validate that the metadata's use cases field include valid use cases."
)
rationale = (
"See the list of allowed `useCases` in the platform: "
"https://xsoar.pan.dev/docs/documentation/pack-docs#pack-keywords-tags-use-cases--categories"
Expand Down

0 comments on commit 797acc7

Please sign in to comment.