Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
Signed-off-by: Teo <[email protected]>
  • Loading branch information
teocns committed Nov 14, 2024
1 parent 7f73f77 commit 5a519df
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
7 changes: 3 additions & 4 deletions agentops/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def decorator(obj):
# Add descriptors for agent properties
obj.agent_ops_agent_id = AgentOpsDescriptor("agent_id")
obj.agent_ops_agent_name = AgentOpsDescriptor("agent_name")

if name:
obj._agentops_agent_name = name

Expand Down Expand Up @@ -344,7 +344,7 @@ def new_init(self, *args, **kwargs):
agent_id=self._agentops_agent_id,
session=session,
)
except AttributeError as e:
except AttributeError:

Check warning on line 347 in agentops/decorators.py

View check run for this annotation

Codecov / codecov/patch

agentops/decorators.py#L347

Added line #L347 was not covered by tests
Client().add_pre_init_warning(
f"Failed to track an agent {name} with the @track_agent decorator."
)
Expand All @@ -358,8 +358,7 @@ def new_init(self, *args, **kwargs):
elif inspect.isfunction(obj):
obj._agentops_agent_id = str(uuid4())

Check warning on line 359 in agentops/decorators.py

View check run for this annotation

Codecov / codecov/patch

agentops/decorators.py#L359

Added line #L359 was not covered by tests
Client().create_agent(
name=obj._agentops_agent_name,
agent_id=obj._agentops_agent_id
name=obj._agentops_agent_name, agent_id=obj._agentops_agent_id
)

else:
Expand Down
2 changes: 1 addition & 1 deletion agentops/descriptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def from_stack() -> Union[UUID, None]:
if isinstance(agent_name_desc, AgentOpsDescriptor):
agent_name = agent_name_desc.__get__(var, var_type)
return agent_id

Check warning on line 50 in agentops/descriptor.py

View check run for this annotation

Codecov / codecov/patch

agentops/descriptor.py#L49-L50

Added lines #L49 - L50 were not covered by tests
# elif
# elif
except Exception as e:
continue

Check warning on line 53 in agentops/descriptor.py

View check run for this annotation

Codecov / codecov/patch

agentops/descriptor.py#L52-L53

Added lines #L52 - L53 were not covered by tests

Expand Down
2 changes: 0 additions & 2 deletions agentops/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
from .log_config import logger




def get_ISO_time():
"""
Get the current UTC time in ISO 8601 format with milliseconds precision in UTC timezone.
Expand Down

0 comments on commit 5a519df

Please sign in to comment.