-
Notifications
You must be signed in to change notification settings - Fork 499
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
Move installed modules code to utils #2429
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
df24e1a
Move installed modules code to utils
sentrivana 1c45a0b
Merge branch 'master' into ivana/package-version-helper
sentrivana 971ec26
add strawberry
sentrivana 95c2fa9
Merge branch 'master' into ivana/package-version-helper
antonpirker 539b6bd
Merge branch 'master' into ivana/package-version-helper
sentrivana 26f20ba
Merge branch 'master' into ivana/package-version-helper
sentrivana d9c0e8f
Merge branch 'master' into ivana/package-version-helper
sentrivana b6c7a51
Merge branch 'master' into ivana/package-version-helper
sentrivana 96bd4d8
add a test
sentrivana d50568b
Merge branch 'master' into ivana/package-version-helper
sentrivana d24bbd2
compat
sentrivana 5362ade
Merge branch 'master' into ivana/package-version-helper
sentrivana b10344c
Merge branch 'master' into ivana/package-version-helper
sentrivana e76aa5d
Merge branch 'master' into ivana/package-version-helper
sentrivana f016218
Merge branch 'master' into ivana/package-version-helper
sentrivana 0032f64
Merge branch 'master' into ivana/package-version-helper
sentrivana bf2e65a
Merge branch 'master' into ivana/package-version-helper
sentrivana 85169b2
Merge branch 'master' into ivana/package-version-helper
sentrivana 6782fd3
Merge branch 'master' into ivana/package-version-helper
sentrivana c9b6de5
Merge branch 'master' into ivana/package-version-helper
antonpirker 4ca4e0d
Merge branch 'master' into ivana/package-version-helper
antonpirker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Would it perhaps be a good idea to place this code, along with the
_installed_modules
into a static class, so we can avoid having a global variable? I guess the static class would still effectively be storing a global state, so perhaps it makes only a small difference hereThere 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.
We could wrap this in a static class but then it'd be a bit inconsistent to have some installed modules related code in the class (the
_get_installed_modules
function above + the_installed_modules
var) and some of it outside (e.g. thepackage_version
helper). We could put everything in the class, but it's not great API to have to then import the class to use a small utility function. Also, you technically are introducing a global variable in any case, it's just about whether turning the whole thing into a class brings any additional benefits. I'd prefer to keep this as is if that's ok with you.