MCPcopy
hub / github.com/tox-dev/tox / _diff_msg

Method _diff_msg

src/tox/tox_env/python/api.py:345–356  ·  view source on GitHub ↗
(conf: dict[str, Any], old: dict[str, Any])

Source from the content-addressed store, hash-verified

343
344 @staticmethod
345 def _diff_msg(conf: dict[str, Any], old: dict[str, Any]) -> str:
346 result: list[str] = []
347 added = [f"{k}={v!r}" for k, v in conf.items() if k not in old]
348 if added: # pragma: no branch
349 result.append(f"added {' | '.join(added)}")
350 removed = [f"{k}={v!r}" for k, v in old.items() if k not in conf]
351 if removed:
352 result.append(f"removed {' | '.join(removed)}")
353 changed = [f"{k}={old[k]!r}->{v!r}" for k, v in conf.items() if k in old and v != old[k]]
354 if changed:
355 result.append(f"changed {' | '.join(changed)}")
356 return f"python {', '.join(result)}"
357
358 @abstractmethod
359 def prepend_env_var_path(self) -> list[Path]:

Callers 3

ensure_python_envMethod · 0.95
test_diff_msg_no_diffFunction · 0.80

Calls 1

joinMethod · 0.80

Tested by 2

test_diff_msg_no_diffFunction · 0.64