-
Notifications
You must be signed in to change notification settings - Fork 2
Improvement/sdev 5193 mypy type fixes #81
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
Open
dustinbleile
wants to merge
28
commits into
develop
Choose a base branch
from
improvement/SDEV-5193_mypy_type_fixes
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
d3062b7
SDEV-5193 - lint - match.py - eliminate mypy type errors.
dustinbleile 592d28f
SDEV-5193 - lint - inputs.py - remove mypy errors - IprCopyVariant ha…
dustinbleile 24dec89
SDEV-5193 - lint - test_inputs.py - mypy type fixes - use Sequence in…
dustinbleile e6655ec
SDEV-5193 - lint - ipr.py - excluded variable - type consistency
dustinbleile 5cdc11a
SDEV-5193 - lint - annotate.py - annotate_signature_variants - return…
dustinbleile f0f68fa
SDEV-5193 - lint - annotate_positional_variants - ignore type error f…
dustinbleile cd67aa8
SDEV-5193 - lint - mypy - annoate.py - resolve KbMatch types vs Hasha…
dustinbleile 1639e83
SDEV-5193 - lint - mypy - ipr.py - use Cast to reduce type errors
dustinbleile 0ee36c7
SDEV-5193 - refactor typing - fixes for mypy typing checks
dustinbleile 91eb350
Merge branch 'develop' of https://github.com/bcgsc/pori_python into i…
dustinbleile 1a9f614
Merge branch 'develop' of https://github.com/bcgsc/pori_python into i…
dustinbleile 4261381
Merge branch 'improvement/SDEV-5193_mypy_type_fixes' of https://githu…
dustinbleile b209e23
DEVSU-2797 - main.ipr_report - allow null ipr_url if ipr_upload = False
dustinbleile e95203c
DEVSU-2797 - lint isort - unsorted imports
dustinbleile 0f7b2d7
DEVSU-2797 - improve error message logging when graphkb_conn is made …
dustinbleile ecb9060
bugfix - ipr_report - upload_json immediately returns
dustinbleile b572f2b
DEVSU-2797 - check os.environ for IPR_URL and GRAPHKB_URL
dustinbleile 9cd51c3
lint - fix fstring
dustinbleile b051b27
Merge branch 'develop' of https://github.com/bcgsc/pori_python into f…
dustinbleile e05ec5b
minor type fix - null string instead of None
dustinbleile 57f97f9
minor lint - isort inputs & quotes
dustinbleile a48b090
test_genes - remove unused import PREFERRED_GENE_SOURCE_NAME
dustinbleile 87cd9ff
raise errors if no graphkb url has been set
dustinbleile 686511d
Error message when no IPR_URL defined
dustinbleile abcc23e
Merge branch 'feat/DEVSU-2797-remove-gsc-defaults_dustin' of https://…
dustinbleile 2c39230
IPR_URL - typing fix - only string
dustinbleile 3682a6d
lint - inputs.py - fix typing warnings
dustinbleile 9255bf0
SDEV-5193 - type fix - KbMatchSections['KbMatchedVariants'] -> KbMatc…
dustinbleile 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
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.
Why these need to be hashable? We're loosing all the structure of KbMatch.
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.
Hashabledict is used for dropping duplicates from a list (convert to set).
The function seems to be used in exactly one place and immediately converted to a hashable type.
Ideally, I would have liked to just make KbMatch a hashable dict type, but I couldn't figure that out here. If someone can figure that out, I think that is the appropriate solution.
I was just trying to something that gave the appropriate mypy warnings and didn't create errors from any of the KbMatch duplicates.
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.
I think probably best to preserve KbMatch structure; will take a crack at making kbmatch a hashable dict type.
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.
Hi @elewis2, are you having any luck with this?
I think we will want to start with these changes regardless and add extra typing details as we can.
It's more important that the parts where structure is given is accurate than the fact that it is lost at some point. At least this way the mypy warnings are accurate.
The other way to keep the KbMatch structure would be to refactor to eliminate the Hashabledict all together. If I understand it was only used to drop duplicates. I think you could eliminate the Hashabledict by creating functions that can take lists of kbMatches and drop duplicates.