Fix compatibility with fmtlib 10.2
This fix a compilation error that comes up with the latest version of fmtlib (planned for LCG 106).
Note: this includes a fix to be make pre-commit works in gitlab-ci (there was a small detail missing in !3957 (merged))
Edited by Marco Clemencic