added flake8
Fixed default return to an empty dictionary.