Skip to content

Commit 06e977b

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent bd6861e commit 06e977b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+47
-5
lines changed

src/pandas_profiling/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Configuration for the package is handled in this wrapper for confuse."""
2+
23
import argparse
34
from pathlib import Path
45
from typing import Union

src/pandas_profiling/controller/console.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This file add the console interface to the package."""
2+
23
import argparse
34
from pathlib import Path
45
from typing import Union

src/pandas_profiling/controller/pandas_decorator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""This file add the decorator on the DataFrame object."""
2+
23
from pandas import DataFrame
34

45
from pandas_profiling.profile_report import ProfileReport

src/pandas_profiling/model/correlations.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Correlations between variables."""
2+
23
import itertools
34
import warnings
45
from typing import Dict, List, Optional

src/pandas_profiling/model/describe.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Organize the calculation of statistics for each series in this DataFrame."""
2+
23
import warnings
34
from datetime import datetime
45
from typing import Optional

src/pandas_profiling/model/messages.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Logic for alerting the user on possibly problematic patterns in the data (e.g. high number of zeros , constant
22
values, high correlations)."""
3+
34
from enum import Enum, auto, unique
45
from typing import Dict, List, Optional, Set, Union
56

src/pandas_profiling/model/summary_algorithms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def describe_date_1d(series: pd.Series, summary: dict) -> Tuple[pd.Series, dict]
265265

266266
summary["range"] = summary["max"] - summary["min"]
267267

268-
values = series.values.astype(np.int64) // 10 ** 9
268+
values = series.values.astype(np.int64) // 10**9
269269

270270
if chi_squared_threshold > 0.0:
271271
summary["chi_squared"] = chi_square(values)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
"""All functionality concerned with presentation to the user."""
2+
23
from pandas_profiling.report.structure.report import get_report_structure

src/pandas_profiling/report/formatters.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Formatters are mappings from object(s) to a string."""
2+
23
from typing import Callable, Dict
34

45
import numpy as np

src/pandas_profiling/report/presentation/flavours/html/templates.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Contains all templates used for generating the HTML profile report"""
2+
23
import re
34
import shutil
45
from pathlib import Path

src/pandas_profiling/report/presentation/flavours/widget/notebook.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Functionality related to displaying the profile report in Jupyter notebooks."""
2+
23
import html
34
from pathlib import Path
45

src/pandas_profiling/report/structure/report.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Generate the report."""
2+
23
from typing import List
34

45
import pandas as pd

src/pandas_profiling/utils/cache.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Dataset cache utility functions"""
2+
23
from pathlib import Path
34

45
import requests

src/pandas_profiling/utils/common.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Common util functions (e.g. missing in Python)."""
2+
23
import collections
34
import zipfile
45
from datetime import datetime, timedelta
@@ -20,7 +21,7 @@ def update(d: dict, u: Mapping) -> dict:
2021
The merged dictionary.
2122
"""
2223
for k, v in u.items():
23-
if isinstance(v, collections.Mapping):
24+
if isinstance(v, collections.abc.Mapping):
2425
d[k] = update(d.get(k, {}), v)
2526
else:
2627
d[k] = v

src/pandas_profiling/utils/dataframe.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Utils for pandas DataFrames."""
2+
23
import re
34
import unicodedata
45
import warnings

src/pandas_profiling/utils/paths.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Paths that are useful throughout the project."""
2+
23
from pathlib import Path
34

45

src/pandas_profiling/visualisation/missing.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Plotting functions for the missing values diagrams"""
2+
23
import pandas as pd
34
from matplotlib import pyplot as plt
45
from missingno import missingno

src/pandas_profiling/visualisation/plot.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Plot functions for the profiling report."""
2+
23
import copy
34
from typing import Optional, Union
45

src/pandas_profiling/visualisation/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Plotting utility functions."""
2+
23
import base64
34
import uuid
45
from io import BytesIO, StringIO

tests/issues/test_issue100.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Test for issue 100:
33
https://github.com/pandas-profiling/pandas-profiling/issues/100
44
"""
5+
56
import numpy as np
67
import pandas as pd
78

tests/issues/test_issue120.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Test for issue 120:
33
https://github.com/pandas-profiling/pandas-profiling/issues/120
44
"""
5+
56
import pandas as pd
67

78
from pandas_profiling import ProfileReport

tests/issues/test_issue147.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Test for issue 147:
33
https://github.com/pandas-profiling/pandas-profiling/issues/147
44
"""
5+
56
import pandas as pd
67

78
from pandas_profiling import ProfileReport

tests/issues/test_issue169.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Test for issue 169:
33
https://github.com/pandas-profiling/pandas-profiling/issues/169
44
"""
5+
56
from io import StringIO
67

78
import pandas as pd

tests/issues/test_issue200.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Test for issue 200:
33
https://github.com/pandas-profiling/pandas-profiling/issues/200
44
"""
5+
56
import pandas as pd
67

78
import pandas_profiling

tests/issues/test_issue215.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Test for issue 215:
33
https://github.com/pandas-profiling/pandas-profiling/issues/215
44
"""
5+
56
import pytest
67

78
from pandas_profiling.report.formatters import fmt_percent

tests/issues/test_issue243.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Test for issue 243:
33
https://github.com/pandas-profiling/pandas-profiling/issues/243
44
"""
5+
56
import pandas as pd
67

78
import pandas_profiling

tests/issues/test_issue249.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Test for issue 249:
33
https://github.com/pandas-profiling/pandas-profiling/issues/249
44
"""
5+
56
import pandas as pd
67

78
import pandas_profiling

tests/issues/test_issue282.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Test for issue 282:
33
https://github.com/pandas-profiling/pandas-profiling/issues/282
44
"""
5+
56
import pandas as pd
67

78
from pandas_profiling import ProfileReport

tests/issues/test_issue353.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Test for issue 353:
33
https://github.com/pandas-profiling/pandas-profiling/issues/353
44
"""
5+
56
import numpy as np
67
import pandas as pd
78

tests/issues/test_issue377.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Test for issue 377:
33
https://github.com/pandas-profiling/pandas-profiling/issues/377
44
"""
5+
56
import sys
67

78
import pandas as pd

tests/issues/test_issue388.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Test for issue 388:
33
https://github.com/pandas-profiling/pandas-profiling/issues/388
44
"""
5+
56
import pytest
67

78
from pandas_profiling.controller import console

tests/issues/test_issue397.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Test for issue 397 (actually a PR, but ok):
33
https://github.com/pandas-profiling/pandas-profiling/pull/397
44
"""
5+
56
import numpy as np
67
import pandas as pd
78

tests/issues/test_issue416.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Test for issue 416:
33
https://github.com/pandas-profiling/pandas-profiling/issues/416
44
"""
5+
56
import pandas as pd
67

78
import pandas_profiling

tests/issues/test_issue437.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Test for issue 437:
33
https://github.com/pandas-profiling/pandas-profiling/issues/437
44
"""
5+
56
import numpy as np
67
import pandas as pd
78

tests/issues/test_issue502.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Test for issue 502:
33
https://github.com/pandas-profiling/pandas-profiling/issues/502
44
"""
5+
56
import pandas as pd
67

78
from pandas_profiling.model.summary import describe_1d

tests/issues/test_issue51.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Test for issue 51:
33
https://github.com/pandas-profiling/pandas-profiling/issues/51
44
"""
5+
56
import numpy as np
67
import pandas as pd
78

tests/issues/test_issue523.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Test for issue 523:
33
https://github.com/pandas-profiling/pandas-profiling/issues/XXX
44
"""
5+
56
import pandas as pd
67
import pytest
78

tests/issues/test_issue613.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Test for issue 613:
33
https://github.com/pandas-profiling/pandas-profiling/issues/613
44
"""
5+
56
import numpy as np
67
import pandas as pd
78

tests/issues/test_issue664.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Test for issue 664:
33
https://github.com/pandas-profiling/pandas-profiling/issues/664
44
"""
5+
56
import numpy as np
67
import pandas as pd
78

tests/issues/test_issue671.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Test for issue 671:
33
https://github.com/pandas-profiling/pandas-profiling/issues/671
44
"""
5+
56
import numpy as np
67
import pandas as pd
78

tests/issues/test_issue72.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Test for issue 72:
33
https://github.com/pandas-profiling/pandas-profiling/issues/72
44
"""
5+
56
import numpy as np
67
import pandas as pd
78

tests/issues/test_issue94.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
Test based on:
66
https://stackoverflow.com/questions/52926527/pandas-profiling-1-4-1-throws-zerodivisionerror-for-valid-data-set-which-pandas
77
"""
8+
89
from pathlib import Path
910

1011
import pandas as pd

tests/issues/test_issueXXX.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Test for issue XXX:
33
https://github.com/pandas-profiling/pandas-profiling/issues/XXX
44
"""
5+
56
import pandas as pd
67

78
import pandas_profiling

tests/unit/test_formatters.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ def test_fmt_class(text, cls, expected):
3939
(100, "Bytes", "100.0 Bytes"),
4040
(1024, None, "1.0 KiB"),
4141
(1024.0, None, "1.0 KiB"),
42-
(1024 ** 4, "Bytes", "1.0 TiBytes"),
43-
(1024 ** 3 * 7.5, None, "7.5 GiB"),
44-
(1024 ** 8, None, "1.0 YiB"),
42+
(1024**4, "Bytes", "1.0 TiBytes"),
43+
(1024**3 * 7.5, None, "7.5 GiB"),
44+
(1024**8, None, "1.0 YiB"),
4545
],
4646
)
4747
def test_fmt_bytesize(num, fmt, expected):

0 commit comments

Comments
 (0)