Edit portfolio value for add as well as a spelling error (#1614)

This commit is contained in:
jmaslek
2022-04-02 12:19:47 -04:00
committed by GitHub
parent 0f7154b584
commit ffbce37aeb
2 changed files with 5 additions and 4 deletions

View File

@@ -19,7 +19,7 @@ repos:
- id: check-merge-conflict
- id: detect-private-key
- repo: https://github.com/psf/black
rev: 22.1.0
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
@@ -39,7 +39,7 @@ repos:
"--skip=./tests,.git,*.css,*.csv,*.html,*.ini,*.ipynb,*.js,*.json,*.lock,*.scss,*.txt,*.yaml,build/pyinstaller/*",
]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v0.940"
rev: "v0.942"
hooks:
- id: mypy
args: ["--ignore-missing-imports", '--exclude=/setup\.py$']
@@ -63,7 +63,7 @@ repos:
args: [ '--baseline', '.secrets.baseline', '--exclude-files', 'cassettes/*' ]
exclude: package.lock.json
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.0
rev: v2.31.1
hooks:
- id: pyupgrade
args: [--py36-plus]

View File

@@ -311,9 +311,10 @@ Loaded:[/info] {self.portfolio_name or None}
pd.DataFrame.from_dict(inputs, orient="index").T
)
console.print(
f"Portfolio successfully initiialized with {inputs['Name']}.\n"
f"Portfolio successfully initialized with {inputs['Name']}.\n"
)
return
inputs["Value"] = float(inputs["Price"] * inputs["Quantity"]) # type: ignore
self.portfolio.add_trade(inputs)
console.print(f"{inputs['Name']} successfully added\n")