Since upgrading to 0.54 release VStudio Code has been underlining all of the widget method calls and giving the warning “No value for argument ‘body’ in method call pylint(no-value-for-parameter)”. This happens for all streamlit method calls except for st.write.
Any suggestions on how to resolve this?
For example:
this is fine:
st.write(‘some text’)
st is underlined with error as described above:
st.header(‘some header’)
st.sidebar.markdown(‘settings…’)
Hi guys,
Looking at this PR, I see that it has been merged in mid Feb. I am still seeing this issue with VSCode today in May. I am using version 0.60.0. I am not sure if this just on my end or if this fix has made it into the 0.60.0 release. Appreciate the help.
Thanks for the heads up, I’ll push this to the eng team. Thanks @Raghav_Khullar for the GH issue btw.
Can reproduce it with pylint. @pymagnit@nicolasdaviaud@Sesostrismage can you confirm the underlined error comes from pylint ? You can check that on the bottom of VSCode there should be a circled x you can click on and see if it’s a pylint(no-value-for-parameter).
As a workaround for the time being, disabling linting and only relying on the IDE’s settings looks good for me. You can also add # pylint: disable=E1120 at the top of your script to disable the warning.
@andfanilo somehow I stoped getting this error! I installed streamlit on a different environment and the issue did not occur. The original environment had some other issues. I think it was probably on my end.
I continue to have this annoying “red-underline” widgets issue with VS Code in Streamlit 0.74.1. The issue goes away when including the following line in the settings.json: “python.linting.pylintEnabled”: false,", or disabling Linting from the command palette, but I hate turning this off – functionality is lost.
I like VS Code but I’m wondering if I should switch to Sublime – something that works properly? Any recommendations on this?