From 5082bff59a0c32ea055a96b5d5f39623c7de8dbd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 21:02:17 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v5.0.0) - [github.com/psf/black: 23.1.0 → 24.10.0](https://github.com/psf/black/compare/23.1.0...24.10.0) - [github.com/econchick/interrogate: 1.5.0 → 1.7.0](https://github.com/econchick/interrogate/compare/1.5.0...1.7.0) - [github.com/PyCQA/flake8: 6.0.0 → 7.1.1](https://github.com/PyCQA/flake8/compare/6.0.0...7.1.1) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 233758f..3d8f85d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,19 +2,19 @@ # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v5.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - id: check-added-large-files - repo: https://github.com/psf/black - rev: 23.1.0 + rev: 24.10.0 hooks: - id: black args: [--config, pyproject.toml] - repo: https://github.com/econchick/interrogate - rev: 1.5.0 + rev: 1.7.0 hooks: - id: interrogate args: [-c, pyproject.toml, -vv] @@ -24,7 +24,7 @@ repos: - id: darglint args: [-v 2] # this config makes the error messages a bit less cryptic. - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 7.1.1 hooks: - id: flake8 args: [--exclude, nbconvert_config.py] From 605574d11f1d95ebc61e2147e441ee971a7b172b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 21:02:36 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/tracing_ext-demo.py | 1 + pandas_flavor/__init__.py | 1 + pandas_flavor/__version__.py | 1 + pandas_flavor/register.py | 1 + pandas_flavor/xarray.py | 1 + setup.py | 1 + tests/test_pandas_register.py | 1 + 7 files changed, 7 insertions(+) diff --git a/docs/tracing_ext-demo.py b/docs/tracing_ext-demo.py index b8f4663..306edd1 100644 --- a/docs/tracing_ext-demo.py +++ b/docs/tracing_ext-demo.py @@ -1,4 +1,5 @@ """Tracing extension demo.""" + import time import pandas as pd diff --git a/pandas_flavor/__init__.py b/pandas_flavor/__init__.py index 554fee8..6d508d3 100644 --- a/pandas_flavor/__init__.py +++ b/pandas_flavor/__init__.py @@ -1,4 +1,5 @@ """Top-level API for pandas-flavor.""" + from .register import ( register_dataframe_accessor, register_dataframe_method, diff --git a/pandas_flavor/__version__.py b/pandas_flavor/__version__.py index 33da4ae..145fc03 100644 --- a/pandas_flavor/__version__.py +++ b/pandas_flavor/__version__.py @@ -1,2 +1,3 @@ """Version number.""" + __version__ = "0.6.0" diff --git a/pandas_flavor/register.py b/pandas_flavor/register.py index 24d9ed0..e51ba6b 100644 --- a/pandas_flavor/register.py +++ b/pandas_flavor/register.py @@ -1,4 +1,5 @@ """Register functions as methods of Pandas DataFrame and Series.""" + from functools import wraps from pandas.api.extensions import ( register_series_accessor, diff --git a/pandas_flavor/xarray.py b/pandas_flavor/xarray.py index e3e990f..1c36a66 100644 --- a/pandas_flavor/xarray.py +++ b/pandas_flavor/xarray.py @@ -1,4 +1,5 @@ """XArray support for pandas_flavor.""" + from xarray import register_dataarray_accessor, register_dataset_accessor from functools import wraps diff --git a/setup.py b/setup.py index 6e6a0e1..f9569c1 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ """Setup script.""" + import io import os import sys diff --git a/tests/test_pandas_register.py b/tests/test_pandas_register.py index 5237db5..6b6cbe4 100644 --- a/tests/test_pandas_register.py +++ b/tests/test_pandas_register.py @@ -1,4 +1,5 @@ """Tests for pandas series and dataframe method registration.""" + import pandas_flavor as pf import pandas as pd