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

Delete redundant on_color.py #1456

Merged
merged 5 commits into from
May 27, 2021

Conversation

tburrows13
Copy link
Collaborator

Both on_color.py and VideoClip.on_color() were added in v0.2 (fdc51d2), but only VideoClip.on_color() has been maintained/updated since.

Somewhat related: is there a better name for on_color and/or its argument col_opacity? (-> background_opacity?)

@tburrows13 tburrows13 added the breaking-change Must not merge without proper approval. Requires full documentation (own section) in the changelog. label Jan 16, 2021
@coveralls
Copy link

coveralls commented Jan 16, 2021

Coverage Status

Coverage increased (+0.3%) to 77.6% when pulling 8b7442a on tburrows13:remove-redundant-on_color into ebfe16c on Zulko:master.

@mondeja
Copy link
Collaborator

mondeja commented Jan 16, 2021

I'm not a native English speaker, but perhaps VideoClip.over_color and color_opacity?

Copy link
Collaborator

@mondeja mondeja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the block after line 757 be moved to ImageClip calling VideoClip.on_color before this block using super()?

        if (
            isinstance(self, ImageClip)
            and (not hasattr(pos, "__call__"))
            and ((self.mask is None) or isinstance(self.mask, ImageClip))
        ):
            new_result = result.to_ImageClip()
            if result.mask is not None:
                new_result.mask = result.mask.to_ImageClip()
            return new_result.with_duration(result.duration)

@keikoro
Copy link
Collaborator

keikoro commented Jan 16, 2021

Somewhat related: is there a better name for on_color and/or its argument col_opacity? (-> background_opacity?)

I agree, on_color is not very clear. Would color_underlay (equivalent to overlay) make sense? I don't know if "background" is unambiguous enough considering that photo + film images have foregrounds and backgrounds as well. The other one could then be underlay_opacity.

Also, there is no real consistency in the naming of functions – actions vs. nouns – is there? (Though some could be either, I suppose.) -> color_underlay vs underlay_color...

@mondeja mondeja added the refactor Does not affect the end user at all i.e. making code easier to read or PEP8 compliant. label Jan 21, 2021
@mondeja
Copy link
Collaborator

mondeja commented May 27, 2021

We can change the name later, I'm going to merge this as is. Thank you @tburrows13 👍

@mondeja mondeja force-pushed the remove-redundant-on_color branch from d12a4f2 to 85919f1 Compare May 27, 2021 13:04
@mondeja mondeja merged commit 4d59f79 into Zulko:master May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Must not merge without proper approval. Requires full documentation (own section) in the changelog. refactor Does not affect the end user at all i.e. making code easier to read or PEP8 compliant.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants