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 Starbot ⭐ refactored pranathivemuri/vessels-ct-radius #1

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

Conversation

sourcery-ai-bot
Copy link

Thanks for starring sourcery-ai/sourcery ✨ 🌟 ✨

Here's your pull request refactoring your most popular Python repo.

If you want Sourcery to refactor all your Python repos and incoming pull requests install our bot.

Review changes via command line

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

git fetch https://github.com/sourcery-ai-bot/vessels-ct-radius master
git merge --ff-only FETCH_HEAD
git reset HEAD^

Comment on lines -218 to +220
raise ValueError("Given radius '{}' does not fit in cube edge length {}"
.format(radius, cube_edge))
raise ValueError(
f"Given radius '{radius}' does not fit in cube edge length {cube_edge}"
)
Copy link
Author

Choose a reason for hiding this comment

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

Function vessel_diagonal refactored with the following changes:

Comment on lines -335 to +338
assert similarity >= accuracy, \
"Binmask similarity {} < target accuracy {}".format(similarity, accuracy)
assert (
similarity >= accuracy
), f"Binmask similarity {similarity} < target accuracy {accuracy}"
Copy link
Author

Choose a reason for hiding this comment

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

Function assert_binmask_similar refactored with the following changes:

boundary_image = binary_image - erode_image
return boundary_image
return binary_image - erode_image
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_boundaries_of_image refactored with the following changes:

Comment on lines -71 to +70
dict_nodes_radius = {item: eucledian_radius_image[item] for item in list_nzi}
return dict_nodes_radius
return {item: eucledian_radius_image[item] for item in list_nzi}
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_radius_2d refactored with the following changes:

Comment on lines -119 to +117
dict_nodes_radius.update(new_d)
dict_nodes_radius |= new_d
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_radius_slicewise refactored with the following changes:

Comment on lines -137 to +138
max_dict = {}
for key, val in list_of_dicts[0].items():
max_dict[key] = max(list_of_dicts[i][key] for i in range(len(list_of_dicts)))
return max_dict
return {
key: max(list_of_dicts[i][key] for i in range(len(list_of_dicts)))
for key, val in list_of_dicts[0].items()
}
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_max_dict refactored with the following changes:

Comment on lines -177 to +175
dict_nodes_radius = get_max_dict(d)
return dict_nodes_radius
return get_max_dict(d)
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_radius_3d 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.

None yet

1 participant