Skip to content

Additional task - #2

Open
Roman-A113 wants to merge 20 commits into
masterfrom
additional-task
Open

Additional task#2
Roman-A113 wants to merge 20 commits into
masterfrom
additional-task

Conversation

@Roman-A113

Copy link
Copy Markdown
Owner

No description provided.

Comment thread scripts/gui.py Outdated
from scanner import scan_all_directories
from utils import convert_size, convert_time

HEADINGS = {"#0": "Имя", "size": "Размер", "files_count": "Файлы", "last_change_time": "Изменен"}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

почему словарем?

Comment thread scripts/gui.py


class DiskUsageGUI:
def __init__(self, root: tk.Tk) -> None:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

почему все публичное?

Comment thread scripts/gui.py
HEADINGS = {"#0": "Имя", "size": "Размер", "files_count": "Файлы", "last_change_time": "Изменен"}


class DiskUsageGUI:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а мб немного декомпозировать класс?

Comment thread scripts/models.py Outdated
files_count: int


class SortBy(Enum):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

используй strenum

Comment thread scripts/gui.py Outdated
from ui_builder import UIBuilder
from utils import convert_size, convert_time

HEADINGS = {("#0", "Имя"), ("size", "Размер"), ("files_count", "Файлы"), ("last_change_time", "Изменен")}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а это что вообще?)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вы про HEADINGS? Это список заголовков таблицы (по английски - как они хранятся в коде, по русски - как отображаются в окне)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ааа, там фигурные скобки почему то стоят) Теперь понятно, должны быть обычные квадратные

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants