file discovery using os.path.dirname(__file__) is prone to several issues. One of them is the possibility of encountering errors when the package is installed as an egg. Another set of errors can occur when qmpy is installed on OSs other than Linux.
To fix these issues, we'd need to change the file discovery method from os.path to pkg_resources.resource_filename or similar dedicated package file discovery options
Another work is to be done on adding a pre-commit system to reformat qmpy scripts - possible using the package black
file discovery using
os.path.dirname(__file__)
is prone to several issues. One of them is the possibility of encountering errors when the package is installed as an egg. Another set of errors can occur when qmpy is installed on OSs other than Linux.To fix these issues, we'd need to change the file discovery method from
os.path
topkg_resources.resource_filename
or similar dedicated package file discovery optionsAnother work is to be done on adding a
pre-commit
system to reformatqmpy
scripts - possible using the packageblack
Thanks to @hegdevinayi for the ideas