refactor: clear() přes subprocess místo os.system
This commit is contained in:
1 parent
b070e22f33
commit
b3650b7243
1 file changed
+3
-2
+3
-2
@@ -1,8 +1,9 @@
|
|||||||
import csv
|
import csv
|
||||||
import re
|
import re
|
||||||
|
import subprocess
|
||||||
from collections import Counter
|
from collections import Counter
|
||||||
from importlib.resources import files
|
from importlib.resources import files
|
||||||
from os import name, system
|
from os import name
|
||||||
from random import randint
|
from random import randint
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
@@ -49,7 +50,7 @@ def show_throw(throw: str) -> str:
|
|||||||
return pretty_list
|
return pretty_list
|
||||||
|
|
||||||
def clear() -> None:
|
def clear() -> None:
|
||||||
_ = system('cls') if name == 'nt' else system('clear')
|
_ = subprocess.call('cls', shell=True) if name == 'nt' else subprocess.call('clear', shell=True)
|
||||||
|
|
||||||
def translate_letters_to_numbers(inp_hod: str, count: int) -> tuple[bool, str]:
|
def translate_letters_to_numbers(inp_hod: str, count: int) -> tuple[bool, str]:
|
||||||
inp_temp: str = ""
|
inp_temp: str = ""
|
||||||
|
|||||||
Reference in new issue
Block a user