Skip to content

Commit d26597a

Browse files
committed
updated code style
1 parent c3f599c commit d26597a

File tree

9 files changed

+10
-16
lines changed

9 files changed

+10
-16
lines changed

codeGen/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818

1919
urlpatterns = [
2020
path('admin/', admin.site.urls),
21-
path('optimizer/', include(('optimizer.urls','optimizer'), namespace='optimizer')),
21+
path('optimizer/', include(('optimizer.urls', 'optimizer'), namespace='optimizer')),
2222
]

demo.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
print("asd")
21
import subprocess
3-
subprocess.check_output(["./a.out" ,"input.c"])
2+
subprocess.check_output(["./a.out", "input.c"])

images/CI_fail_flake.png

64.1 KB
Loading

images/CI_fail_flake_details.png

98.1 KB
Loading

optimizer/admin.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
from django.contrib import admin
2-
3-
# Register your models here.

optimizer/models.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
from django.db import models
21

3-
# Create your models here.

optimizer/tests.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
from django.test import TestCase
2-
3-
# Create your tests here.

optimizer/views.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
from django.shortcuts import render
2-
from django.http import HttpResponse
32
from django.views.decorators.csrf import csrf_exempt
43
# Create your views here.
54
import subprocess
65

76
app_name = 'optimizer'
87

8+
99
@csrf_exempt
1010
def index(request):
1111
in_code = request.POST.get('in_code')
@@ -15,18 +15,18 @@ def index(request):
1515
data = file.read().replace('\n', '\n')
1616
out_code = data
1717
# print("Here : ",in_code)
18-
return render(request, 'optimizer/index.html',{'in_code':in_code,'out_code':out_code})
18+
return render(request, 'optimizer/index.html', {'in_code': in_code, 'out_code': out_code})
1919
# return render(request, 'optimizer/test.html')
2020
# return HttpResponse("Hello, world. You're at the optimizer")
2121

2222

2323
def writeOutputNormal(in_code):
2424

25-
if in_code != None:
26-
with open("input.c","w") as f:
25+
if in_code is not None:
26+
with open("input.c", "w") as f:
2727
f.write(in_code)
2828

29-
subprocess.check_output(["./a.out" ,"input.c"])
29+
subprocess.check_output(["./a.out", "input.c"])
3030

3131

3232

setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[flake8]
2+
exclude = .git,*migrations*,*venv*
3+
max-line-length = 119

0 commit comments

Comments
 (0)