Skip to content
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

Resolve circular imports bound to HandlerId #722

Merged
merged 1 commit into from
Mar 27, 2021
Merged

Conversation

nolar
Copy link
Owner

@nolar nolar commented Mar 27, 2021

The chain of dependencies this time was (introduced in e89ac21, #708's "examples"):

  • callbacks imported configuration for the "settings" kwarg.
  • configuration imported storage.progress for its persistence settings.
  • storage.progress imported handlers for only HandlerId.
  • handlers imported callbacks for handlers' function types.

The chain is broken at the progress->handlers dependency: it is now progress->ids.

This was a frequent problem before, so HandlerId deserves its dedicated moduled until all modules are rebalanced (later).

The chain of dependencies this time was (introduced in e89ac21):

* `callbacks` imported `configuration` for the "settings" kwarg.
* `configuration` imported `storage.progress` for its persistence settings.
* `storage.progress` imported `handlers` for only `HandlerId`.
* `handlers` imported `callbacks` for handlers' function types.

The chain is broken at the `progress`->`handlers` dependency: it is now `progress`->`ids`.

This was a frequent problem before, so `HandlerId` deserves its dedicated moduled until all modules are rebalanced (later).

Signed-off-by: Sergey Vasilyev <nolar@nolar.info>
@nolar nolar added the refactoring Code cleanup without new features added label Mar 27, 2021
@lgtm-com
Copy link

lgtm-com bot commented Mar 27, 2021

This pull request fixes 31 alerts when merging 8fb507c into db2c6cd - view on LGTM.com

fixed alerts:

  • 31 for Module-level cyclic import

@nolar nolar merged commit be758ae into main Mar 27, 2021
@nolar nolar deleted the resolve-circular-imports branch March 27, 2021 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Code cleanup without new features added
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant