**`View->Show Whitespace`** and **`View->Show Indentation Guides`** helps to see your Indentation Errors, and **`Document->Replace Tabs With Spaces`** helps to fix them when pasting in random code. Also make sure **`Document->Indent Type`** is set to `Spaces` and **`Document->Indent Width`** is set to 4 (or whatever you use).
This isn't so much a Geany issue as a an issue with Python's annoying whitespace semantics.