From 67cc215ed3ba1ddda4ef9ac232a7794e1632034d Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 19 Nov 2024 11:45:37 -0800 Subject: [PATCH] style: Apply linter formatting to models.py --- aider/models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aider/models.py b/aider/models.py index 85425f866..a4f90047b 100644 --- a/aider/models.py +++ b/aider/models.py @@ -65,15 +65,16 @@ ANTHROPIC_MODELS = [ln.strip() for ln in ANTHROPIC_MODELS.splitlines() if ln.str def track_init_fields(cls): original_init = cls.__init__ - + @wraps(original_init) def __init__(self, **kwargs): self._set_fields = set(kwargs.keys()) original_init(self, **kwargs) - + cls.__init__ = __init__ return cls + @track_init_fields @dataclass class ModelSettings: @@ -96,7 +97,6 @@ class ModelSettings: editor_edit_format: Optional[str] = None - # https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo # https://platform.openai.com/docs/models/gpt-3-5-turbo # https://openai.com/pricing @@ -856,7 +856,7 @@ class Model(ModelSettings): if skip_name and field.name == "name": continue # Only copy fields that were explicitly set in the source - if hasattr(source, '_set_fields') and field.name in source._set_fields: + if hasattr(source, "_set_fields") and field.name in source._set_fields: val = getattr(source, field.name) setattr(self, field.name, val)