[CLN] Remove TypeError in Interval.length
State: closed

Following #25768, remove `TypeError` in `Interval.length`, as all endpoints should be comparable now.


Labels:
name: Interval
description: Interval data type
name: Clean

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/25859?src=pr&el=h1) Report
> Merging [#25859](https://codecov.io/gh/pandas-dev/pandas/pull/25859?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/6e0f9a971bcd07a4a6283dc03190b4363d42e292?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/25859/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/25859?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #25859   +/-   ##
=======================================
  Coverage   91.45%   91.45%           
=======================================
  Files         172      172           
  Lines       52892    52892           
=======================================
  Hits        48373    48373           
  Misses       4519     4519
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.02% <ø> (ø)` | :arrow_up: |
| #single | `41.81% <ø> (ø)` | :arrow_up: |


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/25859?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/25859?src=pr&el=footer). Last update [6e0f9a9...0198873](https://codecov.io/gh/pandas-dev/pandas/pull/25859?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/25859?src=pr&el=h1) Report
> Merging [#25859](https://codecov.io/gh/pandas-dev/pandas/pull/25859?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/6e0f9a971bcd07a4a6283dc03190b4363d42e292?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/25859/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/25859?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #25859   +/-   ##
=======================================
  Coverage   91.45%   91.45%           
=======================================
  Files         172      172           
  Lines       52892    52892           
=======================================
  Hits        48373    48373           
  Misses       4519     4519
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.02% <ø> (ø)` | :arrow_up: |
| #single | `41.81% <ø> (ø)` | :arrow_up: |


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/25859?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/25859?src=pr&el=footer). Last update [6e0f9a9...0198873](https://codecov.io/gh/pandas-dev/pandas/pull/25859?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

why do no tests break? or they were removed in the prior PR?
> or they were removed in the prior PR?

Yeah, the test cases for this were removed in #25768, as they were disallowed at the constructor level. The test introduced in #25768 converted the existing failing test cases for `Interval.length` into failing test cases for the constructor.
thanks @makbigc