-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Re)adds moreByDeveloper-, similarApps- and dataSafety-field to app() and updates tests #134
base: master
Are you sure you want to change the base?
Conversation
Issue solved
|
'description': ElementSpec(None, [i, 2, 1]).extract_content(container) | ||
} for i in range(0, len(container)) | ||
]) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JoMingyu i don't like this double nested lamda function at all, especially since it is identical for data_collected and data_shared. do you have an idea? i was thinking of just defining the elementspecs for a single entry here and replacing the outer lamda function with a classic loop in data_safety.py, similar to what we do for the reviews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the very slow reply. I didn't turn on notifications for mention, and the PR was Draft, so I left it alone. First, if you are interested in becoming a maintainer, please email me. The PRs you've contributed so far have been very effective, so I'm ready to welcome.
Back to the point, I'm not satisfied with the double nested structure. At the time of developing the initial version, it seems that the field of view was not wide. It's okay to write a PR as you said. I am open to large-scale changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kluhan mention for notification
lambda entrys: [ | ||
{ | ||
"name": ElementSpec(None, [0]).extract_content(entrys[j]), | ||
"optional": ElementSpec(None, [1]).extract_content( | ||
entrys[j] | ||
), | ||
"usage": ElementSpec(None, [2], None, None).extract_content( | ||
entrys[j] | ||
), | ||
} | ||
for j in range(0, len(entrys)) | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block can be replaced to classic function. As you said, dataCollected
and dataShared
structure is simillar. It will resolve nesting of lambdas.
I like these element specification with one-line code. But complexity of data structure increases, we can change declaring extractor functions to classic function(using def
).
There are a lot of diffs, It's better to split the PRs. |
Issue solved
Problem partially solved