-
Notifications
You must be signed in to change notification settings - Fork 12
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 #13
base: master
Are you sure you want to change the base?
Conversation
features = pd.DataFrame(data, index=[0]) | ||
return features | ||
return pd.DataFrame(data, index=[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function inputFeatures
refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable
)
final_img = dodgeV2(img_gray, img_smoothing) | ||
return(final_img) | ||
return dodgeV2(img_gray, img_smoothing) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function pencilsketch
refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable
)
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" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function load_data
refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable
)
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
)
finalImg = dodgeV2(grayScaleImg,smoothImg) | ||
return finalImg | ||
return dodgeV2(grayScaleImg,smoothImg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function imageConversion
refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable
)
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(""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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!")
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:Help us improve this pull request!