Skip to content

Commit

Permalink
Remove deprecated features
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjstewart committed Feb 17, 2022
1 parent 2434970 commit 3632335
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 72 deletions.
54 changes: 0 additions & 54 deletions fiscalyear.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,15 +452,6 @@ def fiscal_quarter(self) -> int:
""":returns: The fiscal quarter"""
return self._fiscal_quarter

@property
def quarter(self) -> int:
warnings.warn(
"FiscalQuarter.quarter is deprecated, "
"use FiscalQuarter.fiscal_quarter instead",
DeprecationWarning,
)
return self.fiscal_quarter

@property
def prev_fiscal_quarter(self) -> "FiscalQuarter":
""":returns: The previous fiscal quarter"""
Expand All @@ -472,15 +463,6 @@ def prev_fiscal_quarter(self) -> "FiscalQuarter":

return FiscalQuarter(fiscal_year, fiscal_quarter)

@property
def prev_quarter(self) -> "FiscalQuarter":
warnings.warn(
"FiscalQuarter.prev_quarter is deprecated, "
"use FiscalQuarter.prev_fiscal_quarter instead",
DeprecationWarning,
)
return self.prev_fiscal_quarter

@property
def next_fiscal_quarter(self) -> "FiscalQuarter":
""":returns: The next fiscal quarter"""
Expand All @@ -492,15 +474,6 @@ def next_fiscal_quarter(self) -> "FiscalQuarter":

return FiscalQuarter(fiscal_year, fiscal_quarter)

@property
def next_quarter(self) -> "FiscalQuarter":
warnings.warn(
"FiscalQuarter.next_quarter is deprecated, "
"use FiscalQuarter.next_fiscal_quarter instead",
DeprecationWarning,
)
return self.next_fiscal_quarter

@property
def start(self) -> "FiscalDateTime":
""":returns: The start of the fiscal quarter"""
Expand Down Expand Up @@ -1023,15 +996,6 @@ def fiscal_quarter(self) -> int:
break
return quarter

@property
def quarter(self) -> int:
warnings.warn(
"FiscalDate(Time).quarter is deprecated, "
"use FiscalDate(Time).fiscal_quarter instead",
DeprecationWarning,
)
return self.fiscal_quarter

@property
def fiscal_month(self) -> int:
""":returns: The fiscal month"""
Expand Down Expand Up @@ -1075,31 +1039,13 @@ def prev_fiscal_quarter(self) -> FiscalQuarter:

return fiscal_quarter.prev_fiscal_quarter

@property
def prev_quarter(self) -> FiscalQuarter:
warnings.warn(
"FiscalDate(Time).prev_quarter is deprecated, "
"use FiscalDate(Time).prev_fiscal_quarter instead",
DeprecationWarning,
)
return self.prev_fiscal_quarter

@property
def next_fiscal_quarter(self) -> FiscalQuarter:
""":returns: The next fiscal quarter"""
fiscal_quarter = FiscalQuarter(self.fiscal_year, self.fiscal_quarter)

return fiscal_quarter.next_fiscal_quarter

@property
def next_quarter(self) -> FiscalQuarter:
warnings.warn(
"FiscalDate(Time).next_quarter is deprecated, "
"use FiscalDate(Time).next_fiscal_quarter instead",
DeprecationWarning,
)
return self.next_fiscal_quarter

@property
def prev_fiscal_month(self) -> FiscalMonth:
""":returns: The previous fiscal month"""
Expand Down
18 changes: 0 additions & 18 deletions test_fiscalyear.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,12 +437,6 @@ def test_out_of_range(self) -> None:
with pytest.raises(ValueError):
FiscalQuarter(0, 2)

def test_deprecated(self, a: FiscalQuarter) -> None:
with pytest.deprecated_call():
a.quarter
a.prev_quarter
a.next_quarter

def test_prev_fiscal_quarter(
self,
a: FiscalQuarter,
Expand Down Expand Up @@ -909,12 +903,6 @@ def test_prev_fiscal_day(self, a: FiscalDate) -> None:
def test_next_fiscal_day(self, a: FiscalDate) -> None:
assert a.next_fiscal_day == FiscalDay(2017, 94)

def test_deprecated(self, a: FiscalDate) -> None:
with pytest.deprecated_call():
a.quarter
a.prev_quarter
a.next_quarter


class TestFiscalDateTime:
@pytest.fixture(scope="class")
Expand Down Expand Up @@ -974,9 +962,3 @@ def test_prev_fiscal_day(self, a: FiscalDateTime) -> None:

def test_next_fiscal_day(self, a: FiscalDateTime) -> None:
assert a.next_fiscal_day == FiscalDay(2017, 94)

def test_deprecated(self, a: FiscalDateTime) -> None:
with pytest.deprecated_call():
a.quarter
a.prev_quarter
a.next_quarter

0 comments on commit 3632335

Please sign in to comment.