SIENTIAPDE-1084

Refactor debug logging in gates.py to remove f-string usage for improved consistency and readability
This commit is contained in:
vitor-aignosi
2025-09-03 09:53:07 -03:00
parent 69a44d5200
commit 456eb5c674

View File

@@ -416,17 +416,17 @@ class Gates(BaseActivity):
data['timestamp'] = input_data['timestamp'] data['timestamp'] = input_data['timestamp']
else: else:
self.debug( self.debug(
f"Data has timestamp, sorting data by timestamp", metadata) "Data has timestamp, sorting data by timestamp", metadata)
# If policy_type is lts, we need to sort the data by timestamp descending and take the first policy_value rows # If policy_type is lts, we need to sort the data by timestamp descending and take the first policy_value rows
if policy_type == 'lts': if policy_type == 'lts':
self.debug( self.debug(
f"Sorting data by timestamp descending", metadata) "Sorting data by timestamp descending", metadata)
data = data.sort_values(by='timestamp', ascending=False) data = data.sort_values(by='timestamp', ascending=False)
# If policy_type is erl, we need to sort the data by timestamp ascending and take the first policy_value rows # If policy_type is erl, we need to sort the data by timestamp ascending and take the first policy_value rows
elif policy_type == 'erl': elif policy_type == 'erl':
self.debug( self.debug(
f"Sorting data by timestamp ascending", metadata) "Sorting data by timestamp ascending", metadata)
data = data.sort_values(by='timestamp', ascending=True) data = data.sort_values(by='timestamp', ascending=True)
else: else:
self.error( self.error(