Skip to content

Commit

Permalink
Better comments for raw format (#494)
Browse files Browse the repository at this point in the history
* Update raw.py

Improve comments

* Update raw.py

Reduce line length to within limit

* Update raw.py

Ensure the first line ends with a period (flake8)

* Update raw.py

remove white space for indent on otherwise empty line
  • Loading branch information
deed02392 authored Feb 27, 2024
1 parent d875ccf commit 0396949
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions cgt_calc/parsers/raw.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Charles Schwab parser."""
"""Raw transaction parser."""

from __future__ import annotations

Expand All @@ -22,10 +22,16 @@ def action_from_str(label: str) -> ActionType:

class RawTransaction(BrokerTransaction):
"""
Represent single raw transaction.
Represents a single raw transaction.
Expected format is:
date (YYYY-MM-DD);action;symbol?;quantity;price;fees;currency
Example format:
2023-02-09,DIVIDEND,OPRA,4200,0.80,0.0,USD
2022-11-14,SELL,META,19,116.00,0.05,USD
2022-08-15,BUY,META,105,180.50,0.00,USD
2022-07-26,DIVIDEND,OTGLY,305,0.031737,0.0,USD
2022-06-06,STOCK_SPLIT,AMZN,209,0.00,0.00,USD
See tests/test_data/raw/test_data.csv for a sample file showing the expected format.
"""

def __init__(
Expand Down

0 comments on commit 0396949

Please sign in to comment.