-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🌿 Fern Regeneration -- November 21, 2024 #12
base: master
Are you sure you want to change the base?
Conversation
@@ -57,11 +57,13 @@ def create( | |||
skip_wait_session_ready = False | |||
if hasattr(configuration, 'skip_wait_session_ready'): | |||
skip_wait_session_ready = typing.cast(SessionConfig, configuration).skip_wait_session_ready | |||
session_config_v1 = SessionConfigV1(**{k: v for k, v in configuration.__dict__.items() if k in SessionConfigV1.model_fields}) if configuration else None | |||
|
|||
session_config_v1 = SessionConfigV1(**{k: v for k, v in configuration.__dict__.items() if k in SessionConfigV1.__fields__}) if configuration else None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some unknown reason, the SessionConfigV1.model_fields
is not properly compiling with mypy.
It was working fine, but now it doesn't compile.
I changed it to use the __fields__
attribute, which is deprecated, but it just calls the model_fields
in the implementation.
@@ -168,12 +170,12 @@ async def main() -> None: | |||
if hasattr(configuration, 'skip_wait_session_ready'): | |||
skip_wait_session_ready = typing.cast(SessionConfig, configuration).skip_wait_session_ready | |||
|
|||
session_config_v1 = SessionConfigV1(**{k: v for k, v in configuration.__dict__.items() if k in SessionConfigV1.model_fields}) if configuration else None | |||
|
|||
session_config_v1 = SessionConfigV1(**{k: v for k, v in configuration.__dict__.items() if k in SessionConfigV1.__fields__}) if configuration else None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here about model_fields
vs __fields__
@@ -11,7 +11,7 @@ keywords = [ | |||
"browser", | |||
"automation", | |||
"agent", | |||
"python", | |||
"python" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pyproject.toml is not being generated properly with the updated fern python generator.
This PR regenerates code to match the latest API Definition.