sopel
sopel copied to clipboard
plugins.handlers: PyFilePlugin version falls back to file's mtime
Description
Alternative to the suggested implementation from #2498, putting this fallback in the plugin machinery instead of a special display-only case in version.
PyFilePlugin keeps track of the modification time when it (re)loads its .py file and uses that to derive a datever if there isn't a "real" version in the module.
Starting as draft… If this idea has legs I'll finish up with any needed test cases.
Checklist
- [x] I have read CONTRIBUTING.md
- [x] I can and do license this contribution under the EFLv2
- [ ] No issues are reported by
make qa(runsmake lintandmake test)- Didn't run the checks yet. See note above; this is starting as a proof of concept.
- [x] I have tested the functionality of the things this change touches
- Yes, but just manually.