Skip to content

[utils] Remove wildcard imports #753

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

Closed
wants to merge 3 commits into from

Conversation

modocache
Copy link
Contributor

From PEP 0008:

Wildcard imports (from <module> import *) should be avoided, as they make
it unclear which names are present in the namespace, confusing both readers
and many automated tools.

Using wildcard imports for SwiftBuildSupport.py makes it difficult to understand which exported functions are actually being used. These commits make this clearer--in some cases, it reveals that only one symbol is being used, or in the case of #751, that a function is never used at all.

From PEP 0008:

> Wildcard imports (`from <module> import *`) should be avoided, as they make
  it unclear which names are present in the namespace, confusing both readers
  and many automated tools.

Using a wildcard import in `utils/build-script` makes it difficult to
understand which exported functions from `SwiftBuildSupport.py` are
actually being used. Remove the wildcard in favor of an explicit, multi-line
import.
From PEP 0008:

> Wildcard imports (`from <module> import *`) should be avoided, as they make
  it unclear which names are present in the namespace, confusing both readers
  and many automated tools.

 Using a wildcard import in `utils/update-checkout` makes it difficult to
 understand which exported functions from `SwiftBuildSupport.py` are
 actually being used. Remove the wildcard in favor of an explicit, multi-line
 import.
From PEP 0008:

> Wildcard imports (`from <module> import *`) should be avoided, as they make
  it unclear which names are present in the namespace, confusing both readers
  and many automated tools.

Using a wildcard import in `utils/recursive-lipo` makes it difficult to
understand which exported functions from `SwiftBuildSupport.py` are
actually being used. In reality, only one function is used, so import
it explicitly.
@modocache
Copy link
Contributor Author

Oops! Turns out I largely duplicated work simultaneously being done in #752. I'll close this pull request in favor of that one.

@modocache modocache closed this Dec 23, 2015
@modocache modocache deleted the utils-wildcard-imports branch December 27, 2015 07:27
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.

1 participant