Skip to content

Commit 4ff6d2a

Browse files
remove unnecessary libraries and fix linter error
1 parent 2ecdfc7 commit 4ff6d2a

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

etc/subclass.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
import argparse
22
import sys
33
import re
4+
from typing import NoReturn
45

56
try:
67
from rich.console import Console
78
except KeyboardInterrupt:
89
print("\n Aborted by user.")
10+
sys.exit(1)
911

1012
class SepheraArgparse(argparse.ArgumentParser):
11-
def error(self, message: str):
12-
console = Console()
13+
def error(self, message: str) -> NoReturn:
1314

1415
match = re.search(r"invalid choice: '(.+?)'", message)
15-
16+
console = Console()
1617
if match:
1718
wrong_command = match.group(1)
1819
console.print(f"[red]Unrecognized command: '{wrong_command}'")
@@ -26,7 +27,8 @@ def error(self, message: str):
2627
console.print(f"[red]Missing value for argument: {arg}")
2728
sys.exit(1)
2829

29-
else:
30-
console.print(f"[red]Unrecognized arugment: {message.replace("unrecognized arguments:", "").strip()}")
31-
sys.exit(1)
30+
31+
console.print(f"[red]Unrecognized arugment: {message.replace('unrecognized arguments:', '').strip()}")
32+
sys.exit(1)
33+
3234

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ mkdocs
66
nuitka
77
tabulate
88
ruff
9-
toml
10-
PyQt5
9+
toml

sephera/version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ def fetch_version(self, show_git_version: bool) -> None:
3131
self.console.print("\n".join([
3232
f"[cyan][+] The Sephera latest version on GitHub: {sephera_version}",
3333
f"[cyan][+] Your Sephera version: {SEPHERA_VERSION}",
34-
f"[cyan][+] You are {"use the latest version of Sephera"
34+
f"[cyan][+] You are {'use the latest version of Sephera'
3535
if version.parse(SEPHERA_VERSION) == sephera_version
36-
else "not use the latest version of Sephera"}"
36+
else 'not use the latest version of Sephera'}"
3737
]))
3838

0 commit comments

Comments
 (0)