Hello Eli,

The way to run pylint with pre-commit is as a system hook in a venv where
the dependencies are accessible:

```yaml

- repo: local
  hooks:
    - id: pylint
      name: pylint
      entry: pylint
      language: system
      args: ["-sn", "-rn"]
      types: [python]
```

Best regards,


Le mer. 12 mai 2021 à 14:32, Eli Simhayev <eli.simha...@beyondminds.ai> a
écrit :

> Hi Ian,
>
>
>
> Thank you for your quick answer.
>
>
>
> Let’s say my repo’s name is foo, and I have a .pre-commit config file:
>
>
>
>
>
>
>
> Now I want to run pylint afterwards automatically.
>
> I found this:
>
>
>
> Overview | Improve Your Code with Pylint and Black | Adafruit Learning
> System <https://learn.adafruit.com/improve-your-code-with-pylint?view=all>
>
>
>
> But they suggest running pylint manually. Is there a way to use pylint in
> pre-commit style?
>
>
>
> Thank you
>
>
>
>
>
> *מאת**:* Ian Stapleton Cordasco <graffatcolmin...@gmail.com>
> *נשלח:* Wednesday, 12 May 2021 13:54
> *אל:* Eli Simhayev‏ <eli.simha...@beyondminds.ai>
> *עותק:* code-quality@python.org
> *נושא:* Re: [code-quality] pre-commit, black, isort. how to use with
> pylint?
>
>
>
>
>
> On Wed, May 12, 2021 at 5:49 AM Eli Simhayev <eli.simha...@beyondminds.ai>
> wrote:
>
> Hi,
>
>
>
> Firstly, thank you for the awesome work.
>
> Currently I’m using pre-commit with black, isort and another small hooks.
>
>
>
> What the preferable way to integrate pylint (in terms of workflow) in my
> use-case?
>
>
>
> It's unclear what your workflow is currently such that it doesn't seem
> like a recommendation could be made. For example, I could assume you use
> vim and either coc.vim or vim-ale and would suggest you add pylint as a
> linter for Python files to the configuration for either of those plugins.
> That would give you in-the-moment warnings while adding it to pre-commit to
> ensure you didn't miss something.
>
>
>
> But I don't know what your actual workflow is beyond the fact you use
> pre-commit and pylint can be easily added to that (to the best of my
> knowledge).
>
>
> The contents of this email message and any attachments are intended solely
> for the addressee(s) and may contain confidential and/or privileged
> information of BeyondMinds and may be legally protected from disclosure. If
> you are not the intended recipient of this message or their agent, or if
> this message has been addressed to you in error, please immediately alert
> the sender by reply email and then delete this message and any attachments.
> If you are not the intended recipient, you are hereby notified that any
> use, dissemination, copying, or storage of this message or its attachments
> is strictly prohibited.
> _______________________________________________
> code-quality mailing list -- code-quality@python.org
> To unsubscribe send an email to code-quality-le...@python.org
> https://mail.python.org/mailman3/lists/code-quality.python.org/
> Member address: pierre.sassou...@gmail.com
>
_______________________________________________
code-quality mailing list -- code-quality@python.org
To unsubscribe send an email to code-quality-le...@python.org
https://mail.python.org/mailman3/lists/code-quality.python.org/
Member address: arch...@mail-archive.com

Reply via email to