Skip to content

Commit fbc60a2

Browse files
authored
Merge pull request #749 from arkid15r/correct-sort-dict-method-name
Fix a typo in sort dictionary method name
2 parents 9a58504 + 40f7b92 commit fbc60a2

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

core/load_modules.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def load_all_modules(limit=-1, full_details=False):
236236
"""
237237
# Search for Modules
238238
from config import nettacker_paths
239-
from core.utility import sort_dictonary
239+
from core.utility import sort_dictionary
240240
if full_details:
241241
import yaml
242242
module_names = {}
@@ -260,7 +260,7 @@ def load_all_modules(limit=-1, full_details=False):
260260
if len(module_names) == limit:
261261
module_names['...'] = {}
262262
break
263-
module_names = sort_dictonary(module_names)
263+
module_names = sort_dictionary(module_names)
264264
module_names['all'] = {}
265265

266266
return module_names
@@ -273,7 +273,7 @@ def load_all_profiles(limit=-1):
273273
Returns:
274274
an array of all profile names
275275
"""
276-
from core.utility import sort_dictonary
276+
from core.utility import sort_dictionary
277277
all_modules_with_details = load_all_modules(limit=limit, full_details=True)
278278
profiles = {}
279279
if '...' in all_modules_with_details:
@@ -287,11 +287,11 @@ def load_all_profiles(limit=-1):
287287
else:
288288
profiles[tag].append(key)
289289
if len(profiles) == limit:
290-
profiles = sort_dictonary(profiles)
290+
profiles = sort_dictionary(profiles)
291291
profiles['...'] = []
292292
profiles['all'] = []
293293
return profiles
294-
profiles = sort_dictonary(profiles)
294+
profiles = sort_dictionary(profiles)
295295
profiles['all'] = []
296296
return profiles
297297

core/utility.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ def expand_step(step):
563563
return [step]
564564

565565

566-
def sort_dictonary(dictionary):
566+
def sort_dictionary(dictionary):
567567
etc_flag = '...' in dictionary
568568
if etc_flag:
569569
del dictionary['...']

tests/core/utility.test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ class UtilityTesting(unittest.TestCase):
1515
This is the class that tests the utility module functions.
1616
"""
1717

18-
def test_sort_dictonary(self):
19-
"""Tests if the function sorts the input dictionary."""
18+
def test_sort_dictionary(self):
19+
"""Tests if the function sorts the input dictionary."""
2020
input_dict = {
2121
'a': 1,
2222
'c': 3,
@@ -29,7 +29,7 @@ def test_sort_dictonary(self):
2929
'c': 3,
3030
'd': 23,
3131
}
32-
self.assertDictEqual(utility.sort_dictonary(input_dict), sorted_dict)
32+
self.assertDictEqual(utility.sort_dictionary(input_dict), sorted_dict)
3333

3434
def test_select_maximum_cpu_core(self):
3535
"""Tests if it selects the proper amount of cpu's"""

0 commit comments

Comments
 (0)