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

dialects: (builtin) make FloatAttr a TypedAttribute #3488

Merged
merged 5 commits into from
Nov 20, 2024

Conversation

alexarice
Copy link
Collaborator

@alexarice alexarice commented Nov 20, 2024

Pretty much as the title says.

@alexarice alexarice self-assigned this Nov 20, 2024
@alexarice alexarice added the dialects Changes on the dialects label Nov 20, 2024
Copy link

codecov bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.32%. Comparing base (0c871d9) to head (6f11c3e).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3488   +/-   ##
=======================================
  Coverage   90.31%   90.32%           
=======================================
  Files         462      462           
  Lines       58040    58076   +36     
  Branches     5563     5565    +2     
=======================================
+ Hits        52419    52455   +36     
  Misses       4188     4188           
  Partials     1433     1433           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Base automatically changed from alexarice/typed-attribute-simpl to main November 20, 2024 11:46
@alexarice
Copy link
Collaborator Author

Would it be worth factoring out a parse_float method from parse_number?

@alexarice alexarice force-pushed the alexarice/float-typed branch from 74635f8 to 31546f7 Compare November 20, 2024 14:04
@alexarice alexarice changed the base branch from main to alexarice/typed-attribute-printing November 20, 2024 14:05
@alexarice
Copy link
Collaborator Author

alexarice commented Nov 20, 2024

I've refactored and rebased on top of #3490

def parse_optional_float(
self,
*,
allow_negative: bool = False,
Copy link
Member

Choose a reason for hiding this comment

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

I can imagine this being quite confusing, let's drop the default argument for now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It was copied off the above function for integers I think, but sounds like a good idea

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It seems I copied poorly and the rest have a default value of True, would that be preferred or still no default?

Copy link
Member

Choose a reason for hiding this comment

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

I have a slight preference towards default True

Base automatically changed from alexarice/typed-attribute-printing to main November 20, 2024 14:30
Co-authored-by: Sasha Lopoukhine <superlopuh@gmail.com>
Copy link
Collaborator

@math-fehr math-fehr left a comment

Choose a reason for hiding this comment

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

Nice!

@alexarice alexarice merged commit ee4094f into main Nov 20, 2024
15 checks passed
@alexarice alexarice deleted the alexarice/float-typed branch November 20, 2024 16:51
EdmundGoodman pushed a commit to EdmundGoodman/xdsl that referenced this pull request Dec 6, 2024
Co-authored-by: Sasha Lopoukhine <superlopuh@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dialects Changes on the dialects
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants