-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: organization functions to perform get projects
- Loading branch information
lpmatos
committed
Jul 28, 2020
1 parent
11eeca0
commit 405affb
Showing
7 changed files
with
124 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
VERSION = (1, 0, 18) | ||
VERSION = (1, 0, 33) | ||
|
||
__version__ = ".".join(map(str, VERSION)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,3 @@ | |
|
||
if __name__ == "__main__": | ||
main() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from collections import defaultdict | ||
from typing import Type, List, DefaultDict, Text, NoReturn, Optional | ||
|
||
class Tree: | ||
|
||
def make_tree(self, information: Type[List[Text]]) -> DefaultDict: | ||
tree = lambda: defaultdict(tree) | ||
dictionary = tree() | ||
for x in information: | ||
curr = dictionary | ||
for item in x: | ||
curr = curr[item] | ||
return dictionary | ||
|
||
def make_strs(self, | ||
dictionary: DefaultDict, | ||
indent: Optional[Type[int]] = 0 | ||
) -> List: | ||
strs = [] | ||
for k, v in dictionary.items(): | ||
strs.append(" " * indent + str(k)) | ||
strs.extend(self.make_strs(v, indent+1)) | ||
return strs | ||
|
||
def print_tree(self, dictionary: DefaultDict) -> NoReturn: | ||
print("\n".join(self.make_strs(dictionary))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
art==4.7 | ||
tqdm==4.43.0 | ||
GitPython==3.1.7 | ||
python-gitlab==2.4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters