Fix issues pointed out by ruff

Signed-off-by: Alfred Wingate <parona@protonmail.com>
This commit is contained in:
Alfred Wingate
2023-11-14 23:43:04 +02:00
parent 70f88ed37d
commit a8f35aee25
7 changed files with 20 additions and 22 deletions

View File

@ -29,8 +29,8 @@ from portage.exception import AmbiguousPackageName
from portage.output import green, turquoise, white, yellow
from euscan import CONFIG, output
from euscan.out import progress_bar
from euscan._version import __version__
from euscan.out import progress_bar
# Globals
isatty = os.environ.get("TERM") != "dumb" and sys.stdout.isatty()
@ -75,7 +75,7 @@ def print_usage(_error=None, help=None):
if _error:
out = sys.stderr
if not _error in (
if _error not in (
"global-options",
"packages",
):
@ -284,7 +284,7 @@ def parse_args():
# apply getopts to command line, show partial help on failure
try:
opts, args = getopt.getopt(sys.argv[1:], short_opts, long_opts)
except:
except getopt.GetoptError:
raise ParseArgsException(opts_mode + "-options")
# set options accordingly