mypy: Add more types
- add a new generic type Y to be used with iget_nodes method
- rewrite iget_nodes method to be more generic inside base.py
- groupby & orderby are used as list, change their types accordingly
- rewrite undefine_variable method: var never has a variable attr
- correctly replace some "type:ignore" comments that was moved by black
- format without any compromise