Skip to content

fix: Do not consider imports within functions - #54

Open
webbrain-one wants to merge 1 commit into
abdelrahman0w:mainfrom
webbrain-one:webbrain/issue-52
Open

fix: Do not consider imports within functions#54
webbrain-one wants to merge 1 commit into
abdelrahman0w:mainfrom
webbrain-one:webbrain/issue-52

Conversation

@webbrain-one

Copy link
Copy Markdown

Closes #52

Imports inside functions are a valid strategy to avoid circular
dependencies. Since Python caches modules, this pattern is performant.

Prevent the AST walker from traversing function bodies to stop these
local imports from being flagged as circular import issues.

Closes abdelrahman0w#52
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 27 complexity · 0 duplication

Metric Results
Complexity 27
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

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.

Do not consider imports within functions

1 participant