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

PEP8 : ffmpeg_reader #11

Merged
merged 2 commits into from Feb 4, 2014
Merged

PEP8 : ffmpeg_reader #11

merged 2 commits into from Feb 4, 2014

Conversation

tacaswell
Copy link
Contributor

No description provided.

@Zulko
Copy link
Owner

Zulko commented Feb 4, 2014

Ach, I am working on this file right now... Plus, I agree with the spacing correction, but for the rest, lines such as

self.depth = 4 if pix_fmt=="rgba" else 3

are perfectly valid in my opinion, I don't think they need to be exploded into 4 lines. And I found a typo in your new lines: pix_ftm instead of pix_fmt.

So I am not merging this one, sorry, but thanks ! PEP8 is indead a problem in the current state of the code.

@tacaswell
Copy link
Contributor Author

fixed the typo.

I find the explicit if statements are much more readable and can not think of any cost to having more lines of code.

@Zulko
Copy link
Owner

Zulko commented Feb 4, 2014

Still not convinced by the conditional if, but the PEP8 corrections are worth the merge. Thanks !

Zulko added a commit that referenced this pull request Feb 4, 2014
@Zulko Zulko merged commit 7e07bb3 into Zulko:master Feb 4, 2014
@tacaswell
Copy link
Contributor Author

Its a bit late now that you have already pushed the button, but for future reference, if you pull my branch down to your local machine and then do an interactive merge. You could revert the changes you don't like in the merge commit and then push the merge commit back up to the github master. Because my commit would be in the history (as you changed the code in the merge commit) github will auto-magically close the PR and you don't get the changes you don't want.

It will also take you less time than it took me to write this comment to just revert it with a new commit ;)

@tacaswell tacaswell deleted the pep8 branch February 4, 2014 16:58
@Zulko
Copy link
Owner

Zulko commented Feb 4, 2014

Ok, thanks for the tip !

Le 04/02/2014 17:57, Thomas A Caswell a écrit :

Its a bit late now that you have already pushed the button, but for
future reference, if you pull my branch down to your local machine and
then do an interactive merge. You could revert the changes you don't
like in the merge commit and then push the merge commit back up to the
github master. Because my commit would be in the history (as you
changed the code in the merge commit) so github will auto-magically
close the PR and you don't get the changes you don't want.

It will also take you less time than it took me to write this comment
to just revert it with a new commit ;)


Reply to this email directly or view it on GitHub
#11 (comment).

@Zulko
Copy link
Owner

Zulko commented Feb 14, 2014

Hey !

In case you are interested, I changed a few lines in ffmpeg_reader to
make it python3-compatible.
On python3 subprocess has a small buffer by default which makes it
impossible to read a frame from a video.

See the changes here:

252f175#diff-a49583100a493b6fe1c05b48824e4a3c

Le 04/02/2014 17:57, Thomas A Caswell a écrit :

Its a bit late now that you have already pushed the button, but for
future reference, if you pull my branch down to your local machine and
then do an interactive merge. You could revert the changes you don't
like in the merge commit and then push the merge commit back up to the
github master. Because my commit would be in the history (as you
changed the code in the merge commit) so github will auto-magically
close the PR and you don't get the changes you don't want.

It will also take you less time than it took me to write this comment
to just revert it with a new commit ;)


Reply to this email directly or view it on GitHub
#11 (comment).

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.

None yet

2 participants