-
Notifications
You must be signed in to change notification settings - Fork 47
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
fix a example pathon file with flake8 style checker #87
Conversation
Looks good.
Minor errors are fine.
But please accumulate changes from other files into this pull request.
When you've done everything we can test and make sure everything still
works.
As you change things, at least run the run.sh in egs/self_test to make sure
it's not broken in a particularly bad way.
Dan
…On Wed, Nov 23, 2016 at 11:21 PM, LvHang ***@***.***> wrote:
@danpovey <https://github.com/danpovey>
Hi, Dan. Ke Li has already shared the "python style check" task with me.
#85 <#85>
I have already install the vim-flake8 plugin.
This is an example file which I modified according to the suggestions of
flake8. It still has one problem in line 11. The flake8 says "line too long
(80 > 79 characters)". Just one character. I'm not sure whether I need to
change it.
Please let me know whether what I do is in line with your ideas. If it's
okay, I will continue.
Thanks.
Hang
------------------------------
You can view, comment on, or merge this pull request online at:
#87
Commit Summary
- fix a example pathon file with flake8 style checker
File Changes
- *M* egs/swbd/local/map_acronyms_transcripts.py
<https://github.com/danpovey/pocolm/pull/87/files#diff-0> (20)
Patch Links:
- https://github.com/danpovey/pocolm/pull/87.patch
- https://github.com/danpovey/pocolm/pull/87.diff
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#87>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADJVu16rUjuxbCeGPQhehHesBt3bZ_Foks5rBRDYgaJpZM4K7RGH>
.
|
Get it, I will accumulate changes with command like "git rebase". |
@danpovey The files still have some alerts when you check them with 'flake8':
Thank you for your patient and guidance. |
Great, thanks. I'll look at this in more detail to-morrow.
…On Mon, Nov 28, 2016 at 12:12 AM, LvHang ***@***.***> wrote:
@danpovey <https://github.com/danpovey>
Hi Dan,
I think maybe I have fixed all the python files in 'pocolm' according to
the suggestions of 'flake8'.
After I modify each file, I run the run.sh in egs/self_test. I'm sure it
works so far.
Maybe you can conduct further tests. I will modify them if there is a
problem in the file or you think it need to be changed.
The files still have some alerts when you check them with 'flake8':
(The first four kind warning is very limited)
1. E402 module level import not at top of file. Because we import the
function from pocolm_common or others. We need make sure the
scripts/internal is on the pythonpath. So this kind of alerts will still
exist.
I think we can leave it there.
2. F821 undefined name which I told you in the email.
I think we can leave it there.
3. F841 local variable is assigned to but never used. I'm not sure
whether you need it in the further.
So I leave it there.
4. E114 indentation is not a multiple of four(comment). It only
appears in 'word_counts_to_vocab.py'. When successive multiple single-line
comments(# ) appears in the middle of multiple raws, the problem may occurs.
I leave it there for easy understanding the content of comment.
5. Most of the remaining alerts is E501 line too long. For this kind
of alerts, I have no idea about how to judge whether it need to change. If
you can give me some suggestions, I will appreciate it. And I will fix it.
Thank you for your patient and guidance.
Hang
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#87 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADJVu5wA9uGnM6gG6pMgvlrJHrCYqfZ0ks5rCmKigaJpZM4K7RGH>
.
|
Actually, @wantee, do you have any time to look and see that what he did was reasonable, and maybe run some of the tests? |
1 similar comment
Actually, @wantee, do you have any time to look and see that what he did was reasonable, and maybe run some of the tests? |
OK, Great. I will take a look at this. |
I ran tests on swbd, it looks good.
Is that due to different version of flake8? mine is
|
My flake8 version is: Bests, |
If we don't use the gzip in a file, you can remove the import code. You can find my full log at http://pastebin.com/Mkh71Z9K. I ran |
@wantee |
fix all the python files in pocolm with flake8 fix the import gzip
@danpovey @wantee I fix the "import gzip" in files. I conduct the test on egs/self_test. Maybe you can conduct further tests. Thank you for your guidance. |
Thanks, I ran the swbd test, it works well. You could merge this PR, Dan, if you think the remaining errors are acceptable. |
OK great, will merge.
…On Fri, Dec 2, 2016 at 5:28 AM, Wang Jian ***@***.***> wrote:
Thanks, I ran the swbd test, it works well. You could merge this PR, Dan,
if you think the remaining errors are acceptable.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#87 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADJVu5JanunQJ1dhAGd-0xvhEaZwTkt1ks5rD_LMgaJpZM4K7RGH>
.
|
@danpovey
Hi, Dan. Ke Li has already shared the "python style check" task with me. #85
I have already install the vim-flake8 plugin.
This is an example file which I modified according to the suggestions of flake8. It still has one problem in line 11. The flake8 says "line too long (80 > 79 characters)". Just one character. I'm not sure whether I need to change it.
Please let me know whether what I do is in line with your ideas. If it's okay, I will continue.
Thanks.
Hang