Daira-Emma Hopwood

Results 724 comments of Daira-Emma Hopwood

Taking into account #19, an import of a module that is not already imported at top-level should go: - after existing `__future__` imports, if any - otherwise, after the module...

(A module docstring is defined as a string at top-level that precedes any other code.)

This only affects scripts; it can wait until the next release.

No, because of #19; I originally filed #19 because of such a case in Tahoe-LAFS.

https://github.com/mitsuhiko/python-modernize/issues/30 was a duplicate (see also https://github.com/django-wiki/django-wiki/pull/33 ).

Is the desired fix to add `six.Iterator` to the end of the base class list of any class that statically defines a `next` method?

If we add an option, say `--careful-unicode`, for transforming code that is already careful about string types (as suggested in #31), then that option should probably enable a `StringIO` ->...

The test looks correct now (i.e. it fails for the right reason).

It looks like they're not going to fix it, though (with reasoning I consider invalid). This is a big issue for modernizing Tahoe-LAFS, which has hundreds of these lambdas.

I think I see the problem: the fixer pattern is just not matching on a case like `lambda (rc, out, err), fn=fn: ...` because it is expecting parens around the...