Skip to content

Commit b8870be

Browse files
committed
feat: enhance type hinting in main.py and update README_ptBR.md with new tasks
1 parent aa55f8d commit b8870be

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

README_ptBR.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,8 @@ if __name__ == "__main__":
373373
- [ ] **Tratamento de Processos Mortos**: Verificar periodicamente se os processos iniciados ainda estão vivos.
374374
- [ ] **Abstração de Projetos**: Refatorar para classes (`PythonProject`, `NodeProject`) facilitando a adição de novas linguagens.
375375
- [ ] **Type Hinting**: Melhorar a tipagem em todos os métodos para melhor suporte em IDEs.
376-
376+
- [ ] Arrumar bugs relacionado a path, atualmente se adicionar um script python e ele não estiver na raiz do projeto o venv não sera executado, fortscript tenta executar com python padrão, mas da erro por não possuir os imports e a janela do terminal se encerra
377+
- [ ] Adicionar opção de ativar ou desativar as janelas que aparecem dos scripts
377378
### CLI
378379

379380
- [ ] **System Tray**: Rodar minimizado na bandeja do sistema.

src/fortscript/main.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import subprocess
44
import sys
55
import time
6+
from typing import Callable
67

78
import psutil
89
import yaml
@@ -21,7 +22,7 @@ def get_percent(self):
2122
class AppsMonitoring:
2223
"""Monitors the opening of resource-heavy applications."""
2324

24-
def __init__(self, heavy_processes_list):
25+
def __init__(self, heavy_processes_list: list):
2526
"""
2627
Initializes the application monitoring with a list of heavy processes.
2728
@@ -56,14 +57,14 @@ class FortScript:
5657

5758
def __init__(
5859
self,
59-
config_path='fortscript.yaml',
60-
projects=None,
61-
heavy_process=None,
62-
ram_threshold=None,
63-
ram_safe=None,
64-
on_pause=None,
65-
on_resume=None,
66-
log_level=None,
60+
config_path: str ='fortscript.yaml',
61+
projects: list[str] | None = None,
62+
heavy_process: list | None = None,
63+
ram_threshold: int | None = None,
64+
ram_safe: int | None = None,
65+
on_pause: Callable | None = None,
66+
on_resume: Callable | None = None,
67+
log_level: str | int | None = None,
6768
):
6869
"""
6970
Initializes FortScript with the configuration file.

0 commit comments

Comments
 (0)