Skip to content

Commit

Permalink
More unused code removal
Browse files Browse the repository at this point in the history
  • Loading branch information
jlumpe committed Jul 14, 2024
1 parent f1ac019 commit 973bac7
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/gambit/results/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from abc import ABC, abstractmethod
from typing import IO, Union, TextIO

from attr import asdict, attrs, attrib
from attr import attrs, attrib

from gambit.util.io import FilePath, maybe_open
import gambit.util.json as gjson
Expand Down Expand Up @@ -32,16 +32,6 @@ def _todict(obj, attrs):
return {a: getattr(obj, a) for a in attrs}


def asdict_method(recurse=False, **kw):
"""Create a ``to_json`` method which calls :func:`attrs.asdict` with the given options."""
def method(self, obj):
return asdict(obj, recurse=recurse, **kw)
return method


asdict_default = asdict_method()


@attrs()
class BaseJSONResultsExporter(AbstractResultsExporter):
"""Base class for JSON exporters.
Expand Down

0 comments on commit 973bac7

Please sign in to comment.