A lot of the function arguments are id and redefine that builtin (hence their different colouring in highlighters). Codefactor gets really annoyed about this, although the use of id doesn't seem to have caused any problems so far.
Consider replacing this id with something like uid or something similar. I'm not entirely sure what a good substitute would be.