@@ -46,7 +46,10 @@ def commands_groups(
46
46
return implemented , unimplemented
47
47
48
48
49
- def print_unimplemented_commands (all_commands : dict , implemented : dict , unimplemented : dict ) -> None :
49
+ def print_unimplemented_commands (
50
+ all_commands : dict ,
51
+ unimplemented : dict ,
52
+ implemented : dict ) -> None :
50
53
def print_groups (dictionary : dict ):
51
54
for group in dictionary :
52
55
print (f'### { group } ' )
@@ -68,8 +71,17 @@ def print_groups(dictionary: dict):
68
71
print_groups (unimplemented )
69
72
70
73
71
- if __name__ == '__main__' :
74
+ def get_unimplemented_and_implemented_commands () -> tuple [dict [str , list [str ]], dict [str , list [str ]]]:
75
+ """Returns 2 dictionaries, one of unimplemented commands and another of implemented commands
76
+
77
+ """
72
78
commands = download_redis_commands ()
73
79
implemented_commands_set = implemented_commands ()
74
- unimplemented_dict , implemented_dict = commands_groups (commands , implemented_commands_set )
80
+ implemented_dict , unimplemented_dict = commands_groups (commands , implemented_commands_set )
81
+ return unimplemented_dict , implemented_dict
82
+
83
+
84
+ if __name__ == '__main__' :
85
+ commands = download_redis_commands ()
86
+ unimplemented_dict , implemented_dict = get_unimplemented_and_implemented_commands ()
75
87
print_unimplemented_commands (commands , unimplemented_dict , implemented_dict )
0 commit comments