diff --git a/houzzproject/Robot/__init__.py b/houzzproject/Robot/__init__.py index 9ffb8e9..7714134 100644 --- a/houzzproject/Robot/__init__.py +++ b/houzzproject/Robot/__init__.py @@ -12,10 +12,8 @@ load_dotenv("ayar.env") -# Yapılandırmanın önceden kullanılan değişkeni kullanarak düzenlenip düzenlenmediğini kontrol edin. -# Temel olarak, yapılandırma dosyası için kontrol. -AYAR_KONTROL = os.environ.get("___________LUTFEN_______BU_____SATIRI_____SILIN__________", None) - -if AYAR_KONTROL: +if AYAR_KONTROL := os.environ.get( + "___________LUTFEN_______BU_____SATIRI_____SILIN__________", None +): hata("\n\tLütfen ayar.env dosyanızı düzenlediğinize emin olun /veya\n\tilk hashtag'de belirtilen satırı kaldırın..\n") quit(1) diff --git "a/houzzproject/Taban\304\261m/taban.py" "b/houzzproject/Taban\304\261m/taban.py" index 00e7496..bd0f530 100644 --- "a/houzzproject/Taban\304\261m/taban.py" +++ "b/houzzproject/Taban\304\261m/taban.py" @@ -165,14 +165,20 @@ def bildirim(self) -> None: def bilgi_yazdircik(self,yazi:str) -> None: self.konsol.print(yazi, style="blue") def basarili_is(self,yazi:str) -> None: - self.konsol.print("✅"+yazi, style="bold green", width=70, justify="center") + self.konsol.print(f"✅{yazi}", style="bold green", width=70, justify="center") def onemli_yazdir(self,yazi:str) -> None: self.konsol.print(yazi, style="bold cyan") def option(self, type:str = "str", info:str = ""): - if type == "str" or type == "string": - return str(self.konsol.input(f"[red]{self.oturum}:[/][cyan]~/../{self.get_location()[-2] + '/' + self.get_location()[-1]}[/]{' [green][[/][yellow] ' + info + ' [/][green]][/] ' if info else ''}[cyan]>> ")) - elif type == "int" or type == "integer": - return int(self.konsol.input(f"[red]{self.oturum}:[/][cyan]~/../{self.get_location()[-2] + '/' + self.get_location()[-1]}[/]{' [green][[/][yellow] ' + info + ' [/][green]][/] ' if info else ''}[cyan]>> ")) + if type in {"str", "string"} or type not in ["int", "integer"]: + return str( + self.konsol.input( + f"[red]{self.oturum}:[/][cyan]~/../{self.get_location()[-2]}/{self.get_location()[-1]}[/]{f' [green][[/][yellow] {info} [/][green]][/] ' if info else ''}[cyan]>> " + ) + ) else: - return str(self.konsol.input(f"[red]{self.oturum}:[/][cyan]~/../{self.get_location()[-2] + '/' + self.get_location()[-1]}[/]{' [green][[/][yellow] ' + info + ' [/][green]][/] ' if info else ''}[cyan]>> ")) + return int( + self.konsol.input( + f"[red]{self.oturum}:[/][cyan]~/../{self.get_location()[-2]}/{self.get_location()[-1]}[/]{f' [green][[/][yellow] {info} [/][green]][/] ' if info else ''}[cyan]>> " + ) + )