adareau / HAL

HAL Atom Locator
GNU General Public License v3.0
2 stars 1 forks source link

Replace “Old-school” String formatting by f-string usage #47

Open quentinmarolleau opened 3 years ago

quentinmarolleau commented 3 years ago

Here is a clear and instructive documentation about the modern way to format strings: https://realpython.com/python-f-strings/#f-strings-a-new-and-improved-way-to-format-strings-in-python

adareau commented 3 years ago

Fine with me. We just have to pay attention to the fact that the parameters in the MetaData classes are defined with a 'display' key that defines how they should be displayed using the old formatting way (e.g., '%.2g'). If we change the formatting style, we have to handle this too.