feat: Add ruff check
This commit is contained in:
11
.gitea/workflows/check.yml
Normal file
11
.gitea/workflows/check.yml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
name: Check Code Quality
|
||||||
|
run-name: Ruff CI
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
RuffCheck:
|
||||||
|
runs-on: [ubuntu-latest, amd]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: astral-sh/ruff-action@v3
|
||||||
@@ -243,8 +243,7 @@ def index():
|
|||||||
try:
|
try:
|
||||||
git = requests.get(
|
git = requests.get(
|
||||||
"https://git.woodburn.au/api/v1/users/nathanwoodburn/activities/feeds?only-performed-by=true&limit=1",
|
"https://git.woodburn.au/api/v1/users/nathanwoodburn/activities/feeds?only-performed-by=true&limit=1",
|
||||||
headers={"Authorization": os.getenv("GIT_AUTH") if os.getenv(
|
headers={"Authorization": os.getenv("GIT_AUTH")},
|
||||||
"GIT_AUTH") else os.getenv("git_token")},
|
|
||||||
)
|
)
|
||||||
git = git.json()
|
git = git.json()
|
||||||
git = git[0]
|
git = git[0]
|
||||||
@@ -681,8 +680,6 @@ def tools():
|
|||||||
# region Error Catching
|
# region Error Catching
|
||||||
|
|
||||||
# Catch all for GET requests
|
# Catch all for GET requests
|
||||||
|
|
||||||
|
|
||||||
@app.route("/<path:path>")
|
@app.route("/<path:path>")
|
||||||
def catch_all(path: str):
|
def catch_all(path: str):
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user