Option C Tools
Loading...
Searching...
No Matches
nested_func.py
Go to the documentation of this file.
1#!/usr/bin/env python3
2# -*- coding: utf-8 -*-
3# oct/tests/tests_linter/fixtures/nested_func.py
4
5"""
6Purpose
7-------
8Fixture with a nested function where the outer has func = "..." but the
9inner calls _dbg() without defining func.
10
11Responsibilities
12----------------
13- Demonstrate that nested functions are checked independently.
14
15Diagnostics
16-----------
17Domain: TEST
18L2: lifecycle events
19L3: semantic details
20L4: deep tracing
21
22Contracts
23---------
24Inputs: none
25Outputs: none
26"""
27
28from oc_diagnostics import _dbg
29
30
31def outer():
32 func = "outer"
33 _dbg("L2", "Outer start", domain="TEST", func=func)
34
35 def inner():
36 _dbg("L3", "Inner work", domain="TEST", func="missing")
37 return 42
38
39 return inner()