Skip to content

chore: Use _compliant.typing aliases in more places#2336

Merged
MarcoGorelli merged 6 commits intomainfrom
use-compliant-aliases
Apr 5, 2025
Merged

chore: Use _compliant.typing aliases in more places#2336
MarcoGorelli merged 6 commits intomainfrom
use-compliant-aliases

Conversation

@dangotbanned
Copy link
Member

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

Follow-up to (#2326 (comment))

@dangotbanned dangotbanned added documentation Improvements or additions to documentation internal typing labels Apr 4, 2025
Comment on lines 128 to 129
EvalNames: TypeAlias = Callable[[CompliantFrameT], Sequence[str]]
"""**NEEDS DOC**"""
Copy link
Member Author

Choose a reason for hiding this comment

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

@MarcoGorelli I was hoping you might have an idea on how to describe this one?

Most often it is being used for CompliantExpr._evaluate_output_names

class ArrowExpr(EagerExpr["ArrowDataFrame", ArrowSeries]):
_implementation: Implementation = Implementation.PYARROW
def __init__(
self: Self,
call: EvalSeries[ArrowDataFrame, ArrowSeries],
*,
depth: int,
function_name: str,
evaluate_output_names: EvalNames[ArrowDataFrame],
alias_output_names: AliasNames | None,

Copy link
Member

Choose a reason for hiding this comment

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

it's used to resolve the output names which would occur before any aliases take place

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @MarcoGorelli, I've adapted that into (bb326ec)

Happy for anyone to tweak these descriptions 🙌

@dangotbanned dangotbanned marked this pull request as ready for review April 4, 2025 11:32
@dangotbanned dangotbanned changed the title chore: Use _compliant.typing in more places chore: Use _compliant.typing aliases in more places Apr 4, 2025
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.

love this, thanks @dangotbanned !

@MarcoGorelli MarcoGorelli merged commit b92da86 into main Apr 5, 2025
27 of 28 checks passed
@MarcoGorelli MarcoGorelli deleted the use-compliant-aliases branch April 5, 2025 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation internal typing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants