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

Explicitly state imports in databaker.constants #44

Open
goatchurchprime opened this issue Oct 3, 2016 · 3 comments
Open

Explicitly state imports in databaker.constants #44

goatchurchprime opened this issue Oct 3, 2016 · 3 comments
Assignees

Comments

@goatchurchprime
Copy link
Contributor

All recipes begin with: from databaker.constants import * so it helps if this is less of a mess -- like, for example, we know about all the constants that it does import.

Currently there is a circular dependency with an import bake

It appears this is to access the command line options in bake.Opt.params for use in the PARAMS() function -- which anyway doesn't seem to be called from anywhere.

We should delete this section

@StevenMaude
Copy link
Contributor

Some of this will be addressed in https://github.com/sensiblecodeio/databaker/tree/python-3-support which is based on Dragon's changes in https://github.com/sensiblecodeio/databaker/tree/fix_circular_imports (which can't be merged as it's out of date and there are considerable enough differences to make it easier to hand patch the current master instead). import bake is gone from bake.py, and the bake.Opt.params has been refactored.

Python 3 seems to be less forgiving of these circular imports than Python 2, so it needs fixing first.

The * imports we should resolve too; the intent is unclear and produces noisy linter warnings.

@StevenMaude StevenMaude self-assigned this Oct 4, 2016
@StevenMaude
Copy link
Contributor

StevenMaude commented Oct 6, 2016

PARAMS is used in tests.

@StevenMaude
Copy link
Contributor

The circular imports fixes are in master now, so we just need to explicitly state the imports now.

@StevenMaude StevenMaude changed the title remove complexity and dependencies from databaker.constants Explicitly state imports in databaker.constants Feb 27, 2017
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

No branches or pull requests

2 participants