Skip to content

Commit df65ca1

Browse files
author
Jeff Yang
authored
fix: template file extension rename to .py (#43) [skip ci]
* fix: file ext to pyi for image classification * fix: rename to .py
1 parent 9ef83ca commit df65ca1

34 files changed

+8
-8
lines changed

.github/run_code_style.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
set -xeu
44

55
if [ $1 == "lint" ]; then
6-
flake8 app templates tests --config .flake8
7-
isort app templates tests --check --settings pyproject.toml
8-
black app templates tests --check --config pyproject.toml
6+
flake8 app templates/*/_sidebar.py tests --config .flake8
7+
isort app templates/*/_sidebar.py tests --check --settings pyproject.toml
8+
black app templates/*/_sidebar.py tests --check --config pyproject.toml
99
elif [ $1 == "fmt" ]; then
10-
isort app templates tests --color --settings pyproject.toml
11-
black app templates tests --config pyproject.toml
10+
isort app templates/*/_sidebar.py tests --color --settings pyproject.toml
11+
black app templates/*/_sidebar.py tests --config pyproject.toml
1212
elif [ $1 == "install" ]; then
1313
pip install flake8 "black==20.8b1" "isort==5.7.0"
1414
fi

app/codegen.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def render_templates(self, template_name: str, project_name: str, config: dict):
2525
)
2626
for fname in env.list_templates(filter_func=lambda x: not x.startswith("_")):
2727
code = env.get_template(fname).render(**config)
28-
fname = fname.replace(".pyi", ".py").replace(template_name, project_name)
28+
fname = fname.replace(template_name, project_name)
2929
self.rendered_code[fname] = code
3030
yield fname, code
3131

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

templates/gan/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ torch>=1.7.0
33
pytorch-ignite>=0.4.4
44
torchvision>=0.8.0
55
matplotlib>=3.4.1
6-
pandas>=1.2.3
6+
pandas
77
{{ handler_deps }}
88
{{ logger_deps }}

templates/image_classification/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ def dependencies(fname):
3838
),
3939
zip_safe=True,
4040
install_requires=requirements,
41-
)
41+
)
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)