🚨 Add pre-commit
Format code Add bin/run
This commit is contained in:
1 parent
9d3afadbff
commit
dcd8edaaa6
28 files changed
+264
-51
No files matched your search
@@ -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)
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user