diff --git a/src/jobspy/jobs/__init__.py b/src/jobspy/jobs/__init__.py index 2a855a7..31cbce9 100644 --- a/src/jobspy/jobs/__init__.py +++ b/src/jobspy/jobs/__init__.py @@ -158,7 +158,7 @@ class Country(Enum): """Convert a string to the corresponding Country enum.""" country_str = country_str.strip().lower() for country in cls: - country_names = country.value[0].split(',') + country_names = country.value[0].split(",") if country_str in country_names: return country valid_countries = [country.value for country in cls] @@ -180,7 +180,10 @@ class Location(BaseModel): location_parts.append(self.state) if isinstance(self.country, str): location_parts.append(self.country) - elif self.country and self.country not in (Country.US_CANADA, Country.WORLDWIDE): + elif self.country and self.country not in ( + Country.US_CANADA, + Country.WORLDWIDE, + ): country_name = self.country.value[0] if "," in country_name: country_name = country_name.split(",")[0]