f-string
used without any expression PTC-W0027f-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")
It is wasteful to use f-string
mechanism if there are no expressions to be extrapolated. It is recommended to use regular strings instead.