Skip to content

Comments

Add --no-active to uv-sync hook to silence warning#43

Merged
zanieb merged 2 commits intoastral-sh:mainfrom
danielhollas:no-activate
Feb 24, 2025
Merged

Add --no-active to uv-sync hook to silence warning#43
zanieb merged 2 commits intoastral-sh:mainfrom
danielhollas:no-activate

Conversation

@danielhollas
Copy link
Contributor

@danielhollas danielhollas commented Feb 10, 2025

Add --no-active option to uv-sync to ignore the pre-commit virtual env. Closes #36.

As far as I can tell, the other hooks don't support/need this option, but would like that confirmed.

Testing

To test this PR, add the following to .pre-commit-config.yaml

  - repo: https://github.com/danielhollas/uv-pre-commit    
    rev: fc377b7
    hooks:    
    - id: uv-sync                                                                                                                         
      verbose: true
      stages: [pre-commit]

and run

pre-commit run -a uv-sync

No warning should be printed.

@danielhollas
Copy link
Contributor Author

@zanieb friendly ping for review in case you don't receive notifications on this repo. Thanks!

@zanieb
Copy link
Member

zanieb commented Feb 24, 2025

Thanks!

@zanieb zanieb changed the title Add --no-active to uv-sync hook Add --no-active to uv-sync hook to silence warning Feb 24, 2025
@zanieb zanieb merged commit 4bd0253 into astral-sh:main Feb 24, 2025
@danielhollas danielhollas deleted the no-activate branch February 24, 2025 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

warning: VIRTUAL_ENV ignored

2 participants