Skip to content

Conversation

@dangotbanned
Copy link
Member

@dangotbanned dangotbanned commented May 6, 2025

What type of PR is this? (check all applicable)

  • 💾 Refactor
  • ✨ Feature
  • 🐛 Bug Fix
  • 🔧 Optimization
  • 📝 Documentation
  • ✅ Test
  • 🐳 Other

Related issues

Checklist

  • Code follows style guide (ruff)
  • Tests added
  • Documented the changes

If you have comments or can explain your changes, please do so below

To remove `C901` we need to go from `13` -> `10` statements
Comment on lines 841 to 842
f"Expected object convertible to a scalar, found {type(scalar_like)}.\n"
f"{scalar_like!r}"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can revert this, but I don't think that message makes any sense 😄

import narwhals as nw

>>> nw.to_py_scalar([1,2,3])
ValueError: Expected object convertible to a scalar, found <class 'list'>. Please report a bug to https://github.com/narwhals-dev/narwhals/issues

@dangotbanned dangotbanned mentioned this pull request May 4, 2025
8 tasks
@dangotbanned dangotbanned marked this pull request as ready for review May 6, 2025 16:07
Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MarcoGorelli MarcoGorelli merged commit aa555b2 into main May 7, 2025
32 checks passed
@MarcoGorelli MarcoGorelli deleted the simp-to-py-scalar branch May 7, 2025 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants