From ec3643ca1860f97706ca378544f59257c94947d4 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Fri, 29 Dec 2023 11:53:09 -1000 Subject: [PATCH] Backport PR #56666: STY: Use ruff instead of pygrep check for future annotation import --- .pre-commit-config.yaml | 12 ------------ pyproject.toml | 2 ++ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7f3fc95ce00cc..4b02ad7cf886f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -358,18 +358,6 @@ repos: files: ^pandas/ exclude: ^(pandas/_libs/|pandas/tests/|pandas/errors/__init__.py$|pandas/_version.py) types: [python] - - id: future-annotations - name: import annotations from __future__ - entry: 'from __future__ import annotations' - language: pygrep - args: [--negate] - files: ^pandas/ - types: [python] - exclude: | - (?x) - /(__init__\.py)|(api\.py)|(_version\.py)|(testing\.py)|(conftest\.py)$ - |/tests/ - |/_testing/ - id: check-test-naming name: check that test names start with 'test' entry: python -m scripts.check_test_naming diff --git a/pyproject.toml b/pyproject.toml index 5e65edf81f9c7..8724a25909543 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -259,6 +259,8 @@ select = [ "FLY", # flake8-logging-format "G", + # flake8-future-annotations + "FA", ] ignore = [