Skip to content

Commit 69004d4

Browse files
Pylint_fix
1 parent 96313c8 commit 69004d4

File tree

4 files changed

+19
-21
lines changed

4 files changed

+19
-21
lines changed

src/backend/app_kernel.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
async def input_task_endpoint(input_task: InputTask, request: Request):
8686
"""
8787
Receive the initial input task from the user.
88-
88+
8989
---
9090
parameters:
9191
- name: body
@@ -507,10 +507,10 @@ async def approve_step_endpoint(
507507
kernel, memory_store = await initialize_runtime_and_context(
508508
human_feedback.session_id, user_id
509509
)
510-
510+
511511
# Extract user locale from request headers or feedback object
512512
user_locale = request.headers.get("X-User-Locale", human_feedback.user_locale or "en_GB")
513-
513+
514514
client = None
515515
try:
516516
client = config.get_ai_project_client()
@@ -1148,7 +1148,7 @@ async def handle_task(request: Request):
11481148
async def get_task_examples():
11491149
"""
11501150
Get examples of how to use the /api/tasks endpoint with different locales.
1151-
1151+
11521152
Returns example request payloads for testing the user_locale functionality.
11531153
"""
11541154
examples = {
@@ -1159,14 +1159,14 @@ async def get_task_examples():
11591159
"user_locale": "en_US"
11601160
},
11611161
"schedule_orientation_uk": {
1162-
"task_type": "schedule_orientation",
1162+
"task_type": "schedule_orientation",
11631163
"employee_name": "Jane Smith",
11641164
"date": "2025-07-15",
11651165
"user_locale": "en_GB"
11661166
},
11671167
"process_leave_request": {
11681168
"task_type": "process_leave_request",
1169-
"employee_name": "Alice Johnson",
1169+
"employee_name": "Alice Johnson",
11701170
"leave_type": "Annual Leave",
11711171
"start_date": "2025-08-01",
11721172
"end_date": "2025-08-15",
@@ -1179,7 +1179,7 @@ async def get_task_examples():
11791179
"user_locale": "en_US"
11801180
}
11811181
}
1182-
1182+
11831183
return {
11841184
"message": "Example requests for /api/tasks endpoint",
11851185
"examples": examples,

src/backend/kernel_agents/agent_factory.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ async def create_all_agents(
289289
# Phase 3: Create group chat manager with all agents including the planner
290290
# Generate the agent tools list for the GroupChatManager
291291
agent_tools_list = cls._generate_agent_tools_list()
292-
292+
293293
group_chat_manager = await cls.create_agent(
294294
agent_type=AgentType.GROUP_CHAT_MANAGER,
295295
session_id=session_id,
@@ -344,19 +344,19 @@ def clear_cache(cls, session_id: Optional[str] = None) -> None:
344344
@classmethod
345345
def _generate_agent_tools_list(cls) -> list[str]:
346346
"""Generate a list of all available tool names across all agents.
347-
347+
348348
Returns:
349349
List of tool names that can be used by agents
350350
"""
351351
tool_classes = [
352352
HrTools,
353-
MarketingTools,
353+
MarketingTools,
354354
ProductTools,
355355
ProcurementTools,
356356
TechSupportTools,
357357
GenericTools,
358358
]
359-
359+
360360
all_tools = []
361361
for tool_class in tool_classes:
362362
# Get all methods from the tool class
@@ -367,7 +367,5 @@ def _generate_agent_tools_list(cls) -> list[str]:
367367
method = getattr(tool_class, name)
368368
if callable(method):
369369
all_tools.append(f"{tool_class.__name__}.{name}")
370-
371-
return all_tools
372-
373370

371+
return all_tools

src/backend/kernel_agents/group_chat_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,10 +383,10 @@ def format_dates_in_action(action_text: str, locale: str) -> str:
383383
current_date = datetime.now().strftime("%Y-%m-%d")
384384
plan = await self._memory_store.get_plan_by_session(session_id=session_id)
385385
user_locale = getattr(plan, 'user_locale', self._user_locale) if plan else self._user_locale
386-
386+
387387
# Format the date before including it in HR actions
388388
formatted_date = format_date_for_user(current_date, user_locale=user_locale)
389-
389+
390390
# If the action contains date-related HR tasks, ensure formatted date is used
391391
# This ensures HR functions like schedule_orientation_session receive locale-formatted dates
392392
action_with_history = action_with_history.replace(current_date, formatted_date)

src/backend/kernel_tools/hr_tools.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ async def process_leave_request(
130130
) -> str:
131131
formatted_start_date = format_date_for_user(start_date, user_locale=kwargs.get("user_locale", "en_GB"))
132132
formatted_end_date = format_date_for_user(end_date, user_locale=kwargs.get("user_locale", "en_GB"))
133-
133+
134134
return (
135135
f"##### Leave Request Processed\n"
136136
f"**Employee Name:** {employee_name}\n"
@@ -180,7 +180,7 @@ async def verify_employment(employee_name: str) -> str:
180180
@kernel_function(description="Schedule a performance review for an employee.")
181181
async def schedule_performance_review(employee_name: str, date: str, **kwargs) -> str:
182182
formatted_date = format_date_for_user(date, user_locale=kwargs.get("user_locale", "en_GB"))
183-
183+
184184
return (
185185
f"##### Performance Review Scheduled\n"
186186
f"**Employee Name:** {employee_name}\n"
@@ -253,7 +253,7 @@ async def initiate_background_check(employee_name: str) -> str:
253253
@kernel_function(description="Organize a team-building activity.")
254254
async def organize_team_building_activity(activity_name: str, date: str, **kwargs) -> str:
255255
formatted_date = format_date_for_user(date, user_locale=kwargs.get("user_locale", "en_GB"))
256-
256+
257257
return (
258258
f"##### Team-Building Activity Organized\n"
259259
f"**Activity Name:** {activity_name}\n"
@@ -289,7 +289,7 @@ async def track_employee_attendance(employee_name: str) -> str:
289289
@kernel_function(description="Organize a health and wellness program.")
290290
async def organize_wellness_program(program_name: str, date: str, **kwargs) -> str:
291291
formatted_date = format_date_for_user(date, user_locale=kwargs.get("user_locale", "en_GB"))
292-
292+
293293
return (
294294
f"##### Health and Wellness Program Organized\n"
295295
f"**Program Name:** {program_name}\n"
@@ -348,7 +348,7 @@ async def issue_bonus(employee_name: str, amount: float) -> str:
348348
@kernel_function(description="Schedule a wellness check for an employee.")
349349
async def schedule_wellness_check(employee_name: str, date: str, **kwargs) -> str:
350350
formatted_date = format_date_for_user(date, user_locale=kwargs.get("user_locale", "en_GB"))
351-
351+
352352
return (
353353
f"##### Wellness Check Scheduled\n"
354354
f"**Employee Name:** {employee_name}\n"

0 commit comments

Comments
 (0)