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

Added type parameter to attrs.field() function #1107

Merged
merged 12 commits into from
Apr 3, 2023

Conversation

chrysle
Copy link
Contributor

@chrysle chrysle commented Feb 28, 2023

Summary

This resolves #1082

Could somebody help me with the tests? I'm not sure they're right where they are.

Pull Request Check List

  • Added tests for changed code.
    Our CI fails if coverage is not 100%.
  • 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.
    • If they've been added to attr/__init__.pyi, they've also been re-imported in attrs/__init__.pyi.
  • 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.
      The next version is the second number in the current release + 1.
      So if the current version on PyPI is 23.1.0, the next version is gonna be 23.2.0.
  • Documentation in .rst files is written using semantic newlines.
  • Changes (and possible deprecations) have news fragments in changelog.d.
  • Consider granting push permissions to the PR branch, so maintainers can fix minor issues themselves without pestering you.

Copy link
Member

@hynek hynek left a comment

Choose a reason for hiding this comment

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

Thanks, I've just added some warnings!

Sorry it took so long, sadly this is about the worst time of the year for me and FOSS.

changelog.d/1107.change.md Outdated Show resolved Hide resolved
tests/test_next_gen.py Outdated Show resolved Hide resolved
src/attr/_next_gen.py Outdated Show resolved Hide resolved
@hynek hynek enabled auto-merge (squash) April 3, 2023 14:36
@hynek hynek merged commit 65ee286 into python-attrs:main Apr 3, 2023
@chrysle chrysle deleted the type_attrs_field branch April 3, 2023 15:43
@chrysle
Copy link
Contributor Author

chrysle commented Apr 3, 2023

No problem, thanks for accepting!

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.

Add type back to attrs.field() for use in attrs.make_class()
2 participants