Skip to content

Commit

Permalink
cvss4, Removed duplicate Decimal import
Browse files Browse the repository at this point in the history
  • Loading branch information
jobiewinserapck committed Dec 15, 2023
1 parent 6c56b75 commit 0b2ca1b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cvss/cvss4.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

import copy
from decimal import ROUND_CEILING, ROUND_HALF_UP
from decimal import Decimal
from decimal import Decimal as D

from .constants4 import (
Expand All @@ -54,7 +53,7 @@


def round_away_from_zero(x, dp):
return float(Decimal(x).quantize(Decimal("0." + "0" * dp), rounding=ROUND_HALF_UP))
return float(D(x).quantize(D("0." + "0" * dp), rounding=ROUND_HALF_UP))


def round_up(value):
Expand Down

0 comments on commit 0b2ca1b

Please sign in to comment.