Skip to content

Commit 53d5c01

Browse files
committed
linter
1 parent d60d02e commit 53d5c01

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

uncoder-core/app/translator/core/str_value_manager.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
limitations under the License.
1717
-----------------------------------------------------------------
1818
"""
19+
1920
from typing import ClassVar, Optional, TypeVar, Union
2021

2122
from app.translator.core.custom_types.values import ValueType

uncoder-core/app/translator/platforms/logrhythm_axon/renders/logrhythm_axon_query.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616
limitations under the License.
1717
-----------------------------------------------------------------
1818
"""
19+
1920
from typing import Union
2021

2122
from app.translator.const import DEFAULT_VALUE_TYPE
23+
from app.translator.core.context_vars import return_only_first_query_ctx_var
2224
from app.translator.core.custom_types.tokens import LogicalOperatorType
2325
from app.translator.core.custom_types.values import ValueType
2426
from app.translator.core.exceptions.core import StrictPlatformException
@@ -262,6 +264,8 @@ def _generate_from_tokenized_query_container(self, query_container: TokenizedQue
262264
meta_info=query_container.meta_info,
263265
source_mapping=source_mapping,
264266
)
267+
if return_only_first_query_ctx_var.get() is True:
268+
return finalized_query
265269
queries_map[source_mapping.source_id] = finalized_query
266270

267271
return self.finalize(queries_map)

uncoder-core/app/translator/platforms/palo_alto/renders/cortex_xsiam.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ def _get_value_type(field_name: str, value: Union[int, str, StrValue], value_typ
5151

5252
@staticmethod
5353
def _wrap_str_value(value: str) -> str:
54-
if value == 'SetValue':
55-
return f'"REGISTRY_SET_VALUE"'
56-
if value == 'DeleteValue':
57-
return f'"REGISTRY_DELETE_VALUE"'
58-
if value == 'CreateKey':
59-
return f'"REGISTRY_CREATE_KEY"'
54+
if value == "SetValue":
55+
return '"REGISTRY_SET_VALUE"'
56+
if value == "DeleteValue":
57+
return '"REGISTRY_DELETE_VALUE"'
58+
if value == "CreateKey":
59+
return '"REGISTRY_CREATE_KEY"'
6060
return f'"{value}"'
6161

6262
def equal_modifier(self, field: str, value: DEFAULT_VALUE_TYPE) -> str:

0 commit comments

Comments
 (0)