Skip to content

Commit

Permalink
Merge pull request #250 from python-windrose/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
ocefpaf committed Jul 4, 2023
2 parents fc1a661 + 541c451 commit 0b42efe
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 26 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
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
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
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

0 comments on commit 0b42efe

Please sign in to comment.