8000 Update github_action_runner.py by letzya · Pull Request #1883 · qodo-ai/pr-agent · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update github_action_runner.py #1883

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

Merged
merged 1 commit into from
Jun 18, 2025
Merged

Update github_action_runner.py #1883

merged 1 commit into from
Jun 18, 2025

Conversation

letzya
Copy link
Contributor
@letzya letzya commented Jun 17, 2025

fix #1882

Error in gh action

ImportError: cannot import name 'DynaBox' from 'dynaconf.utils' (/usr/local/lib/python3.12/site-packages/dynaconf/utils/__init__.py)

The correct path is used here:

if str(type(setting)) == "<class 'dynaconf.utils.boxing.DynaBox'>":

DynaBox no longer exists in dynaconf.utils. As of dynaconf >= 3.2.0, DynaBox was moved to dynaconf.utils.boxing.

the error in my repo https://github.com/TykTechnologies/tyk-docs/actions/runs/15713872984/job/44279364678?pr=6549

8000

Copy link
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Import Verification

The updated import path should be verified to ensure it works correctly with the current dynaconf version and that DynaBox is properly accessible from the new location.

from dynaconf.utils.boxing.DynaBox import DynaBox

Copy link
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Fix redundant import statement

The import statement is redundant and incorrect. When importing from a module
that has the same name as the class, you don't need to specify the class name
twice in the import path.

pr_agent/servers/github_action_runner.py [6]

-from dynaconf.utils.boxing.DynaBox import DynaBox
+from dynaconf.utils.boxing import DynaBox
  • Apply / Chat
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies that the new import statement is incorrect. The proposed change fixes a likely ImportError by providing the correct path to the DynaBox class, which is critical for the application's functionality.

High
  • More
  • Author self-review: I have reviewed the PR code suggestions, and addressed the relevant ones.

@@ -3,7 +3,7 @@
import os
from typing import Union

from dynaconf.utils import DynaBox
from dynaconf.utils.boxing.DynaBox import DynaBox

Choose a reason for hiding this comment

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

It should be without the DynaBox in the from clause

from dynaconf.utils.boxing import DynaBox

@mrT23
Copy link
Collaborator
mrT23 commented Jun 18, 2025

thanks for the fix @santosr2
i will merge and rebuild

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cannot import name 'DynaBox' from 'dynaconf.utils'
3 participants
0