As always: Ask your supervisor, always.
Generally speaking (for personal experience) one doesn't see a lot of code in the thesis themselves. The main logic behind this is that if whatever you are showing is just code, then just link GitHub! The document is meant to be an addition to the code, text explaining why/what/how of the code.
If someone wanted to just look at the code, why would they do it in a PDF instead of in their IDE? Additionally, very often code has a lot of redundant/obvious parts that are completely unuseful to anyone reading it, and would only take space on paper (e.g. input parsing, file reading, output preparing code). However, providing only partial code for a function is generally unuseful also, as its hard to read others code even when its complete. Thus, most people tend to use pseudocode as what you want is to explain what the code does, not show the exact syntax.
All in all, this is partially my experience and partially my opinion, and regardless of what anyone says around here, listening to your supervisors is likely the best option.