Skip to content

Commit 8c36486

Browse files
Merge pull request geekcomputers#1430 from cclauss/patch-1
Let's get our GitHub Actions to be green again
2 parents aa0e9b0 + bd78ce0 commit 8c36486

File tree

3 files changed

+37
-47
lines changed

3 files changed

+37
-47
lines changed

.github/workflows/lint_python.yml

+1-13
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,13 @@
11
name: lint_python
2-
on:
3-
pull_request:
4-
push:
5-
# branches: [master]
2+
on: [push, pull_request]
63
jobs:
74
lint_python:
85
runs-on: ubuntu-latest
9-
# strategy:
10-
# matrix:
11-
# os: [ubuntu-latest, macos-latest, windows-latest]
12-
# python-version: [2.7, 3.5, 3.6, 3.7, 3.8] # , pypy3]
136
steps:
147
- uses: actions/checkout@master
158
- uses: actions/setup-python@master
169
- run: pip install black codespell flake8 isort pytest
1710
- run: black --check . || true
18-
# - run: black --diff . || true
19-
# - if: matrix.python-version >= 3.6
20-
# run: |
21-
# pip install black
22-
# black --check .
2311
- run: codespell --quiet-level=2 || true # --ignore-words-list="" --skip=""
2412
- run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
2513
- run: isort --recursive . || true

Binary_search.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# It returns location of x in given array arr
22
# if present, else returns -1
3-
def binarySearch(arr, l, r, x):
3+
def binary_search(arr, l, r, x):
44
if l <= r:
55

66
mid = (l+r) // 2 #extracting the middle element from the array
@@ -31,7 +31,7 @@ def binarySearch(arr, l, r, x):
3131
x = eval(input("Enter the element you want to search in given array"))
3232

3333
# Function call
34-
result = binarySearch(arr, 0, len(arr) - 1, x)
34+
result = binary_search(arr, 0, len(arr) - 1, x)
3535

3636
#printing the output
3737
if result != -1:

Test-Case-Generator/test_case.py

+34-32
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,6 @@
1010
import os
1111

1212
mycolor = '#262626'
13-
gui = Tk()
14-
gui.title('TEST CASE GENERATOR')
15-
gui.configure(bg=mycolor)
16-
17-
if os.environ.get('DISPLAY', '') == '':
18-
print('no display found, using:0,0')
19-
os.environ.__setitem__('DISPLAY', ':0.0')
20-
else:
21-
print('found display')
2213

2314

2415
class Case:
@@ -713,26 +704,37 @@ def generate(self): # Type 10
713704
self.output.insert(END, '\n')
714705

715706

716-
t = IntVar()
717-
n_min = IntVar()
718-
n_max = IntVar()
719-
m_min = IntVar()
720-
m_max = IntVar()
721-
k_min = IntVar()
722-
k_max = IntVar()
723-
a_min = IntVar()
724-
a_max = IntVar()
725-
b_min = IntVar()
726-
b_max = IntVar()
727-
char_lis = StringVar()
728-
729-
Case.home(self=Case)
730-
731-
gui.mainloop()
732-
gui.mainloop()
733-
734-
# ------------------------------------------------- ###
735-
# ------------------------------------------------- ###
736-
# ### Developed by TANMAY KHANDELWAL (aka Dude901). ###
737-
# _________________________________________________ ###
738-
# _________________________________________________ ###
707+
if __name__ == '__main__':
708+
gui = Tk()
709+
gui.title('TEST CASE GENERATOR')
710+
gui.configure(bg=mycolor)
711+
712+
if os.environ.get('DISPLAY', '') == '':
713+
print('no display found, using:0,0')
714+
os.environ.__setitem__('DISPLAY', ':0.0')
715+
else:
716+
print('found display')
717+
718+
t = IntVar()
719+
n_min = IntVar()
720+
n_max = IntVar()
721+
m_min = IntVar()
722+
m_max = IntVar()
723+
k_min = IntVar()
724+
k_max = IntVar()
725+
a_min = IntVar()
726+
a_max = IntVar()
727+
b_min = IntVar()
728+
b_max = IntVar()
729+
char_lis = StringVar()
730+
731+
Case.home(self=Case)
732+
733+
gui.mainloop()
734+
gui.mainloop()
735+
736+
# ------------------------------------------------- ###
737+
# ------------------------------------------------- ###
738+
# ### Developed by TANMAY KHANDELWAL (aka Dude901). ###
739+
# _________________________________________________ ###
740+
# _________________________________________________ ###

0 commit comments

Comments
 (0)