eliabieri / pyaare

f-string used without any expression PTC-W0027
Anti-pattern
Major
3 years ago3 years old
f-string used without any expression
 30    @staticmethod
 31    def _checkCity(city: str):
 32        cities = requests.get(
 33            f'https://aareguru.existenz.ch/v2018/cities', timeout=5).json() 34        supportedCities = {entry["city"].lower() for entry in cities}
 35        if city.lower() not in supportedCities:
 36            raise RuntimeError(f"City {city} is not supported")