Jaymon / testdata

Python module to make testing easier, it can generate random data like names and text, run commands, fetch urls, create files and directories, and more
MIT License
10 stars 0 forks source link

should we automatically add certain things at the top of created modules? #36

Closed Jaymon closed 5 years ago

Jaymon commented 6 years ago

Basically, when you call create_module should it add something like this to the top of every created module:

        ret = [
            "# -*- coding: utf-8 -*-",
            "from __future__ import (",
            "    unicode_literals,",
            "    division,",
            "    print_function,",
            "    absolute_import",
            ")",
        ]
        ret.extend(body)

It will, of course, have to check if the utf-8 and a different __future__ isn't already including in the body

Jaymon commented 6 years ago

likewise, add a newline at the end:

ret.extend("")