Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

fern-api[bot]
Copy link
Contributor

@fern-api fern-api bot commented Nov 21, 2024

This PR regenerates code to match the latest API Definition.

@@ -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
Copy link
Collaborator

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
Copy link
Collaborator

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"
Copy link
Collaborator

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.

@kvindascr kvindascr requested a review from culli November 22, 2024 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant