felixlindstrom / python-salesforce-api

Python Salesforce API wrapper made easy
MIT License
35 stars 15 forks source link

Use f-string and pathlib.Path #28

Closed ericbn closed 11 months ago

ericbn commented 11 months ago

since minimal supported version is already Python 3.6. See https://docs.python.org/3.6/reference/lexical_analysis.html#formatted-string-literals and https://docs.python.org/3.6/library/pathlib.html#pathlib.Path.read_bytes

The use of open without a context manager ("with open()") or without a respective close can potentially leave file descriptors open.

Also default encoding in bytes.decode is already 'utf-8'. See https://docs.python.org/3.6/library/stdtypes.html#bytes.decode