Skip to content
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

Improves the settings/userdata command, and upgrade ruff #5359

Merged
merged 22 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def validate(
) -> None:
"""Validate tickers."""
valids = []
with urllib.request.urlopen(url) as file:
with urllib.request.urlopen(url) as file: # noqa: S310
for line in file:
new_item = line.decode("utf-8").replace("\n", "").strip()
valids.append(new_item)
Expand Down
4 changes: 1 addition & 3 deletions openbb_terminal/core/models/preferences_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
from pydantic import NonNegativeInt, PositiveFloat, PositiveInt
from pydantic.dataclasses import dataclass

from openbb_terminal.core.config.paths import (
HOME_DIRECTORY,
)
from openbb_terminal.core.config.paths import HOME_DIRECTORY
from openbb_terminal.core.models import BaseModel

# pylint: disable=too-many-instance-attributes, disable=no-member, useless-parent-delegation
Expand Down
6 changes: 4 additions & 2 deletions openbb_terminal/core/plots/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,12 @@ async def process_image(self, export_image: Path):

if get_current_user().preferences.PLOT_OPEN_EXPORT:
if sys.platform == "win32":
os.startfile(export_image) # nosec: B606
os.startfile(export_image) # noqa: S606 # nosec: B606
else:
opener = "open" if sys.platform == "darwin" else "xdg-open"
subprocess.check_call([opener, export_image]) # nosec: B603
subprocess.check_call(
[opener, export_image]
) # nosec: B603 # noqa: S603

def send_table(
self,
Expand Down
Loading
Loading