-
Notifications
You must be signed in to change notification settings - Fork 64
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
Refactor ExampleCollector #67
Open
angelsanzn
wants to merge
20
commits into
nestorsalceda:master
Choose a base branch
from
angelsanzn:refactor-example-collector
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Refactor ExampleCollector #67
angelsanzn
wants to merge
20
commits into
nestorsalceda:master
from
angelsanzn:refactor-example-collector
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angelsanzn
force-pushed
the
refactor-example-collector
branch
2 times, most recently
from
February 4, 2016 18:06
b444e5d
to
4d62974
Compare
Rename some variables to make explicit that they are file names, not files, and paths, not directories. Extract a method for creating path to spec files. Ignore the second item in the tuples returned by os.walk. Adjust indendation
Only the call to __import__ can throw. So we can use a for-else to make explicit what should be done in case it doesn't throw.
the importing of local non-installed modules
…text manager There is no real setup/teardown work needing to be done in that method, it just prepares the module name and delegates to another method. So using a context manager adds little benefit. This also simplifies the implementation of ExampleCollector#modules a bit more.
- Give more information about the code object. - Decouple _create_module_object from its particular usage in the class.
angelsanzn
force-pushed
the
refactor-example-collector
branch
from
February 5, 2016 00:32
4d62974
to
01ac426
Compare
- Remove unnecessary conversion to list - Remove old unused variable binding in with statement
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
And again, some improvements that I thought of when reading this class.
Mostly about naming, making methods smaller and narrowing scopes in general.
One question: I don't really undestand the TODO comment in this file. Is it still relevant? Should I wipe it as well, or add a more detailed issue?