Skip to content

Commit

Permalink
Fix previously ignored flake8 W605 errors (#1841)
Browse files Browse the repository at this point in the history
  • Loading branch information
zundertj committed Nov 21, 2021
1 parent dc87467 commit 627375d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions py-polars/.flake8
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[flake8]
# just stop shouting as black decides line lengths.
max-line-length = 180
# E203, W504: due to black fmt
ignore = E203,W503,W605
# E203, W503: due to black fmt
ignore = E203,W503
exclude = legacy, docs

6 changes: 3 additions & 3 deletions py-polars/polars/internals/expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1662,7 +1662,7 @@ def diff(self, n: int = 1, null_behavior: str = "ignore") -> "Expr": # type: ig
return wrap_expr(self._pyexpr.diff(n, null_behavior))

def skew(self, bias: bool = True) -> "Expr":
"""Compute the sample skewness of a data set.
r"""Compute the sample skewness of a data set.
For normally distributed data, the skewness should be about zero. For
unimodal continuous distributions, a skewness value greater than zero means
that there is more weight in the right tail of the distribution. The
Expand Down Expand Up @@ -2073,7 +2073,7 @@ def json_path_match(self, json_path: str) -> Expr:
return wrap_expr(self._pyexpr.str_json_path_match(json_path))

def extract(self, pattern: str, group_index: int = 1) -> Expr:
"""
r"""
Extract the target capture group from provided patterns.
Parameters
Expand All @@ -2099,7 +2099,7 @@ def extract(self, pattern: str, group_index: int = 1) -> Expr:
... 'http://vote.com/ballon_dor?candidate=ronaldo&ref=polars'
... ]})
>>> df.select([
... pl.col('a').str.extract('candidate=(\w+)', 1)
... pl.col('a').str.extract(r'candidate=(\w+)', 1)
... ])
shape: (3, 1)
┌─────────┐
Expand Down
6 changes: 3 additions & 3 deletions py-polars/polars/internals/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -2907,7 +2907,7 @@ def diff(self, n: int = 1, null_behavior: str = "ignore") -> "Series": # type:
return wrap_s(self._s.diff(n, null_behavior))

def skew(self, bias: bool = True) -> Optional[float]:
"""Compute the sample skewness of a data set.
r"""Compute the sample skewness of a data set.
For normally distributed data, the skewness should be about zero. For
unimodal continuous distributions, a skewness value greater than zero means
that there is more weight in the right tail of the distribution. The
Expand Down Expand Up @@ -3083,7 +3083,7 @@ def json_path_match(self, json_path: str) -> Series:
return wrap_s(self._s.str_json_path_match(json_path))

def extract(self, pattern: str, group_index: int = 1) -> Series:
"""
r"""
Extract the target capture group from provided patterns.
Parameters
Expand All @@ -3109,7 +3109,7 @@ def extract(self, pattern: str, group_index: int = 1) -> Series:
... 'http://vote.com/ballon_dor?candidate=ronaldo&ref=polars'
... ]})
>>> df.select([
... pl.col('a').str.extract('candidate=(\w+)', 1)
... pl.col('a').str.extract(r'candidate=(\w+)', 1)
... ])
shape: (3, 1)
┌─────────┐
Expand Down

0 comments on commit 627375d

Please sign in to comment.