Skip to content

Sourcery refactored main branch #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions houzzproject/Robot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
):
Comment on lines -15 to +17
Copy link
Author

Choose a reason for hiding this comment

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

Lines 15-19 refactored with the following changes:

This removes the following comments ( why? ):

# 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.

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)
18 changes: 12 additions & 6 deletions houzzproject/Tabanım/taban.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Copy link
Author

Choose a reason for hiding this comment

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

Function Amil.basarili_is refactored with the following changes:

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]>> "
)
)
Comment on lines -173 to +184
Copy link
Author

Choose a reason for hiding this comment

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

Function Amil.option refactored with the following changes: