From 10ac68f1acdaa9ea83c6ab7049113db2b4f74751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl?= Date: Sat, 3 Feb 2024 19:32:03 +0100 Subject: [PATCH] pylint module error 2 --- mstarpy/error.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mstarpy/error.py b/mstarpy/error.py index d09d977..e91641e 100644 --- a/mstarpy/error.py +++ b/mstarpy/error.py @@ -1,3 +1,5 @@ +"""module to raise error""" + def not_200_response(url,response): """ This function raise a ConnectionError if the status code a requests is not 200. @@ -12,7 +14,7 @@ def no_site_error(code, name, country, site): """ This function raise a ValueError if the selected country is "us" or a site is not selected. """ - + if not site or country == 'us': if country: raise ValueError(f"The funds of the country {country} cannot be scraped.")