Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Circular imports if module imports are at the top of files #1030

Closed
lb324567 opened this issue Oct 6, 2022 · 1 comment
Closed

Circular imports if module imports are at the top of files #1030

lb324567 opened this issue Oct 6, 2022 · 1 comment

Comments

@lb324567
Copy link
Member

lb324567 commented Oct 6, 2022

#137 added checks to ensure the Python code conformed to best practices. However, one of the changes that should be made is to move all module level imports to the top of the file. If this is done as the code stands now, it causes circular import issues within the testing.
Part of this may be to do with the generated Fishbowl code, so this might not be something we can easily fix but it should be looked into as we should aim to have all module imports at the top of the file to adhere to best practice.

if this can be fixed, the autopep8 action should also be changed to stop the checks from skipping the E402 rule.

@GCHQDeveloper314 GCHQDeveloper314 added this to the post-v2.0_backlog milestone Nov 2, 2022
@t92549
Copy link
Contributor

t92549 commented Mar 7, 2023

Due to how the fishbowl generated code imports work, this has to be done unfortunately:

# Import generated operation implementations from fishbowl
from gafferpy.generated_api.operations import *

@t92549 t92549 closed this as completed Mar 7, 2023
@t92549 t92549 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 7, 2023
@t92549 t92549 removed this from the post-v2.0_backlog milestone Mar 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants