MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / generate_report

Method generate_report

mod/project/python/pyenv_tool.py:1043–1053  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1041 ]
1042
1043 def generate_report(self) -> Dict:
1044 report = {"environments": [], "update_time": int(time.time())}
1045 for detector in self.detectors:
1046 try:
1047 envs = detector.detect()
1048 report["environments"].extend([e.to_dict() for e in envs])
1049 except Exception as e:
1050 print("环境检测失败:{}".format(str(e)))
1051 traceback.print_exc()
1052 continue
1053 return report
1054
1055 @classmethod
1056 def update_report(cls, *now_report: Dict) -> Optional[str]:

Callers 1

init_reportMethod · 0.95

Calls 4

timeMethod · 0.80
detectMethod · 0.45
to_dictMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected