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

Implement @converter decorator #728

Closed
wants to merge 1 commit into from
Closed

Implement @converter decorator #728

wants to merge 1 commit into from

Conversation

taliastocks
Copy link

@taliastocks taliastocks commented Dec 6, 2020

Implement @converter decorator as described in #240. If you like this approach, I'll be happy to update the documentation etc.

This is a less sophisticated approach than #404, which has been in draft since 2018 and supports self arguments.

Pull Request Check List

  • Added tests for changed code.
  • New features have been added to our Hypothesis testing strategy.
  • Changes or additions to public APIs are reflected in our type stubs (files ending in .pyi).
    • ...and used in the stub test file tests/typing_example.py.
  • Updated documentation for changed code.
    • New functions/classes have to be added to docs/api.rst by hand.
    • Changes to the signature of @attr.s() have to be added by hand too.
    • Changed/added classes/methods/functions have appropriate versionadded, versionchanged, or deprecated directives. Find the appropriate next version in our __init__.py file.
  • Documentation in .rst files is written using semantic newlines.
  • Changes (and possible deprecations) have news fragments in changelog.d.

If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!

@taliastocks
Copy link
Author

(I'm not sure I understand why the tox lint is failing for python 3.8.)

@hynek
Copy link
Member

hynek commented Dec 7, 2020

Oof, firstly thanks for putting in the effort! I'll start with answering your question: you can click on "Details" of the failing check, then you can see that "ERROR: lint: commands failed". So you click the chevron next to "tox: lint" and there you can see that black failed:

  black....................................................................Failed
  - hook id: black
  - files were modified by this hook
  
  reformatted /home/runner/work/attrs/attrs/tests/test_make.py

Arguably this should be much more obvious, but I'm not aware of anything in GitHub Actions that would help… :(


As for #404, while it looks a bit stalled now, it's entirely my fault that it's in draft since 2018: I kinda decided I didn't want it in. I changed my mind and we've revived it only at the end of October and Kyle's last push is only a little longer ago than a month. I would really like to see #404 finished and not merge subsets of his work.

I'm not 100% clear on what's stuck there rn (I'm busy getting a new structlog release out), but do you think you could maybe help out over there so we can finish the whole thing?

@hynek hynek closed this Feb 25, 2021
@hynek hynek deleted the branch python-attrs:master February 25, 2021 07:39
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