浏览代码

Fix type errors in template (#493)

叶子 2 年之前
父节点
当前提交
094082c35b
共有 2 个文件被更改,包括 2 次插入2 次删除
  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."""
 from pcconfig import config
 
@@ -13,7 +14,7 @@ class State(pc.State):
     pass
 
 
-def index():
+def index() -> pc.Component:
     return pc.center(
         pc.vstack(
             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.
 PCCONFIG = f"""import pynecone as pc
 
-
 config = pc.Config(
     app_name="{{app_name}}",
     db_url="{constants.DB_URL}",