99from jinja2 import Template
1010
1111# Local
12- from src .main .config import NB
1312from src .main .config import TEMPLATES_DIR
1413
1514
@@ -64,7 +63,7 @@ def get_files_created(data: Dict[str, Any]) -> int:
6463 return 1
6564
6665
67- def get_target_line_dict (line : str ) -> Dict [str , str ]:
66+ def get_target_line_dict (nb_loc , line : str ) -> Dict [str , str ]:
6867 """
6968 Parse a table line into a dictionary based on notebook configuration.
7069
@@ -87,11 +86,11 @@ def get_target_line_dict(line: str) -> Dict[str, str]:
8786 "nb" : "" ,
8887 }
8988
90- if NB == 0 :
89+ if nb_loc == 0 :
9190
9291 keys = list (data .keys ())[:- 1 ] # Exclude 'nb'
9392
94- elif NB == 1 :
93+ elif nb_loc == 1 :
9594
9695 keys = list (data .keys ())
9796
@@ -115,7 +114,7 @@ def get_target_line_dict(line: str) -> Dict[str, str]:
115114 return results
116115
117116
118- def get_target_line_updated (data : Dict [str , str ], widths : Dict [str , int ]) -> str :
117+ def get_target_line_updated (nb_loc , data : Dict [str , str ], widths : Dict [str , int ]) -> str :
119118 """
120119 Format a table line with proper padding based on column widths.
121120
@@ -132,7 +131,7 @@ def get_target_line_updated(data: Dict[str, str], widths: Dict[str, int]) -> str
132131
133132 target_line = "|"
134133
135- if NB == 0 :
134+ if nb_loc == 0 :
136135
137136 for key , value in data .items ():
138137
@@ -148,7 +147,7 @@ def get_target_line_updated(data: Dict[str, str], widths: Dict[str, int]) -> str
148147
149148 target_line += f" { value_str } { padding } |"
150149
151- elif NB == 1 :
150+ elif nb_loc == 1 :
152151
153152 for key , value in data .items ():
154153
0 commit comments