From 2cf396fb7d43d921c45a848921f0de4b9fadab08 Mon Sep 17 00:00:00 2001 From: RayBB Date: Mon, 23 Dec 2024 17:14:37 -0500 Subject: [PATCH] fix PLC0206 --- openlibrary/accounts/model.py | 4 ++-- openlibrary/solr/types_generator.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openlibrary/accounts/model.py b/openlibrary/accounts/model.py index aac5a73f1c5..0318b46d810 100644 --- a/openlibrary/accounts/model.py +++ b/openlibrary/accounts/model.py @@ -622,8 +622,8 @@ def authenticate(cls, email, password, test=False): class InternetArchiveAccount(web.storage): def __init__(self, **kwargs): - for k in kwargs: - setattr(self, k, kwargs[k]) + for k, v in kwargs.items(): + setattr(self, k, v) @classmethod def create( diff --git a/openlibrary/solr/types_generator.py b/openlibrary/solr/types_generator.py index 9c46445d31c..a731daa4595 100755 --- a/openlibrary/solr/types_generator.py +++ b/openlibrary/solr/types_generator.py @@ -75,9 +75,9 @@ def generate(): seen_names.add(name) python_fields.append(f" {name}: {python_type}") - for key in OVERRIDES: + for key, value in OVERRIDES.items(): if key not in seen_names: - python_fields.append(f" {key}: {OVERRIDES[key]}") + python_fields.append(f" {key}: {value}") body = '\n'.join(python_fields) python = f"""# This file is auto-generated by types_generator.py