Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
leocov-dev committed Jul 30, 2024
1 parent 31cf5ed commit 73ae070
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pyside_app_core/ui/widgets/file_picker.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
from pathlib import Path
from typing import cast
from typing import Any, cast

from PySide6.QtCore import Signal, SignalInstance
from PySide6.QtWidgets import QFileDialog, QHBoxLayout, QLabel, QLineEdit, QPushButton, QWidget
Expand Down Expand Up @@ -63,7 +63,7 @@ def set_file_path(self, file_path: Path | str | None) -> None:

if self._truncate_path > 0 and self._file_path is not None:
parts = self._file_path.parts
shortened = parts[-min(len(parts), self._truncate_path):]
shortened = parts[-min(len(parts), self._truncate_path) :]
if len(shortened) < len(parts):
shortened = ("...", *shortened)
self._path_edit.setText(os.sep.join(shortened))
Expand All @@ -84,7 +84,7 @@ def setReadOnly(self, val: bool = True) -> None: # noqa: FBT002
self._browse_btn.setHidden(val)

def _on_browse_btn_clicked(self) -> None:
kwargs = {
kwargs: dict[str, Any] = {
"caption": self._browse_config.caption,
}
if self._browse_config.starting_directory:
Expand Down

0 comments on commit 73ae070

Please sign in to comment.