Skip to content

Asch/dynamic imports#100

Merged
aschlean merged 5 commits intomainfrom
asch/dynamic-imports
Aug 17, 2025
Merged

Asch/dynamic imports#100
aschlean merged 5 commits intomainfrom
asch/dynamic-imports

Conversation

@aschlean
Copy link
Contributor

Description

Adds import handling for dynamic imports in tools, resources and prompts.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

- Replace parse_common_files with parse_shared_files to find all .py files
- Add _is_golf_component_file to detect Golf components vs shared modules
- Support any Python file as importable shared module, not just common.py
- Update build_import_map to handle any shared file, not just common.py
- Replace _process_common_files with _process_shared_files
- Support nested directory structures and preserve original filenames
- Remove legacy find_common_files function
- Enhance ImportTransformer to support more relative import patterns
- Add better directory-based matching for complex imports
- Fix function signature to allow optional component parameter
- Handle edge cases in relative import resolution
@aschlean aschlean self-assigned this Aug 16, 2025
@aschlean aschlean merged commit 5066562 into main Aug 17, 2025
5 checks passed
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