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

Sourcery refactored master branch #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Aug 25, 2023

Branch master refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on the master branch, then run:

git fetch origin sourcery/master
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from hacksider August 25, 2023 03:21
if has_frame:
return frame
return None
return frame if has_frame else None
Copy link
Author

Choose a reason for hiding this comment

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

Function get_video_frame refactored with the following changes:

print('[' + scope + '] ' + message)
print(f'[{scope}] {message}')
Copy link
Author

Choose a reason for hiding this comment

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

Function update_status refactored with the following changes:

# process frame
temp_frame_paths = get_temp_frame_paths(facefusion.globals.target_path)
if temp_frame_paths:
if temp_frame_paths := get_temp_frame_paths(facefusion.globals.target_path):
Copy link
Author

Choose a reason for hiding this comment

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

Function process_video refactored with the following changes:

This removes the following comments ( why? ):

# process frame

many_faces = get_many_faces(frame)
if many_faces:
if many_faces := get_many_faces(frame):
Copy link
Author

Choose a reason for hiding this comment

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

Function get_one_face refactored with the following changes:

commands = [ 'ffmpeg', '-hide_banner', '-loglevel', 'error' ]
commands.extend(args)
commands = ['ffmpeg', '-hide_banner', '-loglevel', 'error', *args]
Copy link
Author

Choose a reason for hiding this comment

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

Function run_ffmpeg refactored with the following changes:

Comment on lines -33 to +35
ui_layout_module = importlib.import_module('facefusion.uis.layouts.' + ui_layout)
ui_layout_module = importlib.import_module(
f'facefusion.uis.layouts.{ui_layout}'
)
Copy link
Author

Choose a reason for hiding this comment

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

Function load_ui_layout_module refactored with the following changes:

Comment on lines -57 to +59
if name in COMPONENTS:
return COMPONENTS[name]
return None
return COMPONENTS[name] if name in COMPONENTS else None
Copy link
Author

Choose a reason for hiding this comment

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

Function get_component refactored with the following changes:

component = ui.get_component(component_name)
if component:
if component := ui.get_component(component_name):
Copy link
Author

Choose a reason for hiding this comment

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

Function listen refactored with the following changes:

component = ui.get_component(component_name)
if component:
if component := ui.get_component(component_name):
Copy link
Author

Choose a reason for hiding this comment

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

Function listen refactored with the following changes:

target_file = ui.get_component('target_file')
if target_file:
if target_file := ui.get_component('target_file'):
Copy link
Author

Choose a reason for hiding this comment

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

Function listen refactored with the following changes:

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.

0 participants