lyz-code / autoimport

Autoimport automatically fixes wrong import statements.
https://lyz-code.github.io/autoimport
GNU General Public License v3.0
96 stars 24 forks source link

If input is received from stdin, output the unmodified value to stdout. #221

Closed ghost closed 2 years ago

ghost commented 2 years ago

Checklist

Not sure if it is possible to provide a test for this sort of behavior:

            # Click testing runner doesn't simulate correctly the reading from stdin
            # instead of setting the name attribute to `<stdin>` it gives an
            # AttributeError. But when you use it outside testing, no AttributeError
            # is raised and name has the value <stdin>. So there is no way of testing
            # this behaviour.

Correct behavior is already documented in https://github.com/lyz-code/autoimport/blob/a8eb5510f3bd82cfa7a1ee63d98839ce49a0b152/src/autoimport/services.py#L19

coveralls commented 2 years ago

Pull Request Test Coverage Report for Build 3056895311

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Totals Coverage Status
Change from base Build 2690162637: 0.0%
Covered Lines: 308
Relevant Lines: 320

💛 - Coveralls