Skip to content

Commit febacc6

Browse files
committed
style: more nits.
1 parent e56e875 commit febacc6

File tree

3 files changed

+1
-9
lines changed

3 files changed

+1
-9
lines changed

src/functions_framework/aio/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ async def _handle_not_found(request: Request):
164164

165165

166166
def _configure_app_execution_id_logging():
167-
# Logging needs to be configured before app logger is accessed
168167
logging.config.dictConfig(
169168
{
170169
"version": 1,

tests/test_execution_id.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,7 @@ def view_func():
224224
execution_id, "_generate_execution_id", lambda: TEST_EXECUTION_ID
225225
)
226226

227-
# Use a simple object instead of Mock to properly test attribute assignment
228-
class MockG:
229-
pass
230-
231-
mock_g = MockG()
227+
mock_g = Mock()
232228
monkeypatch.setattr(execution_id.flask, "g", mock_g)
233229
monkeypatch.setattr(execution_id.flask, "has_request_context", lambda: True)
234230
execution_id.set_execution_context(request)(view_func)()

tests/test_functions/execution_id/async_main.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,14 @@ async def async_trace_test(request):
4343
}
4444

4545

46-
# Sync function to test the sync branch in async decorator
4746
def sync_function_in_async_context(request):
48-
"""A sync function that can be called from async context."""
4947
return {
5048
"execution_id": request.headers.get("Function-Execution-Id"),
5149
"type": "sync",
5250
}
5351

5452

5553
def sync_cloudevent_with_context(cloud_event):
56-
"""A sync CloudEvent function that accesses execution context."""
5754
context = execution_id._get_current_context()
5855
if context:
5956
logger.info(f"Execution ID in sync CloudEvent: {context.execution_id}")

0 commit comments

Comments
 (0)