🚨 Add pre-commit

Format code
Add bin/run
This commit is contained in:
Nikolai R Kristiansen committed 2022-01-16 22:49:21 +01:00
1 parent 9d3afadbff
commit dcd8edaaa6
28 files changed
+264 -51

No files matched your search

+3 -3
View File
@@ -11,13 +11,13 @@ class Command(BaseCommand):
help = " Write graphql schema to file or stdout"
def add_arguments(self, parser: CommandParser):
parser.add_argument("--filename", default='schema.graphql', help='`-` prints to stdout')
parser.add_argument("--filename", default="schema.graphql", help="`-` prints to stdout")
def handle(self, *args, filename=None, **options):
schema_output = print_schema(schema_symbol)
if filename != '-':
if filename != "-":
with Path(BASE_DIR, filename).open("w+") as fp:
fp.write(schema_output)
self.stdout.write(self.style.SUCCESS('OK'))
self.stdout.write(self.style.SUCCESS("OK"))
else:
print(schema_output)
+3 -3
View File
@@ -1,8 +1,8 @@
from django.contrib.auth.models import User
import difflib
from django.core.management.base import BaseCommand, CommandError
import facebook
from django.contrib.auth.models import User
from django.core.management.base import BaseCommand, CommandError
from main.models import UserProfile