Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ Gagandeep Singh<[email protected]>
Kartikei Mittal<[email protected]>
Umesh<[email protected]>
Rohan Singh<[email protected]>
Tarun Singh Tomar <[email protected]>
Tarun Singh Tomar<[email protected]>
Saptashrungi Birajdar<[email protected]>
2 changes: 1 addition & 1 deletion pydatastructs/miscellaneous_data_structures/stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Stack(object):
By default, 'array'
Currently only supports 'array'
implementation.
items : DynamicOneDimensionalArray
items : list/tuple
Optional, by default, None
The inital items in the stack.
For array implementation.
Expand Down
17 changes: 14 additions & 3 deletions pydatastructs/utils/tests/test_code_quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ def _list_files():
py_files.append(os.path.join(dirpath, _file))
return py_files

py_files = _list_files()

def test_trailing_white_spaces():
py_files = _list_files()
for file_path in py_files:
file = open(file_path, "r")
line = file.readline()
Expand All @@ -26,7 +27,6 @@ def test_trailing_white_spaces():
file.close()

def test_final_new_lines():
py_files = _list_files()
for file_path in py_files:
file = open(file_path, "r")
lines = []
Expand All @@ -42,7 +42,6 @@ def test_final_new_lines():
file.close()

def test_comparison_True_False_None():
py_files = _list_files()
for file_path in py_files:
if file_path.find("test_code_quality.py") == -1:
file = open(file_path, "r")
Expand All @@ -59,3 +58,15 @@ def test_comparison_True_False_None():
%(file_path, line)
line = file.readline()
file.close()

def test_presence_of_tabs():
for file_path in py_files:
file = open(file_path, "r")
line = file.readline()
while line != "":
line = file.readline()
if (line.find('\t') != -1):
assert False, "Tab present at %s in %s. " \
"Configure your editor to use " \
"white spaces."
file.close()