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

Compose Roles _before_ instantiation so attrs will work in init #59

Merged
merged 1 commit into from
Feb 24, 2016

Conversation

kentfredric
Copy link
Contributor

I've locally been working with this logic applied and it seems to do what I want.

Tests included.

Previously, workflow was:

  - create instance w/ args
  - excess args discarded
  - apply role
  - compsed instance becomes broken because required args are missing

This commit changes the workflow to:

  - compose "with" and "class" to create a new anonclass "class"
  - create instance with args

This means attributes applied to roles and all other things that happen
with roles will work as intended.
@preaction preaction merged commit 23bdf1f into preaction:master Feb 24, 2016
@preaction
Copy link
Owner

Excellent, thanks! Cutting a release now, and I'll make sure Statocles depends on the new version.

@kentfredric kentfredric deleted the role-with branch May 2, 2016 17:08
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