#pro-tip : you can run pylint to see some of these things. There are also linters that one can install in their text editor.
huff@lise:~/repos/transition-scenarios/input(style) $ pylint write_reactors.py
No config file found, using default configuration
************* Module write_reactors
C: 10, 0: Trailing whitespace (trailing-whitespace)
C: 14, 0: Exactly one space required after comma
with open(sys.argv[2],'r') as fp:
^ (bad-whitespace)
C: 20, 0: Exactly one space required after comma
dtype=('S128','float64','float64'),
^ (bad-whitespace)
C: 20, 0: Exactly one space required after comma
dtype=('S128','float64','float64'),
^ (bad-whitespace)
C: 21, 0: Exactly one space required after comma
names=('reactor_name','n_assem_core','n_assem_batch'))
^ (bad-whitespace)
C: 21, 0: Exactly one space required after comma
names=('reactor_name','n_assem_core','n_assem_batch'))
^ (bad-whitespace)
C: 30, 0: Line too long (103/100) (line-too-long)
C: 31, 0: Exactly one space required around assignment
output=open('written_input_file.xml','a')
^ (bad-whitespace)
C: 31, 0: Exactly one space required after comma
output=open('written_input_file.xml','a')
^ (bad-whitespace)
C: 36, 0: Line too long (150/100) (line-too-long)
C: 38, 0: Trailing newlines (trailing-newlines)
C: 1, 0: Missing module docstring (missing-docstring)
C: 15, 4: Invalid constant name "input_template" (invalid-name)
C: 16, 4: Invalid constant name "template" (invalid-name)
C: 18, 0: Invalid constant name "reactor_lists" (invalid-name)
C: 31, 0: Invalid constant name "output" (invalid-name)
W: 2, 0: Unused import mimetypes (unused-import)
W: 4, 0: Unused import os (unused-import)
W: 5, 0: Unused import smtplib (unused-import)
W: 7, 0: Unused import getpass (unused-import)
C: 2, 0: standard import "import mimetypes" comes before "import jinja2" (wrong-import-order)
C: 4, 0: standard import "import os" comes before "import jinja2" (wrong-import-order)
C: 5, 0: standard import "import smtplib" comes before "import jinja2" (wrong-import-order)
C: 6, 0: standard import "import sys" comes before "import jinja2" (wrong-import-order)
C: 7, 0: standard import "import getpass" comes before "import jinja2" (wrong-import-order)