canonical / ops-scenario

State-transition testing SDK for Operator Framework Juju charms.
Apache License 2.0
10 stars 7 forks source link

refactor!: remove `_DCBase` #116

Closed tonyandrewmeyer closed 3 months ago

tonyandrewmeyer commented 5 months ago

This removes the _DCBase parent class, which removes the .copy() and .replace() methods from the various state classes. Instead, we force people to import copy and/or dataclasses and use copy.deepcopy() and/or dataclasses.replace().

tonyandrewmeyer commented 3 months ago

funnily enough, I saw in some of the other PRs that you've in fact been using dcbase.replace, did you change your mind or are you creating more work for yourself? :D

The later :smile:. It felt tidiest at the time to have the PR match the current code rather than something in another PR, but that's probably overthinking things and I should have indeed just gone straight to dataclasses.replace.