Browse Source

Fix type errors in template (#493)

叶子 2 years ago
parent
commit
094082c35b
2 changed files with 2 additions and 2 deletions
  1. 2 1
      pynecone/.templates/app/tutorial.py
  2. 0 1
      pynecone/compiler/templates.py

+ 2 - 1
pynecone/.templates/app/tutorial.py

@@ -1,3 +1,4 @@
+# type: ignore
 """Welcome to Pynecone! This file outlines the steps to create a basic app."""
 """Welcome to Pynecone! This file outlines the steps to create a basic app."""
 from pcconfig import config
 from pcconfig import config
 
 
@@ -13,7 +14,7 @@ class State(pc.State):
     pass
     pass
 
 
 
 
-def index():
+def index() -> pc.Component:
     return pc.center(
     return pc.center(
         pc.vstack(
         pc.vstack(
             pc.heading("Welcome to Pynecone!", font_size="2em"),
             pc.heading("Welcome to Pynecone!", font_size="2em"),

+ 0 - 1
pynecone/compiler/templates.py

@@ -8,7 +8,6 @@ from pynecone.utils import join
 # Template for the Pynecone config file.
 # Template for the Pynecone config file.
 PCCONFIG = f"""import pynecone as pc
 PCCONFIG = f"""import pynecone as pc
 
 
-
 config = pc.Config(
 config = pc.Config(
     app_name="{{app_name}}",
     app_name="{{app_name}}",
     db_url="{constants.DB_URL}",
     db_url="{constants.DB_URL}",