Skip to content

Commit

Permalink
fix ruff lint
Browse files Browse the repository at this point in the history
  • Loading branch information
matteius committed Oct 24, 2023
1 parent 1b3b61e commit 49a86af
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions pipenv/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,11 @@
from pipenv.vendor import click
from pipenv.vendor.click.exceptions import ClickException, FileError, UsageError

if sys.version_info[:2] >= (3, 7):
KnownException = namedtuple(
"KnownException",
["exception_name", "match_string", "show_from_string", "prefix"],
defaults=[None, None, None, ""],
)
else:
KnownException = namedtuple(
"KnownException",
["exception_name", "match_string", "show_from_string", "prefix"],
)
KnownException.__new__.__defaults__ = (None, None, None, "")
KnownException = namedtuple(
"KnownException",
["exception_name", "match_string", "show_from_string", "prefix"],
)
KnownException.__new__.__defaults__ = (None, None, None, "")

KNOWN_EXCEPTIONS = [
KnownException("PermissionError", prefix="Permission Denied:"),
Expand Down

0 comments on commit 49a86af

Please sign in to comment.