Skip to content

Commit

Permalink
fix(linting): code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
azory-ydata authored and fabclmnt committed Oct 28, 2024
1 parent 5d8dc04 commit d3b58e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/ydata_profiling/utils/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,12 @@ def calculate_nrows(df):
n_partitions = df.rdd.getNumPartitions()

nrows = (
df.rdd.mapPartitionsWithIndex(
lambda idx, partition: [sum(1 for _ in partition)] if idx == 0 else [0]
).collect()[0]
* n_partitions
df.rdd.mapPartitionsWithIndex(
lambda idx, partition: [sum(1 for _ in partition)]
if idx == 0
else [0]
).collect()[0]
* n_partitions
)
except:
nrows = 0
Expand Down
2 changes: 1 addition & 1 deletion src/ydata_profiling/utils/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def info_def_report(self, df, timeseries: bool) -> None: # noqa: ANN001
try:
ncols = len(df.columns)
except AttributeError:
ncols=0
ncols = 0

nrows = calculate_nrows(df)

Expand Down

0 comments on commit d3b58e7

Please sign in to comment.