Skip to content

Commit 560de38

Browse files
authored
from pyannotate_runtime import collect_types
1 parent dcd5109 commit 560de38

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Diff for: web_programming/world_covid19_stats.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ def world_covid19_stats(url: str = "https://www.worldometers.info/coronavirus")
2222

2323

2424
if __name__ == "__main__":
25-
print("\033[1m" + "COVID-19 Status of the World" + "\033[0m\n")
26-
for key, value in world_covid19_stats().items():
27-
print(f"{key}\n{value}\n")
25+
from pyannotate_runtime import collect_types
26+
collect_types.init_types_collection()
27+
with collect_types.collect():
28+
print("\033[1m" + "COVID-19 Status of the World" + "\033[0m\n")
29+
for key, value in world_covid19_stats().items():
30+
print(f"{key}\n{value}\n")
31+
collect_types.dump_stats('type_info.json')

0 commit comments

Comments
 (0)