title: Run pylint for both python 2.7 and 3.7, in pre-commit hook on Docker image
body: <p>I am trying to use CircleCI to run a pre-commit hook that runs pylint for both Python 2.7 and 3.7.</p>
  
  <p><code>.circleci/config.yml</code> runs pre-commit for both Python 2 and Python 3:</p>
  
  <pre><code>jobs:
    lint-py2:
      docker:
        - image: python:2.7.14
      steps:
        {snip}
        - run: pre-commit run --all-files
        {snip}
  
    lint-py3:
      docker:
        - image: python:3.7.3
      steps:
        {snip}
        - run: pre-commit run --all-files
        {snip}
  </code></pre>
  
  <p>pre-commit, among other things, runs pylint:</p>
  
  <pre><code>-   repo: https://github.com/pre-commit/mirrors-pylint
      rev: v2.3.1  # Which version here?
      hooks:
      -   id: pylint
  </code></pre>
  
  <p>The problem here is that <a href="https://github.com/PyCQA/pylint/issues/2572" rel="nofollow noreferrer">there is no version of pylint that is compatible with both Python 2.7 and 3.7</a>: Python 2.7 requires pylint 1.x and Python 3.7 requires pylint 2.x.</p>
  
  <p>How can I make Circle CI run both linting jobs using different versions of pylint?</p>
  
  <p>I am considering several options:</p>
  
  <ul>
  <li>Add pylint twice in the pre-commit configuration (with different aliases) and <a href="https://pre-commit.com/#temporarily-disabling-hooks" rel="nofollow noreferrer">disable</a> one or the other in the job definition
  
  <ul>
  <li>It seems that pre-commit tries to install dependencies <em>before</em> looking at the <code>SKIP</code> variable, so the Python 2.7 run tries to install pylint 2 anyway, and errors with <code>ERROR: Could not find a version that satisfies the requirement pylint==2.3.1 (from pre-commit-dummy-package==0.0.0)</code></li>
  </ul></li>
  <li>Use a Docker image that has both Python versions and <a href="https://pre-commit.com/#overriding-language-version" rel="nofollow noreferrer">set the python version</a> at the hook level
  
  <ul>
  <li>This requires building my own Docker image</li>
  </ul></li>
  <li>Skip pylint in one of the linting jobs</li>
  <li>Drop 2.7 or 3.7 support</li>
  </ul>