[REF] separate blocks.py out of internals.__init__
State: closed

Follow-up to #21903

Labels:
name: Refactor
description: Internal refactoring of code

Comments:
Hello @jbrockmendel! Thanks for updating the PR.



 - In the file [`pandas/core/internals/blocks.py`](https://github.com/pandas-dev/pandas/blob/aa4d7f2c59f11d90ce15107278010a4ffb07812f/pandas/core/internals/blocks.py), following are the PEP8 issues :

> [Line 666:9](https://github.com/pandas-dev/pandas/blob/aa4d7f2c59f11d90ce15107278010a4ffb07812f/pandas/core/internals/blocks.py#L666): [E722](https://duckduckgo.com/?q=pep8%20E722) do not use bare except'
> [Line 1136:9](https://github.com/pandas-dev/pandas/blob/aa4d7f2c59f11d90ce15107278010a4ffb07812f/pandas/core/internals/blocks.py#L1136): [E722](https://duckduckgo.com/?q=pep8%20E722) do not use bare except'
> [Line 1151:9](https://github.com/pandas-dev/pandas/blob/aa4d7f2c59f11d90ce15107278010a4ffb07812f/pandas/core/internals/blocks.py#L1151): [E722](https://duckduckgo.com/?q=pep8%20E722) do not use bare except'
> [Line 2377:13](https://github.com/pandas-dev/pandas/blob/aa4d7f2c59f11d90ce15107278010a4ffb07812f/pandas/core/internals/blocks.py#L2377): [E722](https://duckduckgo.com/?q=pep8%20E722) do not use bare except'
> [Line 3057:9](https://github.com/pandas-dev/pandas/blob/aa4d7f2c59f11d90ce15107278010a4ffb07812f/pandas/core/internals/blocks.py#L3057): [E722](https://duckduckgo.com/?q=pep8%20E722) do not use bare except'





##### Comment last updated on July 21, 2018 at 22:16 Hours UTC
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22014?src=pr&el=h1) Report
> Merging [#22014](https://codecov.io/gh/pandas-dev/pandas/pull/22014?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/67b627717db2b0d6c1b3699d9384cc433c0b9af4?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #22014      +/-   ##
==========================================
+ Coverage   91.99%   91.99%   +<.01%     
==========================================
  Files         167      168       +1     
  Lines       50578    50595      +17     
==========================================
+ Hits        46530    46547      +17     
  Misses       4048     4048
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.4% <ø> (ø)` | :arrow_up: |
| #single | `42.19% <ø> (+0.01%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/22014?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/internals/\_\_init\_\_.py](https://codecov.io/gh/pandas-dev/pandas/pull/22014/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzL19faW5pdF9fLnB5) | `96.88% <ø> (+1.38%)` | :arrow_up: |
| [pandas/core/internals/blocks.py](https://codecov.io/gh/pandas-dev/pandas/pull/22014/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzL2Jsb2Nrcy5weQ==) | `94.46% <ø> (ø)` | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22014?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/22014?src=pr&el=footer). Last update [67b6277...aa4d7f2](https://codecov.io/gh/pandas-dev/pandas/pull/22014?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

thanks, ok for now. This needs further splitting (and ultimately everything should be moved out of ``__init__`` to separate modules with minimal dependencies on each other. But I know thats in the plan.