Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mypy precheck failures #628

Merged
merged 3 commits into from
Apr 26, 2024
Merged

Fix mypy precheck failures #628

merged 3 commits into from
Apr 26, 2024

Conversation

benmoss
Copy link

@benmoss benmoss commented Apr 25, 2024

Description

The precommit hook is failing in #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.

I don't know how these have ever been working!
@benmoss benmoss requested a review from a team as a code owner April 25, 2024 20:40
Copy link

netlify bot commented Apr 25, 2024

Deploy Preview for conda-lock ready!

Name Link
🔨 Latest commit 79462ee
🔍 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
Copy link
Contributor

maresb commented Apr 26, 2024

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
Copy link
Contributor

maresb commented Apr 26, 2024

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

@maresb maresb merged commit ec70580 into conda:main Apr 26, 2024
10 checks passed
@benmoss benmoss deleted the fix-precheck branch April 27, 2024 22:25
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.

2 participants