Sourcery refactored master branch#13
Open
sourcery-ai[bot] wants to merge 1 commit into
Open
Conversation
| 'petal_width': petal_width} | ||
| features = pd.DataFrame(data, index=[0]) | ||
| return features | ||
| return pd.DataFrame(data, index=[0]) |
Author
There was a problem hiding this comment.
Function inputFeatures refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable)
| img_smoothing = cv2.GaussianBlur(img_invert, (21, 21),sigmaX=0, sigmaY=0) | ||
| final_img = dodgeV2(img_gray, img_smoothing) | ||
| return(final_img) | ||
| return dodgeV2(img_gray, img_smoothing) |
Author
There was a problem hiding this comment.
Function pencilsketch refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable)
Comment on lines
-49
to
+51
| df = pd.read_csv("https://github.com/SurendraRedd/StreamlitProjects/raw/master/lang.csv") | ||
| return df | ||
| return pd.read_csv( | ||
| "https://github.com/SurendraRedd/StreamlitProjects/raw/master/lang.csv" | ||
| ) |
Author
There was a problem hiding this comment.
Function load_data refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable)
Comment on lines
-78
to
+79
| st.markdown('<i class="material-icons">{}</i>'.format("people"), unsafe_allow_html=True) | ||
| st.markdown('<i class="material-icons">people</i>', unsafe_allow_html=True) |
Author
There was a problem hiding this comment.
Function main refactored with the following changes:
- Use named expression to simplify assignment and conditional (
use-named-expression) - Replace call to format with f-string (
use-fstring-for-formatting) - Simplify unnecessary nesting, casting and constant values in f-strings (
simplify-fstring-formatting) - Replace f-string with no interpolated values with string (
remove-redundant-fstring)
| smoothImg = cv2.GaussianBlur(invertImg, (21,21),sigmaX=0, sigmaY=0) | ||
| finalImg = dodgeV2(grayScaleImg,smoothImg) | ||
| return finalImg | ||
| return dodgeV2(grayScaleImg,smoothImg) |
Author
There was a problem hiding this comment.
Function imageConversion refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable)
Comment on lines
-28
to
+38
| st.title("Convert an image in to pencil sketch") | ||
| st.subheader("This application has options to select the image either from sidebar or in mainpage.") | ||
| html_temp = """ | ||
| st.title("Convert an image in to pencil sketch") | ||
| st.subheader("This application has options to select the image either from sidebar or in mainpage.") | ||
| html_temp = """ | ||
| <body style="background-color:red;"> | ||
| <div style="background-color:teal ;padding:10px"> | ||
| <h2 style="color:white;text-align:center;">Image to Pencil Sketch App</h2> | ||
| </div> | ||
| </body> | ||
| """ | ||
| st.markdown(html_temp, unsafe_allow_html=True) | ||
| st.write("-----------------------------------------------------------------------") | ||
| st.write(""" | ||
| st.markdown(html_temp, unsafe_allow_html=True) | ||
| st.write("-----------------------------------------------------------------------") | ||
| st.write(""" |
Author
There was a problem hiding this comment.
Function main refactored with the following changes:
- Swap if/else to remove empty if body [×2] (
remove-pass-body) - Remove redundant pass statement (
remove-redundant-pass)
This removes the following comments ( why? ):
#st.error("Select the image to proceed!")
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Branch
masterrefactored 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
masterbranch, then run:Help us improve this pull request!