Skip to content

Conversation

@Tendo33
Copy link
Contributor

@Tendo33 Tendo33 commented Apr 25, 2025

  • Reorder and format import statements for better readability
  • Update GraphGen class to use field() for default values of wiki_client and traverse_strategy to void
    raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'graphgen.models.search.wiki_search.WikiSearch'> for field wiki_client is not allowed: use default_factory

    raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'graphgen.models.strategy.travserse_strategy.TraverseStrategy'> for field traverse_strategy is not allowed: use default_factory

- Reorder and format import statements for better readability
- Update GraphGen class to use field() for default values of wiki_client and traverse_strategy
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the GraphGen module by reorganizing import statements for improved readability and updating the GraphGen class to avoid using mutable defaults for its fields.

  • Reformatted and grouped import statements
  • Updated wiki_client and traverse_strategy to use field(default_factory=...) to prevent mutable default issues

@ChenZiHong-Gavin
Copy link
Collaborator

LGTM, thanks

@ChenZiHong-Gavin ChenZiHong-Gavin merged commit 8024193 into open-sciencelab:main Apr 25, 2025
2 checks passed
ChenZiHong-Gavin added a commit that referenced this pull request Jun 4, 2025
refactor(graphgen): update imports and adapt GraphGen class
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.

2 participants