Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/python/mypy
/ should_force_color
Function
should_force_color
mypy/util.py:598–603 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
596
597
598
def
should_force_color() -> bool:
599
env_var = os.getenv(
"MYPY_FORCE_COLOR"
, os.getenv(
"FORCE_COLOR"
,
"0"
))
600
try
:
601
return
bool(int(env_var))
602
except
ValueError:
603
return
bool(env_var)
604
605
606
class
FancyFormatter:
Callers
2
request
Function · 0.90
__init__
Method · 0.85
Calls
2
bool
Class · 0.85
int
Class · 0.85
Tested by
no test coverage detected
Used in the wild
real call sites across dependent graphs
searching dependent graphs…