From e57ddcf0c54f6e58e05a3b99a410a496ea8b4a67 Mon Sep 17 00:00:00 2001 From: iam-py-test <84232764+iam-py-test@users.noreply.github.com> Date: Sat, 6 Nov 2021 19:25:38 -0400 Subject: [PATCH] Update scripts/compile.py Fix the styling Co-authored-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com> --- scripts/compile.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/compile.py b/scripts/compile.py index 87cb0f331..75038f20c 100644 --- a/scripts/compile.py +++ b/scripts/compile.py @@ -102,9 +102,11 @@ def print_rules( else: endrules.write(plain_format.format(rule, url_pattern) + "\n") -def getrules(): - import requests - return requests.get("https://raw.githubusercontent.com/ClearURLs/Rules/master/data.min.json").text +def getrules() -> str: + RULES = "https://raw.githubusercontent.com/ClearURLs/Rules/master/data.min.json" + return requests.get(RULES).text + + def main() -> int: global endrules data_min_json = json.loads(getrules())