-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add InvestStatmentLine as possible return from parse_record to fix typing check errors. #263
Open
jaik03
wants to merge
41
commits into
kedder:master
Choose a base branch
from
jaik03:AddInvestStatementLineType
base: master
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.
+407
−211
Open
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
d75b085
Add InvestStatmentLine as possible reutrn to fix typing check errors.
jaik03 498485b
Return pkg_resources namespaces back
kedder f7af059
Merge pull request #264 from kedder/pkg-resources-ns
kedder 1e2abea
Bump pytest from 7.4.4 to 8.0.0
dependabot[bot] 214bb9c
Use union instead of pipe for older python versions
jaik03 d506798
Ignore type checking due to ambiguous declaration
jaik03 8dc6085
Fix formatting via black
jaik03 0942bbd
Merge pull request #266 from kedder/dependabot/pip/pytest-8.0.0
kedder c581777
Bump pytest from 8.0.0 to 8.0.1
dependabot[bot] f8b4275
Merge pull request #269 from kedder/dependabot/pip/pytest-8.0.1
kedder ac317a7
Switch metadata to pyproject.toml
kedder a852d23
Install type hints for appdirs
kedder 777f662
Reformat with newer black
kedder 338a9f6
Drop support for 3.8, add 3.12
kedder 280bc40
Install zipp for older pythons
kedder 54db7c4
Merge pull request #270 from kedder/pyproject
kedder 8f8008d
Don't add a blank security to the list
edwagner 1944606
Decrease precision of total to 2 decimal places
edwagner 05e2699
Add cap gain income types
edwagner 86560e7
Bump zipp from 3.8 to 3.17.0
dependabot[bot] cfd9002
Bump pytest from 8.0.1 to 8.0.2
dependabot[bot] 78cba7e
Handle INVBANKTRAN
edwagner 8c1112c
Handle TRANSFER type
edwagner 15f8c23
Merge pull request #273 from edwagner/invest-statement-enhancements
kedder c659d45
Fix plugin loading
edwagner 273ca39
Merge pull request #274 from edwagner/fix-plugin-loading
kedder f7e5b1f
Bump mypy from 1.8.0 to 1.9.0
dependabot[bot] fd8f502
Bump black from 24.2.0 to 24.3.0
dependabot[bot] 5de9b51
Bump zipp from 3.17.0 to 3.18.1
dependabot[bot] f0dd25c
Bump pytest from 8.0.2 to 8.1.1
dependabot[bot] 4e4e716
Bump types-mock from 5.1.0.20240106 to 5.1.0.20240311
dependabot[bot] 44a0c18
break out parse_invest_record that returns an InvestStatementLine object
jaik03 6d93bcf
Add InvestStatmentLine as possible reutrn to fix typing check errors.
jaik03 0be6f56
Use union instead of pipe for older python versions
jaik03 651fce2
Ignore type checking due to ambiguous declaration
jaik03 0bdfa59
Fix formatting via black
jaik03 831f6e9
break out parse_invest_record that returns an InvestStatementLine object
jaik03 cb9f7d9
Merge branch 'AddInvestStatementLineType' of ssh://kvmhost.home.arpa/…
jaik03 6a6cf3d
fix this back to original structure
jaik03 3b6e19c
add parse_invest_record line
jaik03 9688f8f
black run
jaik03 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
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.
Hm, I somehow missed the moment when this
InvestStatementLine
was introduced (found it now in #129), but I'm not a big fan of these ambiguous return type.What typing check errors are you trying to address with this?
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.
error: Return type "InvestStatementLine | None" of "parse_record" incompatible with return type "StatementLine | None" in supertype "StatementParser" [override]
I'm building a plugin to parse a JSON file filled with investment information, and mypy is throwing an override error due to the fact that my declaration says I'm returning an InvestStatementLine.
I neglected to notice that the
|
syntax was introduced in 3.10, and I think I used it incorrectly anyways. I can fix the PR, but do you want to approach this a different way? I can always have it ignore that specific type check in my parser code, but I thought it was better to address