Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 29, 2024
1 parent ef5fccd commit 096f4f8
Show file tree
Hide file tree
Showing 44 changed files with 47 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/pandas_profiling/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Configuration for the package is handled in this wrapper for confuse."""

import argparse
from pathlib import Path
from typing import Union
Expand Down
1 change: 1 addition & 0 deletions src/pandas_profiling/controller/console.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This file add the console interface to the package."""

import argparse
from pathlib import Path
from typing import Union
Expand Down
1 change: 1 addition & 0 deletions src/pandas_profiling/controller/pandas_decorator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This file add the decorator on the DataFrame object."""

from pandas import DataFrame

from pandas_profiling.profile_report import ProfileReport
Expand Down
1 change: 1 addition & 0 deletions src/pandas_profiling/model/correlations.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Correlations between variables."""

import itertools
import warnings
from typing import Dict, List, Optional
Expand Down
1 change: 1 addition & 0 deletions src/pandas_profiling/model/describe.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Organize the calculation of statistics for each series in this DataFrame."""

import warnings
from datetime import datetime
from typing import Optional
Expand Down
1 change: 1 addition & 0 deletions src/pandas_profiling/model/messages.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Logic for alerting the user on possibly problematic patterns in the data (e.g. high number of zeros , constant
values, high correlations)."""

from enum import Enum, auto, unique
from typing import Dict, List, Optional, Set, Union

Expand Down
2 changes: 1 addition & 1 deletion src/pandas_profiling/model/summary_algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def describe_date_1d(series: pd.Series, summary: dict) -> Tuple[pd.Series, dict]

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

values = series.values.astype(np.int64) // 10 ** 9
values = series.values.astype(np.int64) // 10**9

if chi_squared_threshold > 0.0:
summary["chi_squared"] = chi_square(values)
Expand Down
1 change: 1 addition & 0 deletions src/pandas_profiling/report/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
"""All functionality concerned with presentation to the user."""

from pandas_profiling.report.structure.report import get_report_structure
1 change: 1 addition & 0 deletions src/pandas_profiling/report/formatters.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Formatters are mappings from object(s) to a string."""

from typing import Callable, Dict

import numpy as np
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains all templates used for generating the HTML profile report"""

import re
import shutil
from pathlib import Path
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functionality related to displaying the profile report in Jupyter notebooks."""

import html
from pathlib import Path

Expand Down
1 change: 1 addition & 0 deletions src/pandas_profiling/report/structure/report.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Generate the report."""

from typing import List

import pandas as pd
Expand Down
1 change: 1 addition & 0 deletions src/pandas_profiling/utils/cache.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Dataset cache utility functions"""

from pathlib import Path

import requests
Expand Down
3 changes: 2 additions & 1 deletion src/pandas_profiling/utils/common.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Common util functions (e.g. missing in Python)."""

import collections
import zipfile
from datetime import datetime, timedelta
Expand All @@ -20,7 +21,7 @@ def update(d: dict, u: Mapping) -> dict:
The merged dictionary.
"""
for k, v in u.items():
if isinstance(v, collections.Mapping):
if isinstance(v, collections.abc.Mapping):
d[k] = update(d.get(k, {}), v)
else:
d[k] = v
Expand Down
1 change: 1 addition & 0 deletions src/pandas_profiling/utils/dataframe.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utils for pandas DataFrames."""

import re
import unicodedata
import warnings
Expand Down
1 change: 1 addition & 0 deletions src/pandas_profiling/utils/paths.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Paths that are useful throughout the project."""

from pathlib import Path


Expand Down
1 change: 1 addition & 0 deletions src/pandas_profiling/visualisation/missing.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Plotting functions for the missing values diagrams"""

import pandas as pd
from matplotlib import pyplot as plt
from missingno import missingno
Expand Down
1 change: 1 addition & 0 deletions src/pandas_profiling/visualisation/plot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Plot functions for the profiling report."""

import copy
from typing import Optional, Union

Expand Down
1 change: 1 addition & 0 deletions src/pandas_profiling/visualisation/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Plotting utility functions."""

import base64
import uuid
from io import BytesIO, StringIO
Expand Down
1 change: 1 addition & 0 deletions tests/issues/test_issue100.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test for issue 100:
https://github.com/pandas-profiling/pandas-profiling/issues/100
"""

import numpy as np
import pandas as pd

Expand Down
1 change: 1 addition & 0 deletions tests/issues/test_issue120.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test for issue 120:
https://github.com/pandas-profiling/pandas-profiling/issues/120
"""

import pandas as pd

from pandas_profiling import ProfileReport
Expand Down
1 change: 1 addition & 0 deletions tests/issues/test_issue147.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test for issue 147:
https://github.com/pandas-profiling/pandas-profiling/issues/147
"""

import pandas as pd

from pandas_profiling import ProfileReport
Expand Down
1 change: 1 addition & 0 deletions tests/issues/test_issue169.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test for issue 169:
https://github.com/pandas-profiling/pandas-profiling/issues/169
"""

from io import StringIO

import pandas as pd
Expand Down
1 change: 1 addition & 0 deletions tests/issues/test_issue200.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test for issue 200:
https://github.com/pandas-profiling/pandas-profiling/issues/200
"""

import pandas as pd

import pandas_profiling
Expand Down
1 change: 1 addition & 0 deletions tests/issues/test_issue215.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test for issue 215:
https://github.com/pandas-profiling/pandas-profiling/issues/215
"""

import pytest

from pandas_profiling.report.formatters import fmt_percent
Expand Down
1 change: 1 addition & 0 deletions tests/issues/test_issue243.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test for issue 243:
https://github.com/pandas-profiling/pandas-profiling/issues/243
"""

import pandas as pd

import pandas_profiling
Expand Down
1 change: 1 addition & 0 deletions tests/issues/test_issue249.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test for issue 249:
https://github.com/pandas-profiling/pandas-profiling/issues/249
"""

import pandas as pd

import pandas_profiling
Expand Down
1 change: 1 addition & 0 deletions tests/issues/test_issue282.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test for issue 282:
https://github.com/pandas-profiling/pandas-profiling/issues/282
"""

import pandas as pd

from pandas_profiling import ProfileReport
Expand Down
1 change: 1 addition & 0 deletions tests/issues/test_issue353.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test for issue 353:
https://github.com/pandas-profiling/pandas-profiling/issues/353
"""

import numpy as np
import pandas as pd

Expand Down
1 change: 1 addition & 0 deletions tests/issues/test_issue377.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test for issue 377:
https://github.com/pandas-profiling/pandas-profiling/issues/377
"""

import sys

import pandas as pd
Expand Down
1 change: 1 addition & 0 deletions tests/issues/test_issue388.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test for issue 388:
https://github.com/pandas-profiling/pandas-profiling/issues/388
"""

import pytest

from pandas_profiling.controller import console
Expand Down
1 change: 1 addition & 0 deletions tests/issues/test_issue397.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test for issue 397 (actually a PR, but ok):
https://github.com/pandas-profiling/pandas-profiling/pull/397
"""

import numpy as np
import pandas as pd

Expand Down
1 change: 1 addition & 0 deletions tests/issues/test_issue416.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test for issue 416:
https://github.com/pandas-profiling/pandas-profiling/issues/416
"""

import pandas as pd

import pandas_profiling
Expand Down
1 change: 1 addition & 0 deletions tests/issues/test_issue437.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test for issue 437:
https://github.com/pandas-profiling/pandas-profiling/issues/437
"""

import numpy as np
import pandas as pd

Expand Down
1 change: 1 addition & 0 deletions tests/issues/test_issue502.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test for issue 502:
https://github.com/pandas-profiling/pandas-profiling/issues/502
"""

import pandas as pd

from pandas_profiling.model.summary import describe_1d
Expand Down
1 change: 1 addition & 0 deletions tests/issues/test_issue51.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test for issue 51:
https://github.com/pandas-profiling/pandas-profiling/issues/51
"""

import numpy as np
import pandas as pd

Expand Down
1 change: 1 addition & 0 deletions tests/issues/test_issue523.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test for issue 523:
https://github.com/pandas-profiling/pandas-profiling/issues/XXX
"""

import pandas as pd
import pytest

Expand Down
1 change: 1 addition & 0 deletions tests/issues/test_issue613.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test for issue 613:
https://github.com/pandas-profiling/pandas-profiling/issues/613
"""

import numpy as np
import pandas as pd

Expand Down
1 change: 1 addition & 0 deletions tests/issues/test_issue664.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test for issue 664:
https://github.com/pandas-profiling/pandas-profiling/issues/664
"""

import numpy as np
import pandas as pd

Expand Down
1 change: 1 addition & 0 deletions tests/issues/test_issue671.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test for issue 671:
https://github.com/pandas-profiling/pandas-profiling/issues/671
"""

import numpy as np
import pandas as pd

Expand Down
1 change: 1 addition & 0 deletions tests/issues/test_issue72.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test for issue 72:
https://github.com/pandas-profiling/pandas-profiling/issues/72
"""

import numpy as np
import pandas as pd

Expand Down
1 change: 1 addition & 0 deletions tests/issues/test_issue94.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Test based on:
https://stackoverflow.com/questions/52926527/pandas-profiling-1-4-1-throws-zerodivisionerror-for-valid-data-set-which-pandas
"""

from pathlib import Path

import pandas as pd
Expand Down
1 change: 1 addition & 0 deletions tests/issues/test_issueXXX.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test for issue XXX:
https://github.com/pandas-profiling/pandas-profiling/issues/XXX
"""

import pandas as pd

import pandas_profiling
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/test_formatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ def test_fmt_class(text, cls, expected):
(100, "Bytes", "100.0 Bytes"),
(1024, None, "1.0 KiB"),
(1024.0, None, "1.0 KiB"),
(1024 ** 4, "Bytes", "1.0 TiBytes"),
(1024 ** 3 * 7.5, None, "7.5 GiB"),
(1024 ** 8, None, "1.0 YiB"),
(1024**4, "Bytes", "1.0 TiBytes"),
(1024**3 * 7.5, None, "7.5 GiB"),
(1024**8, None, "1.0 YiB"),
],
)
def test_fmt_bytesize(num, fmt, expected):
Expand Down

0 comments on commit 096f4f8

Please sign in to comment.