@@ -82,6 +82,21 @@ def run_test(global_translation, lang_code, url):
82
82
rating += mobile_rating
83
83
result_dict .update (mobile_result_dict )
84
84
85
+ rating += rate_custom_result_dict (
86
+ global_translation , result_dict , validator_result_dicts ,
87
+ desktop_result_dict , mobile_result_dict ,
88
+ desktop_rating , mobile_rating )
89
+
90
+ print (global_translation ('TEXT_TEST_END' ).format (
91
+ datetime .now ().strftime ('%Y-%m-%d %H:%M:%S' )))
92
+
93
+ return (rating , result_dict )
94
+
95
+ def rate_custom_result_dict ( # pylint: disable=too-many-arguments,too-many-locals
96
+ global_translation , result_dict , validator_result_dicts ,
97
+ desktop_result_dict , mobile_result_dict ,
98
+ desktop_rating , mobile_rating ):
99
+ rating = Rating (global_translation )
85
100
for validator_result_dict in validator_result_dicts :
86
101
validator_name = validator_result_dict ['name' ]
87
102
reference_name = None
@@ -111,11 +126,7 @@ def run_test(global_translation, lang_code, url):
111
126
rating .overall_review += (
112
127
f'- [{ reference_name } ] Advice: Rating may improve from { reference_rating } to '
113
128
f'{ validator_rating_overall } with { validator_name } changes\r \n ' )
114
-
115
- print (global_translation ('TEXT_TEST_END' ).format (
116
- datetime .now ().strftime ('%Y-%m-%d %H:%M:%S' )))
117
-
118
- return (rating , result_dict )
129
+ return rating
119
130
120
131
121
132
def get_validators ():
@@ -254,8 +265,9 @@ def validate_on_mobile(url):
254
265
return result_dict
255
266
256
267
257
- def rate_result_dict (result_dict , reference_result_dict ,
258
- mode , global_translation ):
268
+ def rate_result_dict ( # pylint: disable=too-many-branches,too-many-locals
269
+ result_dict , reference_result_dict ,
270
+ mode , global_translation ):
259
271
limit = 500
260
272
261
273
rating = Rating (global_translation )
0 commit comments