Skip to content

0.17.0

Compare
Choose a tag to compare
@15r10nk 15r10nk released this 14 Dec 09:37
· 28 commits to main since this release

Added

  • attrs can now contain unmanaged values

    import datetime as dt
    import uuid
    import attrs
    from dirty_equals import IsDatetime
    from inline_snapshot import Is, snapshot
    
    @attrs.define
    class Attrs:
        ts: dt.datetime
        id: uuid.UUID
    
    def test():
        id = uuid.uuid4()
    
        assert Attrs(dt.datetime.now(), id) == snapshot(
            Attrs(ts=IsDatetime(), id=Is(id))
        )