#! /usr/bin/env python3
# -*- coding: utf-8 -*-

"""
Executor script providing commands to build, test, release, ...
Should be compatible to Python >= 3.4
"""

import sys
import os
import argparse
from subprocess import call
from pathlib import Path

CURRENTDIR = Path(__file__).parent
VENVDIR = CURRENTDIR / "venv"
PYTHON = VENVDIR / "py35" / "bin" / "python"


def invalid():
	print("Invalid action")


def docu():
	call([str(PYTHON), "-m", "sphinx", "-b", "html", "./docu", "./build/docu/html"])


def test():
	for dirname in (x for x in VENVDIR.iterdir() if x.is_dir()):
		py = dirname / "bin" / "python"
		call([str(py), "-m", "pytest", "test"])


def teststyle():
	call([str(PYTHON), "-m", "flake8", "stdconfigparser.py"])


def dist():
	call(["python3", "setup.py", "sdist", "bdist_wheel"])


commands = {
	"test": test,
	"docu": docu,
	"teststyle": teststyle,
	"dist": dist,
}

def main():
	parser = argparse.ArgumentParser(description='Executor script for project.')
	parser.add_argument('action', choices=list(commands.keys()))
	args = parser.parse_args(sys.argv[1:])
	action = args.action
	commands.get(action, invalid)()


if __name__ == '__main__':
	main()

@@ -371,17 +371,20 @@
 alid():%0A
-%09
+    
 print(%22I
@@ -409,25 +409,28 @@
 def docu():%0A
-%09
+    
 call(%5Bstr(PY
@@ -512,17 +512,20 @@
 test():%0A
-%09
+    
 for dirn
@@ -577,18 +577,24 @@
 dir()):%0A
-%09%09
+        
 py = dir
@@ -621,10 +621,16 @@
 on%22%0A
-%09%09
+        
 call
@@ -680,25 +680,28 @@
 eststyle():%0A
-%09
+    
 call(%5Bstr(PY
@@ -760,17 +760,20 @@
 dist():%0A
-%09
+    
 call(%5B%22p
@@ -833,17 +833,20 @@
 nds = %7B%0A
-%09
+    
 %22test%22: 
@@ -851,17 +851,20 @@
 : test,%0A
-%09
+    
 %22docu%22: 
@@ -869,17 +869,20 @@
 : docu,%0A
-%09
+    
 %22teststy
@@ -897,17 +897,20 @@
 tstyle,%0A
-%09
+    
 %22dist%22: 
@@ -930,17 +930,20 @@
 main():%0A
-%09
+    
 parser =
@@ -1011,17 +1011,20 @@
 ject.')%0A
-%09
+    
 parser.a
@@ -1076,17 +1076,20 @@
 eys()))%0A
-%09
+    
 args = p
@@ -1119,17 +1119,20 @@
 gv%5B1:%5D)%0A
-%09
+    
 action =
@@ -1144,17 +1144,20 @@
 .action%0A
-%09
+    
 commands
@@ -1213,9 +1213,12 @@
 _':%0A
-%09
+    
 main

Use spaces, no tabs