Konstantin Shemyak
Konstantin Shemyak

Reputation: 2527

Pylint: read from stdin?

Is there a way to instruct pylint to read the input from stdin?

Synopsis string suggests that the file argument is not mandatory:

pylint [ OPTIONS ] [ <arguments> ]

But when invoked without a non-option argument, it prints

Usage: pylint [options] module_or_package

And the documentation does not mention stdin anywhere.

This looks non-command-line-stylish...

Upvotes: 3

Views: 1751

Answers (3)

Petski
Petski

Reputation: 361

As of Pylint 2.4 you can supply an extra --from-stdin argument to Pylint.

Upvotes: 6

Alex Flint
Alex Flint

Reputation: 6736

On linux/unix/OSX you can do

pylint [options] /dev/stdin

to have pylint read from standard input

Upvotes: 0

sthenault
sthenault

Reputation: 15125

There is currently no way to do so. You may ask for the feature by creating an issue https://bitbucket.org/logilab/pylint/issues, or even better, provide a pull request implementing it.

Upvotes: 3

Related Questions