mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 12:40:35 +00:00
Edit portfolio value for add as well as a spelling error (#1614)
This commit is contained in:
6
.pre-commit-config.yaml
vendored
6
.pre-commit-config.yaml
vendored
@@ -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]
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user