Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #250

Merged
merged 3 commits into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ repos:
- id: blackdoc

- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
rev: v2.2.5
hooks:
- id: codespell
exclude: >
Expand All @@ -46,17 +46,17 @@ repos:
args: [--config=pyproject.toml]

- repo: https://github.com/asottile/add-trailing-comma
rev: v2.5.1
rev: v3.0.0
hooks:
- id: add-trailing-comma

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.272
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.276
hooks:
- id: ruff

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 0.11.2
rev: 0.13.0
hooks:
- id: pyproject-fmt

Expand Down
26 changes: 13 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,6 @@ requires = [
"wheel",
]

[tool.interrogate]
ignore-init-method = true
ignore-init-module = false
ignore-magic = false
ignore-semiprivate = false
ignore-private = false
ignore-module = false
fail-under = 70
exclude = ["setup.py", "docs", "tests"]
verbose = 1
quiet = false
color = true

[tool.ruff]
select = [
"A", # flake8-builtins
Expand All @@ -42,3 +29,16 @@ line-length = 79
"samples/example_pdf_by.py" = [
"T201",
]

[tool.interrogate]
ignore-init-method = true
ignore-init-module = false
ignore-magic = false
ignore-semiprivate = false
ignore-private = false
ignore-module = false
fail-under = 70
exclude = ["setup.py", "docs", "tests"]
verbose = 1
quiet = false
color = true
45 changes: 37 additions & 8 deletions windrose/windrose.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,10 @@ def set_radii_angle(self, **kwargs):
radii_labels = [fmt % r for r in radii]
# radii_labels[0] = "" # Removing label 0
self.set_rgrids(
radii=radii[1:], labels=radii_labels[1:], angle=self.radii_angle, **kwargs
radii=radii[1:],
labels=radii_labels[1:],
angle=self.radii_angle,
**kwargs,
)

def _update(self):
Expand Down Expand Up @@ -456,7 +459,9 @@ def contour(self, direction, var, **kwargs):

"""
bins, nbins, nsector, colors, angles, kwargs = self._init_plot(
direction, var, **kwargs
direction,
var,
**kwargs,
)

# closing lines
Expand Down Expand Up @@ -524,7 +529,9 @@ def contourf(self, direction, var, **kwargs):
"""

bins, nbins, nsector, colors, angles, kwargs = self._init_plot(
direction, var, **kwargs
direction,
var,
**kwargs,
)
kwargs.pop("facecolor", None)
kwargs.pop("edgecolor", None)
Expand Down Expand Up @@ -602,7 +609,9 @@ def bar(self, direction, var, **kwargs):
"""

bins, nbins, nsector, colors, angles, kwargs = self._init_plot(
direction, var, **kwargs
direction,
var,
**kwargs,
)
kwargs.pop("facecolor", None)
edgecolor = kwargs.pop("edgecolor", None)
Expand Down Expand Up @@ -680,7 +689,9 @@ def box(self, direction, var, **kwargs):
"""

bins, nbins, nsector, colors, angles, kwargs = self._init_plot(
direction, var, **kwargs
direction,
var,
**kwargs,
)
kwargs.pop("facecolor", None)
edgecolor = kwargs.pop("edgecolor", None)
Expand Down Expand Up @@ -875,7 +886,13 @@ def wrpdf(


def wrscatter(
direction, var, ax=None, rmax=None, figsize=FIGSIZE_DEFAULT, *args, **kwargs
direction,
var,
ax=None,
rmax=None,
figsize=FIGSIZE_DEFAULT,
*args,
**kwargs,
):
"""
Draw scatter plot
Expand Down Expand Up @@ -957,7 +974,13 @@ def plot_windrose(
else:
direction = direction_or_df
return plot_windrose_np(
direction, var, kind=kind, by=by, rmax=rmax, ax=ax, **kwargs
direction,
var,
kind=kind,
by=by,
rmax=rmax,
ax=ax,
**kwargs,
)


Expand All @@ -975,7 +998,13 @@ def plot_windrose_df(
var = df[var_name].values
direction = df[direction_name].values
return plot_windrose_np(
direction, var, kind=kind, by=by, rmax=rmax, ax=ax, **kwargs
direction,
var,
kind=kind,
by=by,
rmax=rmax,
ax=ax,
**kwargs,
)


Expand Down