title: Can the python pre-commit tool consider a subdirectory as a base of the project?
body: <p>I have a repo like this:</p>
  <pre><code>myrepo/
        .git
        tool1/  
             src/main.py
             tests/test.py
             .pre-commit-config.yaml
  </code></pre>
  <p>Where the config is:</p>
  <pre><code>repos:
  - repo: local
    hooks:
      - id: pytest-cov
        name: pytest coverage
        stages: [push]
        language: system
        entry: pwd  # originally: pytest testtool --cov --cov-fail-under=0 
        types: [python]
        pass_filenames: false
  </code></pre>
  <p>Changed the entry to 'pwd' just to see what the basedir is in pre-commit's context..
  Now, when I run this from the myrepo/tool1 dir, by <code>pre-commit run  --hook-stage=push --verbose</code>, pwd will say &quot;myrepo&quot;, rather than &quot;myrepo/tool1&quot;.
  I would need to run in the tool1 as all paths etc are relative to that.</p>
  <p>Is there some setting or another way to run precommit so that the base directory would be myrepo/tool1?  or does the project really have to live in the root of the repo?</p>