Any advice for working with Pyright/Pylance? #2017
-
I was not able to find anything on the documentation regarding these tools. I like to have my code thoroughly checked by pyright. Pyright does not like the fact that output functions appear to be unused. For example, from the basic-sidebar template. def server(input, output, session):
@render.plot
def hist():
hue = "species" if input.species() else None
sns.kdeplot(df, x=input.var(), hue=hue)
if input.show_rug():
sns.rugplot(df, x=input.var(), hue=hue, color="black", alpha=0.25) Here hist is unused according to Pyright. One option: I could add As I write this, it occurs to me my favourite option would be to use R style shiny and assign |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
If you have a pyrightconfig.json file in your project, you can add:
Or you can add this at the top of your app.py file to have it ignore the rule just for that file.
|
Beta Was this translation helpful? Give feedback.
If you have a pyrightconfig.json file in your project, you can add:
Or you can add this at the top of your app.py file to have it ignore the rule just for that file.