Skip to content

Commit e710ac0

Browse files
authored
refactor: Add docstrings and more comments and make minor edits to improve code readability (#27)
This PR adds documentation of all functions to explain their purposes and what arguments are being passed around. It also adds more inline comments to explain various different scenarios that might arise, particularly around empty keys or various non-matching cases. Finally, it includes some minor changes to the code that improve readability and remove unnecessary operations. BREAKING CHANGE: This PR changes the names of a few functions and removes one unused one. This tag is also being used to demarcate our intention to make our first major release when this PR is merged.
1 parent 4b64af4 commit e710ac0

File tree

5 files changed

+264
-121
lines changed

5 files changed

+264
-121
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@ __pycache__
22
.pytest_cache
33
*.egg-info
44
dist
5+
build
56
tests/**/actual
67
.vscode
8+
*.swp

src/rapids_dependency_file_generator/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ def generate_matrix(matrix_arg):
5252
return {}
5353
matrix = {}
5454
for matrix_column in matrix_arg.split(";"):
55-
kv_pair = matrix_column.split("=")
56-
matrix[kv_pair[0]] = [kv_pair[1]]
55+
key, val = matrix_column.split("=")
56+
matrix[key] = [val]
5757
return matrix
5858

5959

0 commit comments

Comments
 (0)