Code review comment for lp:~doanac/utah/server-cleanups

Revision history for this message
Javier Collado (javier.collado) wrote :

The changes look good and I have been able to run the pass runlist
successfully. Please find below a few comments:

- tests/test_template.py
I think `_tmpdir` should be set in a `setupClass` method rather than in defined
as a global variable.

- utah/template.py
  - _add_backslash_filter
    `:rtype:` should be `string` and `:returns:` a description of what is
    returned.

  - as_buff
    The backslash filter could be added to `as_buff` at import time like this:
    def as_buff(template, **kw):
        <code>

    as_buff._env = ...

    This way `as_buff` would be easier to read and the code would take care
    only of the rendering, not the initialization.

flake8 output:
$ find . -name '*.py' | xargs flake8
./tests/test_debs.py:18:1: F401 'apt' imported but unused

pep257 output:
$ find . -name '*.py' | xargs pep257
test_debs.py:38:4: PEP257 Exported definitions should have docstrings.
test_debs.py:56:4: PEP257 Exported definitions should have docstrings.

« Back to merge proposal