w1thermsensor icon indicating copy to clipboard operation
w1thermsensor copied to clipboard

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

Open bsimmo opened this issue 3 years ago • 1 comments

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)

bsimmo avatar Jan 30 '21 10:01 bsimmo

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 😄

timofurrer avatar Jan 30 '21 10:01 timofurrer