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

Mark cudf._typing as a typing module in ruff #16318

Merged
merged 1 commit into from
Jul 19, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 63 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,69 @@ quiet-level = 3
line-length = 79

[tool.ruff.lint]
select = ["E", "F", "W", "D201", "D204", "D206", "D207", "D208", "D209", "D210", "D211", "D214", "D215", "D300", "D301", "D403", "D405", "D406", "D407", "D408", "D409", "D410", "D411", "D412", "D414", "D418", "TCH", "FA", "UP006", "UP007"]
typing-modules = ["cudf._typing"]
select = [
# pycodestyle Error
"E",
# Pyflakes
"F",
# pycodestyle Warning
"W",
# no-blank-line-before-function
"D201",
# one-blank-line-after-class
"D204",
# indent-with-spaces
"D206",
# under-indentation
"D207",
# over-indentation
"D208",
# new-line-after-last-paragraph
"D209",
# surrounding-whitespace
"D210",
# blank-line-before-class
"D211",
# section-not-over-indented
"D214",
# section-underline-not-over-indented
"D215",
# triple-single-quotes
"D300",
# escape-sequence-in-docstring
"D301",
# first-line-capitalized
"D403",
# capitalize-section-name
"D405",
# new-line-after-section-name
"D406",
# dashed-underline-after-section
"D407",
# section-underline-after-name
"D408",
# section-underline-matches-section-length
"D409",
# no-blank-line-after-section
"D410",
# no-blank-line-before-section
"D411",
# blank-lines-between-header-and-content
"D412",
# empty-docstring-section
"D414",
# overload-with-docstring
"D418",
# flake8-type-checking
"TCH",
# flake8-future-annotations
"FA",
# non-pep585-annotation
"UP006",
# non-pep604-annotation
"UP007"
]
ignore = [
# whitespace before :
"E203",
Expand Down
6 changes: 5 additions & 1 deletion python/cudf/cudf/core/resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,28 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import annotations

import pickle
import warnings
from typing import TYPE_CHECKING

import numpy as np
import pandas as pd

import cudf
import cudf._lib.labeling
import cudf.core.index
from cudf._typing import DataFrameOrSeries
from cudf.core.groupby.groupby import (
DataFrameGroupBy,
GroupBy,
SeriesGroupBy,
_Grouping,
)

if TYPE_CHECKING:
from cudf._typing import DataFrameOrSeries


class _Resampler(GroupBy):
grouping: "_ResampleGrouping"
Expand Down
Loading