-
Notifications
You must be signed in to change notification settings - Fork 13
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
✨ Enable Ruff security rules (bandit) #1686
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
fd9fd12
:sparkles: Fix passing organism
Zethson f5d44c4
:sparkles: Fix passing organism
Zethson 87ec3f5
:art: Fix a few bandit issues
Zethson 81809c8
:art: Remove codeql
Zethson cbc4d78
Merge branch 'feature/bandit' of https://github.com/laminlabs/lamindb…
Zethson e3a3025
Merge branch 'main' of https://github.com/laminlabs/lamindb into feat…
Zethson 92cdcf3
:art: Submodules
Zethson 7f9e650
:art: Submodules
Zethson 2484ea8
:art: Fix remaining bandit issues
Zethson c491d7f
:art: Tests
Zethson ef105c1
:art: Refactoring
Zethson fe1b400
:art: Refactoring
Zethson 1b7f599
Merge branch 'main' into feature/bandit
falexwolf c92a6ab
:sparkles: PR review
Zethson 90dac0e
Merge branch 'feature/bandit' of https://github.com/laminlabs/lamindb…
Zethson 15f8030
:art: Refactoring
Zethson 2b9d13e
:art: Submodules
Zethson a8dd61c
:art: Test
Zethson d7b05aa
:art: Tests#
Zethson c587d4e
:art: Install tiledbsoma for docs
Zethson 4d8e31a
:art: Remove tiledbsoma again from docs
Zethson 105a38b
Merge branch 'main' into feature/bandit
Zethson ee1d323
Merge branch 'main' into feature/bandit
Zethson 92551c6
Merge branch 'main' into feature/bandit
Zethson 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -209,8 +209,10 @@ | |
try: | ||
ds = CSRDataset(elem) | ||
result = _subset_sparse(ds, indices) | ||
except Exception: | ||
pass | ||
except Exception as e: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this the only way this can be done, @Koncopd? |
||
logger.debug( | ||
Zethson marked this conversation as resolved.
Show resolved
Hide resolved
|
||
f"Encountered an exception while attempting to subset a sparse dataset by indices.\n{e}" | ||
) | ||
if result is None: | ||
raise ValueError( | ||
"Can not get a subset of the element of type" | ||
|
@@ -307,8 +309,10 @@ | |
try: | ||
ds = CSRDataset(elem) | ||
return _subset_sparse(ds, indices) | ||
except Exception: | ||
pass | ||
except Exception as e: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, @Koncopd. |
||
logger.debug( | ||
f"Encountered an exception while attempting to subset a sparse dataset by indices.\n{e}" | ||
) | ||
raise ValueError( | ||
"Can not get a subset of the element of type" | ||
f" {type(elem).__name__} with an empty spec." | ||
|
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.
@sunnyosun - why do we need this? This seems like it should error.