MCPcopy Create free account
hub / github.com/FastLED/FastLED / _get_env_job_count

Function _get_env_job_count

ci/util/fbuild_runner.py:146–159  ·  view source on GitHub ↗

Read a positive integer job override from the environment.

(name: str)

Source from the content-addressed store, hash-verified

144
145
146def _get_env_job_count(name: str) -> int | None:
147 """Read a positive integer job override from the environment."""
148 raw_value = os.environ.get(name)
149 if raw_value is None:
150 return None
151 try:
152 value = int(raw_value)
153 except ValueError:
154 print(f"Warning: ignoring invalid {name}={raw_value!r}; expected integer")
155 return None
156 if value < 1:
157 print(f"Warning: ignoring invalid {name}={raw_value!r}; expected >= 1")
158 return None
159 return value
160
161
162def default_fbuild_framework_jobs() -> int:

Callers 2

Calls 2

printFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected