timofurrer / w1thermsensor

A Python package and CLI tool to work with w1 temperature sensors like DS1822, DS18S20 & DS18B20 on the Raspberry Pi, Beagle Bone and other devices.
MIT License
494 stars 113 forks source link

Update to using f-strings instead of sting.format() #104

Open bsimmo opened 3 years ago

bsimmo commented 3 years ago

Update to using f-strings instead of sting.format()

Is your Feature Request related to a problem? Please describe. This is just a nice to have. f-strings are the new Python3.6+ method and are apparently much faster* especially in later python3's and for me easier to read too. try a search on are f-strings faster than .format

Describe the solution you'd like Change all strings from .format to f-string

Describe alternatives you've considered No alternative other than no rush as not vital, 1-wire is slow anyway, but every little helps.

Additional context Something for a rainy day. It's the way forward for Python3 It does mean a drop of Python3.5 support (support for 3.5 has been dropped by Python)

timofurrer commented 3 years ago

Something for a rainy day.

Absolutely! I kept Python 3.5 support because of Raspbian stretch which comes with Python 3.5 However, I'm down for dropping it.

Feel free to use your next rainy day and submit that PR 😄