forked from 2i2c-org/frx-challenges
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
390 additions
and
253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[flake8] | ||
# Ignore style and complexity | ||
# E: style errors | ||
# W: style warnings | ||
# C: complexity | ||
# F841: local variable assigned but never used | ||
ignore = E, C, W, F841 | ||
builtins = c, get_config | ||
exclude = | ||
.cache, | ||
.github, | ||
docs, | ||
__init__.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# pre-commit is a tool to perform a predefined set of tasks manually and/or | ||
# automatically before git commits are made. | ||
# | ||
# Config reference: https://pre-commit.com/#pre-commit-configyaml---top-level | ||
# | ||
# Common tasks | ||
# | ||
# - Run on all files: pre-commit run --all-files | ||
# - Register git hooks: pre-commit install --install-hooks | ||
# | ||
repos: | ||
# Autoformat: Python code, syntax patterns are modernized | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.15.2 | ||
hooks: | ||
- id: pyupgrade | ||
args: | ||
- --py37-plus | ||
|
||
# Autoformat: Python code | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
|
||
# Autoformat: Python code | ||
- repo: https://github.com/psf/black | ||
rev: 24.4.2 | ||
hooks: | ||
- id: black | ||
|
||
# Autoformat: markdown, yaml | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v4.0.0-alpha.8 | ||
hooks: | ||
- id: prettier | ||
# Don't run prettier on our jinja2 template files. We run djlint instead | ||
exclude: "kubespawner/templates/.*\\.html" | ||
|
||
# Misc... | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
# ref: https://github.com/pre-commit/pre-commit-hooks#hooks-available | ||
hooks: | ||
# Autoformat: Makes sure files end in a newline and only a newline. | ||
- id: end-of-file-fixer | ||
|
||
# Autoformat: Sorts entries in requirements.txt. | ||
- id: requirements-txt-fixer | ||
|
||
# Lint: Check for files with names that would conflict on a | ||
# case-insensitive filesystem like MacOS HFS+ or Windows FAT. | ||
- id: check-case-conflict | ||
|
||
# Lint: Checks that non-binary executables have a proper shebang. | ||
- id: check-executables-have-shebangs | ||
|
||
# Lint: Python code | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: "7.0.0" | ||
hooks: | ||
- id: flake8 | ||
|
||
# Lint our jinja2 templates | ||
- repo: https://github.com/Riverside-Healthcare/djLint | ||
rev: v1.34.1 | ||
hooks: | ||
- id: djlint-jinja | ||
files: "kubespawner/templates/.*\\.html" | ||
types_or: | ||
- html | ||
args: | ||
- --reformat | ||
|
||
# pre-commit.ci config reference: https://pre-commit.ci/#configuration | ||
ci: | ||
autoupdate_schedule: monthly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
# unnamed-competitive-tester | ||
# unnamed-competitive-tester |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
from django.contrib import admin | ||
from django.urls import path, include | ||
|
||
from django.urls import include, path | ||
|
||
urlpatterns = [ | ||
path("", include("web.urls")), | ||
path("admin/", admin.site.urls), | ||
path('accounts/', include('allauth.urls')), | ||
path("accounts/", include("allauth.urls")), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
from django.contrib import admin | ||
from .models import Submission, Evaluation | ||
from allauth.account.decorators import secure_admin_login | ||
from django.contrib import admin | ||
|
||
from .models import Evaluation, Submission | ||
|
||
admin.site.register([Submission, Evaluation]) | ||
|
||
admin.site.login = secure_admin_login(admin.site.login) | ||
admin.site.login = secure_admin_login(admin.site.login) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.