XRPLF / xrpl-py

A Python library to interact with the XRP Ledger (XRPL) blockchain
ISC License
150 stars 86 forks source link

refactor: use `Self` instead of class name #706

Closed mvadari closed 4 months ago

mvadari commented 6 months ago

High Level Overview of Change

This PR replaces the self: ClassName paradigm with self: Self, added in Python 3.11 but supported in typing_extensions for all versions. This allows us to remove most of the awkward, unintuitive uses of TypeVar.

Context of Change

It's cleaner and better for handling inheritance.

Type of Change

Did you update CHANGELOG.md?

Test Plan

CI passes.

mvadari commented 5 months ago

That was a lot to cover but LGTM 😄

It's all just the same change over and over again 😅