-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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 by pep8 #1550
Merged
Merged
Refactor by pep8 #1550
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
2f09911
gensim dir PEP8 fixes
zsef123 84c5ad7
corpora dir PEP8 fixes
zsef123 5b10cbc
example dir PEP8 fixes
zsef123 0a957d4
model/wrapper dir PEP8 fixes
zsef123 eae37d7
models dir PEP8 fixes
zsef123 35453c0
parsing dir PEP8 fixes
zsef123 f5b52ad
scripts dir PEP8 fixes
zsef123 f955339
similarities dir PEP8 fixes
zsef123 3215493
summarization and topic_coherence dir PEP8 fixes
zsef123 4bdbf3e
test dir PEP8 fixes
zsef123 03735bc
PEP8 E722 error fixes
zsef123 fa7d8c9
PEP8 fixes
zsef123 624c272
list slice whitespace PEP8 fixes
zsef123 22816c0
disassemble import *
zsef123 e719cae
Fix symlink
menshikh-iv 537c789
Merge branch 'develop' into refactor-by-pep8
menshikh-iv 7bbfc22
fix symlink
menshikh-iv 8240c7d
fix make_wiki_lemma file
zsef123 23c4526
Replace relative import to absolute
menshikh-iv 8c96365
fix typo
menshikh-iv f74c568
fix E203 error
zsef123 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-1: we don't want to litter the code with some tool-specific constructs.
Instead, open an issue with the tool that requires this, it's a bug on their side if they cannot handle this line.
If you find such comments in other parts of gensim, please remove them too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@piskvorky it's not a tool bug, it's really "unused import" by PEP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it is used -- it makes the classes available directly from the package. Without it, you won't be able to
from corpora import MmCorpus
.Or how can this be done in other way, that doesn't trigger F401?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, but now in the code, it's unused import.
I know another way - use this imports (like your example) in gensim internally, but I don't think that this is a good idea. For my opinion,
noqa
suppress is OK.