Skip to content

Commit bfcb118

Browse files
authored
Release Candidate v4.12.2 (#289)
2 parents 3b8b120 + 5817884 commit bfcb118

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

.cursor/rules/style.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Always start with modifying the main code. When done, look for tests and update
1313

1414
#### Python
1515

16-
In Python, I want you to use the latest type syntax (`type | None`) instead of `Optional`. I also want you to use a single space (`=`) around the equals sign (`=`) in function argument calls. It's important to use double quotation marks (`"`) instead of single quotations (`'`). And finally, we want to always use trailing commas in multi-line function declarations and calls. There's never a reason to write `unittest.main()` manually, we have a script for running tests. Never use inline imports, always use `from ... import ...` syntax at the top of the file.
16+
In Python, I want you to use the latest type syntax (`type | None`) instead of `Optional`. I also want you to use a single space (`=`) around the equals sign (`=`) in function argument calls. It's important to use double quotation marks (`"`) instead of single quotations (`'`). And finally, we want to always use trailing commas in multi-line function declarations and calls. There's never a reason to write `unittest.main()` manually, we have a script for running tests. Never use inline imports inside of functions (use file header even in tests), and always use `from ... import ...` syntax at the top of the file.
1717

1818
#### JavaScript/TypeScript
1919

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.12.1
1+
4.12.2

src/db/schema/user.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,13 @@ class User(UserBase):
9393
model_config = ConfigDict(from_attributes = True)
9494

9595
def has_any_api_key(self) -> bool:
96-
secret_fields = self._get_secret_str_fields()
97-
return any(getattr(self, field) is not None for field in secret_fields)
96+
api_key_fields = [
97+
"open_ai_key",
98+
"anthropic_key",
99+
"google_ai_key",
100+
"perplexity_key",
101+
"replicate_key",
102+
"rapid_api_key",
103+
"coinmarketcap_key",
104+
]
105+
return any(getattr(self, field) is not None for field in api_key_fields)

0 commit comments

Comments
 (0)