Skip to content

Commit

Permalink
add flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
sgmdlt committed Aug 14, 2024
1 parent 2b1242c commit 2db2292
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 2 deletions.
14 changes: 13 additions & 1 deletion example.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from flask import Flask
from flask import Flask, render_template

app = Flask(__name__)

Expand All @@ -21,3 +21,15 @@ def users():
@app.route('/courses/<id>')
def courses(id):
return f'Course id: {id}'


@app.route('/users/<id>')
def users(id):
user = {
"id": id,
"name": f"user-{id}"
}
return render_template(
'users/show.html',
user=user,
)
51 changes: 50 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ python = "^3.10"
Flask = "^3.0.3"
gunicorn = "^23.0.0"

[tool.poetry.group.dev.dependencies]
flake8 = "^7.1.1"

[build-system]
requires = ["poetry-core"]
Expand Down
4 changes: 4 additions & 0 deletions templates/users/show.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<h1>
id = {{ user.id }}
nickname = {{ user.name }}
</h1>

0 comments on commit 2db2292

Please sign in to comment.