ECCC-MSC / msc-pygeoapi

MSC OGC API pygeoapi deployment
MIT License
16 stars 25 forks source link

use f-strings in place of .join() method when var type uncertain #314

Closed Dukestep closed 11 months ago

Dukestep commented 11 months ago

This PR reverts some changes made in #305 where certain loaders were modified to use the string join() method to create IDs or document properties in various loaders.

In some cases, the parameters passed to the join() method were not strings and this was causing loaders to fail and raise a TypeError. Switching these back to f-strings allows us format these non-string values as strings by calling the object's __format__ dunder method.