From d04edc15e9de3b0cf3e07cbcff9ba792321ad604 Mon Sep 17 00:00:00 2001 From: James Maslek Date: Thu, 12 Oct 2023 16:31:08 -0400 Subject: [PATCH] life is ruff --- .../openbb_tradingeconomics/utils/url_generator.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/openbb_platform/providers/tradingeconomics/openbb_tradingeconomics/utils/url_generator.py b/openbb_platform/providers/tradingeconomics/openbb_tradingeconomics/utils/url_generator.py index 9ad61cba1d8..54ebbf5ffd1 100644 --- a/openbb_platform/providers/tradingeconomics/openbb_tradingeconomics/utils/url_generator.py +++ b/openbb_platform/providers/tradingeconomics/openbb_tradingeconomics/utils/url_generator.py @@ -8,16 +8,10 @@ def check_args(query_args: Dict, to_include: List[str]): available_args = ["country", "start_date", "end_date", "importance", "group"] # Check if all fields in to_include are present in query_args - if all(field in query_args for field in to_include): - # Check if elements in available_args that are not in to_include are not present in query_args - if all( - field not in query_args - for field in available_args - if field not in to_include - ): - return True - - return False + # and elements in available_args that are not in to_include are not present in query_args + return all(field in query_args for field in to_include) and all( + field not in query_args for field in available_args if field not in to_include + ) def generate_url(in_query):