104104 "matplotlib" : "pip install concore[demo]" ,
105105}
106106
107+
107108def _get_platform_key ():
108109 """Return 'posix' or 'windows' based on OS."""
109110 return "windows" if os .name == "nt" else "posix"
@@ -206,14 +207,14 @@ def doctor_check(console):
206207 passed += 1
207208 else :
208209 console .print (
209- f" [red]✗[/red] Python { py_version } — "
210- f"concore requires Python >= 3.9"
210+ f" [red]✗[/red] Python { py_version } — concore requires Python >= 3.9"
211211 )
212212 errors += 1
213213
214214 # concore installation
215215 try :
216216 from concore_cli import __version__
217+
217218 console .print (f" [green]✓[/green] concore { __version__ } installed" )
218219 passed += 1
219220 except ImportError :
@@ -226,9 +227,7 @@ def doctor_check(console):
226227 writable = os .access (str (concore_path ), os .W_OK )
227228 status = "writable" if writable else "read-only"
228229 if writable :
229- console .print (
230- f" [green]✓[/green] CONCOREPATH: { concore_path } ({ status } )"
231- )
230+ console .print (f" [green]✓[/green] CONCOREPATH: { concore_path } ({ status } )" )
232231 passed += 1
233232 else :
234233 console .print (
@@ -285,9 +284,7 @@ def doctor_check(console):
285284 )
286285 warnings += 1
287286 else :
288- console .print (
289- f" [red]✗[/red] { tool_label } → Not found{ hint_str } "
290- )
287+ console .print (f" [red]✗[/red] { tool_label } → Not found{ hint_str } " )
291288 errors += 1
292289
293290 console .print ()
@@ -310,18 +307,19 @@ def doctor_check(console):
310307 content = filepath .read_text ().strip ()
311308 if filename == "concore.tools" :
312309 line_count = len (
313- [ln for ln in content .splitlines ()
314- if ln .strip () and not ln .strip ().startswith ("#" )]
310+ [
311+ ln
312+ for ln in content .splitlines ()
313+ if ln .strip () and not ln .strip ().startswith ("#" )
314+ ]
315315 )
316316 console .print (
317317 f" [green]✓[/green] { filename } → "
318318 f"{ line_count } tool path(s) configured"
319319 )
320320 elif filename == "concore.mcr" :
321321 if os .path .exists (os .path .expanduser (content )):
322- console .print (
323- f" [green]✓[/green] { filename } → { content } "
324- )
322+ console .print (f" [green]✓[/green] { filename } → { content } " )
325323 passed += 1
326324 else :
327325 console .print (
@@ -331,27 +329,17 @@ def doctor_check(console):
331329 warnings += 1
332330 continue
333331 elif filename == "concore.sudo" :
334- console .print (
335- f" [green]✓[/green] { filename } → { content } "
336- )
332+ console .print (f" [green]✓[/green] { filename } → { content } " )
337333 elif filename == "concore.repo" :
338- console .print (
339- f" [green]✓[/green] { filename } → { content } "
340- )
334+ console .print (f" [green]✓[/green] { filename } → { content } " )
341335 else :
342- console .print (
343- f" [green]✓[/green] { filename } → Enabled"
344- )
336+ console .print (f" [green]✓[/green] { filename } → Enabled" )
345337 passed += 1
346338 except Exception :
347- console .print (
348- f" [yellow]![/yellow] { filename } → Could not read"
349- )
339+ console .print (f" [yellow]![/yellow] { filename } → Could not read" )
350340 warnings += 1
351341 else :
352- console .print (
353- f" [dim]—[/dim] { filename } → Not set ({ description } )"
354- )
342+ console .print (f" [dim]—[/dim] { filename } → Not set ({ description } )" )
355343
356344 # Build environment variable list from TOOL_DEFINITIONS config_keys
357345 env_vars = []
@@ -361,10 +349,7 @@ def doctor_check(console):
361349 env_vars .append ("DOCKEREXE" )
362350 env_set = [v for v in env_vars if os .environ .get (v )]
363351 if env_set :
364- console .print (
365- f" [green]✓[/green] Environment variables: "
366- f"{ ', ' .join (env_set )} "
367- )
352+ console .print (f" [green]✓[/green] Environment variables: { ', ' .join (env_set )} " )
368353 passed += 1
369354 else :
370355 console .print (" [dim]—[/dim] No concore environment variables set" )
@@ -380,10 +365,7 @@ def doctor_check(console):
380365 console .print (f" [green]✓[/green] { pkg } { version } " )
381366 passed += 1
382367 else :
383- console .print (
384- f" [red]✗[/red] { pkg } → Not installed "
385- f"(pip install { pkg } )"
386- )
368+ console .print (f" [red]✗[/red] { pkg } → Not installed (pip install { pkg } )" )
387369 errors += 1
388370
389371 for pkg , install_hint in OPTIONAL_PACKAGES .items ():
@@ -393,8 +375,7 @@ def doctor_check(console):
393375 passed += 1
394376 else :
395377 console .print (
396- f" [yellow]![/yellow] { pkg } → Not installed "
397- f"({ install_hint } )"
378+ f" [yellow]![/yellow] { pkg } → Not installed ({ install_hint } )"
398379 )
399380 warnings += 1
400381
0 commit comments