conda / conda-lock

Lightweight lockfile for conda environments
https://conda.github.io/conda-lock/
Other
456 stars 101 forks source link

Fix mypy precheck failures #628

Closed benmoss closed 2 months ago

benmoss commented 2 months ago

Description

The precommit hook is failing in https://github.com/conda/conda-lock/pull/626 (among other places) with these errors:

conda_lock/invoke_conda.py:197: error: Non-overlapping equality check (left operand type: "Channel", right operand type: "Literal['defaults']")  [comparison-overlap]
conda_lock/conda_solver.py:349: error: Non-overlapping equality check (left operand type: "Channel", right operand type: "Literal['defaults']")  [comparison-overlap]

I'm not a Python expert but I think the problem is we're comparing a Channel with a string, and equality isn't implemented for those two types. We could either just compare the url field or turn the "defaults" string into a channel, not sure which is preferred.

netlify[bot] commented 2 months ago

Deploy Preview for conda-lock ready!

Name Link
Latest commit 79462ee38d77b3ad827aaf4196a93571e1000a34
Latest deploy log https://app.netlify.com/sites/conda-lock/deploys/662b6a86730bfb0008a4351f
Deploy Preview https://deploy-preview-628--conda-lock.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

maresb commented 2 months ago

Thanks a lot @benmoss for taking initiative on this!!! (I had a very busy week.)

The msys2 stuff predates my involvement in conda-lock, so I needed to do a bit of research to understand what it's all about. I've added a test case to ensure that the newly-activated code is actually correct.

maresb commented 2 months ago

We should be able to cut a new release as soon as everything is confirmed green.