diff --git a/.github/workflows/code-checks.yml b/.github/workflows/code-checks.yml index 58bef05940af1..9b691d3216706 100644 --- a/.github/workflows/code-checks.yml +++ b/.github/workflows/code-checks.yml @@ -74,7 +74,7 @@ jobs: - name: Install pyright # note: keep version in sync with .pre-commit-config.yaml - run: npm install -g pyright@1.1.212 + run: npm install -g pyright@1.1.225 - name: Build Pandas id: build diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2c58ccb52f9e5..0d33a6be6ccef 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -85,7 +85,7 @@ repos: types: [python] stages: [manual] # note: keep version in sync with .github/workflows/code-checks.yml - additional_dependencies: ['pyright@1.1.212'] + additional_dependencies: ['pyright@1.1.225'] - repo: local hooks: - id: flake8-rst diff --git a/pandas/_config/config.py b/pandas/_config/config.py index 8815bb46318c4..3932410a84204 100644 --- a/pandas/_config/config.py +++ b/pandas/_config/config.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ The config module holds package-wide configurables and provides a uniform API for working with them. diff --git a/pandas/_config/localization.py b/pandas/_config/localization.py index 2a487fa4b6877..2270c46c46acd 100644 --- a/pandas/_config/localization.py +++ b/pandas/_config/localization.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Helpers for configuring locale settings. diff --git a/pandas/_testing/__init__.py b/pandas/_testing/__init__.py index 1b236cdc99bed..c93134e88b330 100644 --- a/pandas/_testing/__init__.py +++ b/pandas/_testing/__init__.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import collections diff --git a/pandas/_testing/_io.py b/pandas/_testing/_io.py index 4c7e669f94734..174de74515f28 100644 --- a/pandas/_testing/_io.py +++ b/pandas/_testing/_io.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import bz2 diff --git a/pandas/_testing/asserters.py b/pandas/_testing/asserters.py index dda0d9549e7b3..5350433e3f354 100644 --- a/pandas/_testing/asserters.py +++ b/pandas/_testing/asserters.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from typing import cast diff --git a/pandas/compat/pickle_compat.py b/pandas/compat/pickle_compat.py index 2333324a7e22d..1fd05c9578596 100644 --- a/pandas/compat/pickle_compat.py +++ b/pandas/compat/pickle_compat.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Support pre-0.12 series pickle compatibility. """ diff --git a/pandas/conftest.py b/pandas/conftest.py index 8d5913ce0a9ae..e5618473e3aa9 100644 --- a/pandas/conftest.py +++ b/pandas/conftest.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ This file is very long and growing, but it was decided to not split it yet, as it's still manageable (2020-03-17, ~1.1k LoC). See gh-31989 diff --git a/pandas/core/algorithms.py b/pandas/core/algorithms.py index 8c838d8944d14..ac4b2257e616a 100644 --- a/pandas/core/algorithms.py +++ b/pandas/core/algorithms.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Generic data algorithms. This module is experimental at the moment and not intended for public consumption diff --git a/pandas/core/apply.py b/pandas/core/apply.py index 74a225bb18fd8..a2aa99d92e643 100644 --- a/pandas/core/apply.py +++ b/pandas/core/apply.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import abc diff --git a/pandas/core/array_algos/masked_reductions.py b/pandas/core/array_algos/masked_reductions.py index 3e59a267f7191..a48c1d9946a0c 100644 --- a/pandas/core/array_algos/masked_reductions.py +++ b/pandas/core/array_algos/masked_reductions.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ masked_reductions.py is for reduction algorithms using a mask-based approach for missing values. diff --git a/pandas/core/array_algos/quantile.py b/pandas/core/array_algos/quantile.py index 12c6691fe6c63..592e808d80833 100644 --- a/pandas/core/array_algos/quantile.py +++ b/pandas/core/array_algos/quantile.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import numpy as np diff --git a/pandas/core/array_algos/replace.py b/pandas/core/array_algos/replace.py index 19a44dbfe6f6d..7c0a20edcdd1a 100644 --- a/pandas/core/array_algos/replace.py +++ b/pandas/core/array_algos/replace.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Methods used by Block.replace and related methods. """ diff --git a/pandas/core/array_algos/take.py b/pandas/core/array_algos/take.py index 188725f003f1e..f829a186a17e7 100644 --- a/pandas/core/array_algos/take.py +++ b/pandas/core/array_algos/take.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import functools diff --git a/pandas/core/arrays/_mixins.py b/pandas/core/arrays/_mixins.py index cc58d7ddd03dc..5982a5e55dadd 100644 --- a/pandas/core/arrays/_mixins.py +++ b/pandas/core/arrays/_mixins.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from functools import wraps diff --git a/pandas/core/arrays/_ranges.py b/pandas/core/arrays/_ranges.py index 3909875e5660a..fdf2fd17b178b 100644 --- a/pandas/core/arrays/_ranges.py +++ b/pandas/core/arrays/_ranges.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Helper functions to generate range-like data for DatetimeArray (and possibly TimedeltaArray/PeriodArray) diff --git a/pandas/core/arrays/base.py b/pandas/core/arrays/base.py index 6392f819e3acf..f1308e26d669e 100644 --- a/pandas/core/arrays/base.py +++ b/pandas/core/arrays/base.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ An interface for extending pandas with custom arrays. diff --git a/pandas/core/arrays/boolean.py b/pandas/core/arrays/boolean.py index 10469f2aef9ea..c02dc9fd7ca75 100644 --- a/pandas/core/arrays/boolean.py +++ b/pandas/core/arrays/boolean.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import numbers diff --git a/pandas/core/arrays/categorical.py b/pandas/core/arrays/categorical.py index bea99a741fd6f..b98c19087c96c 100644 --- a/pandas/core/arrays/categorical.py +++ b/pandas/core/arrays/categorical.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from csv import QUOTE_NONNUMERIC diff --git a/pandas/core/arrays/datetimelike.py b/pandas/core/arrays/datetimelike.py index a0d9fab764811..bf492845f661b 100644 --- a/pandas/core/arrays/datetimelike.py +++ b/pandas/core/arrays/datetimelike.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from datetime import ( diff --git a/pandas/core/arrays/datetimes.py b/pandas/core/arrays/datetimes.py index 01347401c67c5..0685ab9cee903 100644 --- a/pandas/core/arrays/datetimes.py +++ b/pandas/core/arrays/datetimes.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from datetime import ( diff --git a/pandas/core/arrays/interval.py b/pandas/core/arrays/interval.py index 63f8fc0262199..6fc2433de40f9 100644 --- a/pandas/core/arrays/interval.py +++ b/pandas/core/arrays/interval.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import operator diff --git a/pandas/core/arrays/masked.py b/pandas/core/arrays/masked.py index 4dffd7e76dc2e..4542fa14abff3 100644 --- a/pandas/core/arrays/masked.py +++ b/pandas/core/arrays/masked.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from typing import ( diff --git a/pandas/core/arrays/numeric.py b/pandas/core/arrays/numeric.py index 3d957a2a1f34b..0235abce6bdd1 100644 --- a/pandas/core/arrays/numeric.py +++ b/pandas/core/arrays/numeric.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import numbers diff --git a/pandas/core/arrays/numpy_.py b/pandas/core/arrays/numpy_.py index d9c2ec0786ced..15f3d440106e5 100644 --- a/pandas/core/arrays/numpy_.py +++ b/pandas/core/arrays/numpy_.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import numpy as np diff --git a/pandas/core/arrays/period.py b/pandas/core/arrays/period.py index c0d913794c5f9..d026307a6ec07 100644 --- a/pandas/core/arrays/period.py +++ b/pandas/core/arrays/period.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from datetime import timedelta diff --git a/pandas/core/arrays/sparse/accessor.py b/pandas/core/arrays/sparse/accessor.py index 015ca8842ec78..40023a05f7021 100644 --- a/pandas/core/arrays/sparse/accessor.py +++ b/pandas/core/arrays/sparse/accessor.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """Sparse accessor""" import numpy as np diff --git a/pandas/core/arrays/sparse/array.py b/pandas/core/arrays/sparse/array.py index fe49a003cd863..39c6065b3f61e 100644 --- a/pandas/core/arrays/sparse/array.py +++ b/pandas/core/arrays/sparse/array.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ SparseArray data structure """ diff --git a/pandas/core/arrays/sparse/dtype.py b/pandas/core/arrays/sparse/dtype.py index 89c6f4da98f30..95a53d2e538e8 100644 --- a/pandas/core/arrays/sparse/dtype.py +++ b/pandas/core/arrays/sparse/dtype.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """Sparse Dtype""" from __future__ import annotations diff --git a/pandas/core/arrays/sparse/scipy_sparse.py b/pandas/core/arrays/sparse/scipy_sparse.py index 88e1778d4c854..2ccf8dcd9681c 100644 --- a/pandas/core/arrays/sparse/scipy_sparse.py +++ b/pandas/core/arrays/sparse/scipy_sparse.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Interaction with scipy.sparse matrices. diff --git a/pandas/core/arrays/string_.py b/pandas/core/arrays/string_.py index fce1942433cf7..ef5938a86192b 100644 --- a/pandas/core/arrays/string_.py +++ b/pandas/core/arrays/string_.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from typing import ( diff --git a/pandas/core/arrays/string_arrow.py b/pandas/core/arrays/string_arrow.py index 63fdf930f9ee6..c66f22a6b2f19 100644 --- a/pandas/core/arrays/string_arrow.py +++ b/pandas/core/arrays/string_arrow.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from collections.abc import Callable # noqa: PDF001 diff --git a/pandas/core/arrays/timedeltas.py b/pandas/core/arrays/timedeltas.py index 255b6e732ed9a..d28a563641ae6 100644 --- a/pandas/core/arrays/timedeltas.py +++ b/pandas/core/arrays/timedeltas.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from datetime import timedelta diff --git a/pandas/core/base.py b/pandas/core/base.py index 84bc6cb161bec..63a418f3646b7 100644 --- a/pandas/core/base.py +++ b/pandas/core/base.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Base and utility classes for pandas objects. """ diff --git a/pandas/core/common.py b/pandas/core/common.py index 62c2034505589..f37a62605fceb 100644 --- a/pandas/core/common.py +++ b/pandas/core/common.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Misc tools for implementing data structures diff --git a/pandas/core/computation/align.py b/pandas/core/computation/align.py index f14882227ddd9..34b6087c2fb09 100644 --- a/pandas/core/computation/align.py +++ b/pandas/core/computation/align.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Core eval alignment algorithms. """ diff --git a/pandas/core/computation/expr.py b/pandas/core/computation/expr.py index f8716ca1bafe0..38d30581f2ecd 100644 --- a/pandas/core/computation/expr.py +++ b/pandas/core/computation/expr.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ :func:`~pandas.eval` parsers. """ diff --git a/pandas/core/computation/ops.py b/pandas/core/computation/ops.py index 8758565cf9f2a..9e587aa8285bc 100644 --- a/pandas/core/computation/ops.py +++ b/pandas/core/computation/ops.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Operator classes for eval. """ diff --git a/pandas/core/computation/pytables.py b/pandas/core/computation/pytables.py index 3e041c088f566..a83c756f5189e 100644 --- a/pandas/core/computation/pytables.py +++ b/pandas/core/computation/pytables.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ manage PyTables query interface via Expressions """ from __future__ import annotations diff --git a/pandas/core/construction.py b/pandas/core/construction.py index 17cdf6665aa99..d2203145fc30f 100644 --- a/pandas/core/construction.py +++ b/pandas/core/construction.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Constructor functions intended to be shared by pd.array, Series.__init__, and Index.__new__. diff --git a/pandas/core/describe.py b/pandas/core/describe.py index 8d88ce280d5c8..e73b22f507fc1 100644 --- a/pandas/core/describe.py +++ b/pandas/core/describe.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Module responsible for execution of NDFrame.describe() method. diff --git a/pandas/core/dtypes/astype.py b/pandas/core/dtypes/astype.py index daae491b09c8a..053c31f520a41 100644 --- a/pandas/core/dtypes/astype.py +++ b/pandas/core/dtypes/astype.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Functions for implementing 'astype' methods according to pandas conventions, particularly ones that differ from numpy. diff --git a/pandas/core/dtypes/base.py b/pandas/core/dtypes/base.py index fa07b5fea5ea3..2e301ef962343 100644 --- a/pandas/core/dtypes/base.py +++ b/pandas/core/dtypes/base.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Extend pandas with custom array types. """ diff --git a/pandas/core/dtypes/cast.py b/pandas/core/dtypes/cast.py index 9f25dd90caefd..6277d576bbbcd 100644 --- a/pandas/core/dtypes/cast.py +++ b/pandas/core/dtypes/cast.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Routines for casting. """ diff --git a/pandas/core/dtypes/common.py b/pandas/core/dtypes/common.py index 6776064342db0..4abd59dcba824 100644 --- a/pandas/core/dtypes/common.py +++ b/pandas/core/dtypes/common.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Common type operations. """ diff --git a/pandas/core/dtypes/concat.py b/pandas/core/dtypes/concat.py index c61e9aaa59362..b4bd672839a33 100644 --- a/pandas/core/dtypes/concat.py +++ b/pandas/core/dtypes/concat.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Utility functions related to concat. """ diff --git a/pandas/core/dtypes/dtypes.py b/pandas/core/dtypes/dtypes.py index 072caa6a4b74f..bf11696ddca34 100644 --- a/pandas/core/dtypes/dtypes.py +++ b/pandas/core/dtypes/dtypes.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Define extension dtypes. """ diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 9d17827d55951..8f29e2fc78311 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ DataFrame --------- diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 83d0a95b8adb2..54e205a642665 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false # pyright: reportPropertyTypeMismatch=false from __future__ import annotations diff --git a/pandas/core/groupby/categorical.py b/pandas/core/groupby/categorical.py index 2a2671374efc4..2a1f609747335 100644 --- a/pandas/core/groupby/categorical.py +++ b/pandas/core/groupby/categorical.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import numpy as np diff --git a/pandas/core/groupby/generic.py b/pandas/core/groupby/generic.py index aef82392590d3..aef5405aedcbf 100644 --- a/pandas/core/groupby/generic.py +++ b/pandas/core/groupby/generic.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Define the SeriesGroupBy and DataFrameGroupBy classes that hold the groupby interfaces (and some implementations). diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index 65e8b238cd476..ad951fca44167 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Provide the groupby split-apply-combine paradigm. Define the GroupBy class providing the base-class of operations. diff --git a/pandas/core/groupby/grouper.py b/pandas/core/groupby/grouper.py index 3bffe59905a69..b6665ca05ad46 100644 --- a/pandas/core/groupby/grouper.py +++ b/pandas/core/groupby/grouper.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Provide user facing operators for doing the split part of the split-apply-combine paradigm. diff --git a/pandas/core/groupby/ops.py b/pandas/core/groupby/ops.py index 132c1d11dfe73..a100b7d72aee2 100644 --- a/pandas/core/groupby/ops.py +++ b/pandas/core/groupby/ops.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Provide classes to perform the groupby aggregate operations. diff --git a/pandas/core/indexers/utils.py b/pandas/core/indexers/utils.py index 8c38341e02e34..ea3e018785973 100644 --- a/pandas/core/indexers/utils.py +++ b/pandas/core/indexers/utils.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Low-dependency indexing utilities. """ diff --git a/pandas/core/indexes/accessors.py b/pandas/core/indexes/accessors.py index 8c2813f2b57ec..b53924d0ebf9f 100644 --- a/pandas/core/indexes/accessors.py +++ b/pandas/core/indexes/accessors.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ datetimelike delegation """ diff --git a/pandas/core/indexes/api.py b/pandas/core/indexes/api.py index 922c344510375..88bf89e8a2b15 100644 --- a/pandas/core/indexes/api.py +++ b/pandas/core/indexes/api.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import textwrap diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 2d3105939427c..d332615f5786a 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from datetime import datetime diff --git a/pandas/core/indexes/category.py b/pandas/core/indexes/category.py index c2bcd90ff10fb..805d5a81c5779 100644 --- a/pandas/core/indexes/category.py +++ b/pandas/core/indexes/category.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from typing import ( diff --git a/pandas/core/indexes/datetimelike.py b/pandas/core/indexes/datetimelike.py index 5c6fa8d771210..3e32594b51889 100644 --- a/pandas/core/indexes/datetimelike.py +++ b/pandas/core/indexes/datetimelike.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Base and utility classes for tseries type pandas objects. """ diff --git a/pandas/core/indexes/datetimes.py b/pandas/core/indexes/datetimes.py index 4acdc7e6c7556..3ba35f9367bf6 100644 --- a/pandas/core/indexes/datetimes.py +++ b/pandas/core/indexes/datetimes.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from datetime import ( diff --git a/pandas/core/indexes/extension.py b/pandas/core/indexes/extension.py index 28a0b43d5b02b..bf5e26c07af89 100644 --- a/pandas/core/indexes/extension.py +++ b/pandas/core/indexes/extension.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Shared methods for Index subclasses backed by ExtensionArray. """ diff --git a/pandas/core/indexes/frozen.py b/pandas/core/indexes/frozen.py index ed5cf047ab59f..fec804e0bcc54 100644 --- a/pandas/core/indexes/frozen.py +++ b/pandas/core/indexes/frozen.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ frozen (immutable) data structures to support MultiIndexing diff --git a/pandas/core/indexes/interval.py b/pandas/core/indexes/interval.py index c1d7eb972e1f4..fe15e65bf3a5a 100644 --- a/pandas/core/indexes/interval.py +++ b/pandas/core/indexes/interval.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ define the IntervalIndex """ from __future__ import annotations diff --git a/pandas/core/indexes/multi.py b/pandas/core/indexes/multi.py index f40857059a794..debace8c1e7d7 100644 --- a/pandas/core/indexes/multi.py +++ b/pandas/core/indexes/multi.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from functools import wraps diff --git a/pandas/core/indexes/numeric.py b/pandas/core/indexes/numeric.py index d4cb4a20be66b..89d7cb0057f7b 100644 --- a/pandas/core/indexes/numeric.py +++ b/pandas/core/indexes/numeric.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from typing import ( diff --git a/pandas/core/indexes/period.py b/pandas/core/indexes/period.py index a296ce130bbf5..647ad771d0656 100644 --- a/pandas/core/indexes/period.py +++ b/pandas/core/indexes/period.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from datetime import ( diff --git a/pandas/core/indexes/range.py b/pandas/core/indexes/range.py index fdb1ee754a7e6..c815399498b0c 100644 --- a/pandas/core/indexes/range.py +++ b/pandas/core/indexes/range.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from datetime import timedelta diff --git a/pandas/core/indexes/timedeltas.py b/pandas/core/indexes/timedeltas.py index 0249bf51f71b7..511fce68cfef6 100644 --- a/pandas/core/indexes/timedeltas.py +++ b/pandas/core/indexes/timedeltas.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ implement the TimedeltaIndex """ from __future__ import annotations diff --git a/pandas/core/indexing.py b/pandas/core/indexing.py index b873ffc6ee487..828875019af90 100644 --- a/pandas/core/indexing.py +++ b/pandas/core/indexing.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from contextlib import suppress diff --git a/pandas/core/internals/api.py b/pandas/core/internals/api.py index 371f1e2443b36..cc7a76ef11a23 100644 --- a/pandas/core/internals/api.py +++ b/pandas/core/internals/api.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ This is a pseudo-public API for downstream libraries. We ask that downstream authors diff --git a/pandas/core/internals/array_manager.py b/pandas/core/internals/array_manager.py index 3e499c99ac144..70a7c3d92e1b5 100644 --- a/pandas/core/internals/array_manager.py +++ b/pandas/core/internals/array_manager.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Experimental manager based on storing a collection of 1D arrays """ diff --git a/pandas/core/internals/base.py b/pandas/core/internals/base.py index d8d1b6a34526c..11a3a22b68612 100644 --- a/pandas/core/internals/base.py +++ b/pandas/core/internals/base.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Base class for the internal managers. Both BlockManager and ArrayManager inherit from this class. diff --git a/pandas/core/internals/blocks.py b/pandas/core/internals/blocks.py index 3693edbae7d95..3efa10a31433c 100644 --- a/pandas/core/internals/blocks.py +++ b/pandas/core/internals/blocks.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from functools import wraps diff --git a/pandas/core/internals/concat.py b/pandas/core/internals/concat.py index 991e4bbf4fbdb..3bb80b037345f 100644 --- a/pandas/core/internals/concat.py +++ b/pandas/core/internals/concat.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import itertools diff --git a/pandas/core/internals/construction.py b/pandas/core/internals/construction.py index 8451dcb6e412a..69c083ed88720 100644 --- a/pandas/core/internals/construction.py +++ b/pandas/core/internals/construction.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Functions for preparing various inputs passed to the DataFrame or Series constructors before passing them to a BlockManager. diff --git a/pandas/core/internals/managers.py b/pandas/core/internals/managers.py index 4b8f1aae75b1b..f0be0ba5ac4e8 100644 --- a/pandas/core/internals/managers.py +++ b/pandas/core/internals/managers.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import itertools diff --git a/pandas/core/missing.py b/pandas/core/missing.py index 46ea23e431d15..3879d5961f285 100644 --- a/pandas/core/missing.py +++ b/pandas/core/missing.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Routines for filling missing data. """ diff --git a/pandas/core/nanops.py b/pandas/core/nanops.py index 9dcc1c8222791..fa506a0d194d7 100644 --- a/pandas/core/nanops.py +++ b/pandas/core/nanops.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import functools diff --git a/pandas/core/ops/__init__.py b/pandas/core/ops/__init__.py index 540a557f7c7cc..4a1f78577dc1a 100644 --- a/pandas/core/ops/__init__.py +++ b/pandas/core/ops/__init__.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Arithmetic operations for PandasObjects diff --git a/pandas/core/ops/array_ops.py b/pandas/core/ops/array_ops.py index 2caaadbc05cff..0c67e273c1610 100644 --- a/pandas/core/ops/array_ops.py +++ b/pandas/core/ops/array_ops.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Functions for arithmetic and comparison operations on NumPy arrays and ExtensionArrays. diff --git a/pandas/core/ops/common.py b/pandas/core/ops/common.py index b883fe7751daa..f05e7a849d8e2 100644 --- a/pandas/core/ops/common.py +++ b/pandas/core/ops/common.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Boilerplate functions used in defining binary operations. """ diff --git a/pandas/core/resample.py b/pandas/core/resample.py index 53d75255da536..adeec7cd2b562 100644 --- a/pandas/core/resample.py +++ b/pandas/core/resample.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import copy diff --git a/pandas/core/reshape/concat.py b/pandas/core/reshape/concat.py index 278977b0018b2..8c344617adbca 100644 --- a/pandas/core/reshape/concat.py +++ b/pandas/core/reshape/concat.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Concat routines. """ diff --git a/pandas/core/reshape/encoding.py b/pandas/core/reshape/encoding.py index f0500ec142955..880b3131ae214 100644 --- a/pandas/core/reshape/encoding.py +++ b/pandas/core/reshape/encoding.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import itertools diff --git a/pandas/core/reshape/melt.py b/pandas/core/reshape/melt.py index 262cd9774f694..488f8e63abae4 100644 --- a/pandas/core/reshape/melt.py +++ b/pandas/core/reshape/melt.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import re diff --git a/pandas/core/reshape/merge.py b/pandas/core/reshape/merge.py index 46f74c5fc67e7..6aeeb26816cee 100644 --- a/pandas/core/reshape/merge.py +++ b/pandas/core/reshape/merge.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ SQL-style merge routines """ diff --git a/pandas/core/reshape/pivot.py b/pandas/core/reshape/pivot.py index b428155e722ff..64cc507145acb 100644 --- a/pandas/core/reshape/pivot.py +++ b/pandas/core/reshape/pivot.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from typing import ( diff --git a/pandas/core/reshape/reshape.py b/pandas/core/reshape/reshape.py index 931cbd8c2ab56..51f599126e6ee 100644 --- a/pandas/core/reshape/reshape.py +++ b/pandas/core/reshape/reshape.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import itertools diff --git a/pandas/core/reshape/tile.py b/pandas/core/reshape/tile.py index d8c4f3f3da765..c94e7a298837c 100644 --- a/pandas/core/reshape/tile.py +++ b/pandas/core/reshape/tile.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Quantilization functions and related stuff """ diff --git a/pandas/core/sample.py b/pandas/core/sample.py index 16fca2d0ff1b4..db2fbab3d7e75 100644 --- a/pandas/core/sample.py +++ b/pandas/core/sample.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Module containing utilities for NDFrame.sample() and .GroupBy.sample() """ diff --git a/pandas/core/series.py b/pandas/core/series.py index 78f353ff8c70c..e923044b8a083 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Data structure for 1-dimensional cross-sectional and time series data """ diff --git a/pandas/core/sorting.py b/pandas/core/sorting.py index d41947510c1bb..a8de84de66644 100644 --- a/pandas/core/sorting.py +++ b/pandas/core/sorting.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ miscellaneous sorting / groupby utilities """ from __future__ import annotations diff --git a/pandas/core/strings/accessor.py b/pandas/core/strings/accessor.py index f9dd17df6a47b..b82920590ca8c 100644 --- a/pandas/core/strings/accessor.py +++ b/pandas/core/strings/accessor.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import codecs diff --git a/pandas/core/strings/object_array.py b/pandas/core/strings/object_array.py index 2f65ce17f93b2..ea0d191defc54 100644 --- a/pandas/core/strings/object_array.py +++ b/pandas/core/strings/object_array.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from collections.abc import Callable # noqa: PDF001 diff --git a/pandas/core/tools/datetimes.py b/pandas/core/tools/datetimes.py index 21683ed100c72..4321ca28e9dd8 100644 --- a/pandas/core/tools/datetimes.py +++ b/pandas/core/tools/datetimes.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from collections import abc diff --git a/pandas/core/tools/numeric.py b/pandas/core/tools/numeric.py index ef7f4bc92e25b..95724205d95f7 100644 --- a/pandas/core/tools/numeric.py +++ b/pandas/core/tools/numeric.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import numpy as np diff --git a/pandas/core/tools/times.py b/pandas/core/tools/times.py index 030cee3f678f4..037ca0d9dae0e 100644 --- a/pandas/core/tools/times.py +++ b/pandas/core/tools/times.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from datetime import ( diff --git a/pandas/core/util/hashing.py b/pandas/core/util/hashing.py index 5a5e46e0227aa..f93e37c4f930a 100644 --- a/pandas/core/util/hashing.py +++ b/pandas/core/util/hashing.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ data hash pandas / numpy objects """ diff --git a/pandas/core/util/numba_.py b/pandas/core/util/numba_.py index be798e022ac6e..13b9d2b8ed0b4 100644 --- a/pandas/core/util/numba_.py +++ b/pandas/core/util/numba_.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """Common utilities for Numba operations""" from __future__ import annotations diff --git a/pandas/core/window/common.py b/pandas/core/window/common.py index 15144116fa924..7610065943a7b 100644 --- a/pandas/core/window/common.py +++ b/pandas/core/window/common.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """Common utility functions for rolling operations""" from collections import defaultdict from typing import cast diff --git a/pandas/core/window/ewm.py b/pandas/core/window/ewm.py index 4c2b99762b812..021cf7d10cc1f 100644 --- a/pandas/core/window/ewm.py +++ b/pandas/core/window/ewm.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import datetime diff --git a/pandas/core/window/rolling.py b/pandas/core/window/rolling.py index 269bef32a0f39..0cbb05a519bf8 100644 --- a/pandas/core/window/rolling.py +++ b/pandas/core/window/rolling.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Provide a generic structure to support window functions, similar to how we have a Groupby object. diff --git a/pandas/io/clipboards.py b/pandas/io/clipboards.py index 0968f1facf128..e77723db0ac81 100644 --- a/pandas/io/clipboards.py +++ b/pandas/io/clipboards.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ io on the clipboard """ from __future__ import annotations diff --git a/pandas/io/common.py b/pandas/io/common.py index d556952bfcd78..be131612894fd 100644 --- a/pandas/io/common.py +++ b/pandas/io/common.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """Common IO api utilities""" from __future__ import annotations diff --git a/pandas/io/excel/_base.py b/pandas/io/excel/_base.py index 8ad7d27adff87..1c6ecc47b6cfa 100644 --- a/pandas/io/excel/_base.py +++ b/pandas/io/excel/_base.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import abc diff --git a/pandas/io/excel/_odfreader.py b/pandas/io/excel/_odfreader.py index 384813b6ec65d..aae2ba5ea7849 100644 --- a/pandas/io/excel/_odfreader.py +++ b/pandas/io/excel/_odfreader.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from typing import ( diff --git a/pandas/io/excel/_odswriter.py b/pandas/io/excel/_odswriter.py index 94f173c1469e0..c8fce65026d8c 100644 --- a/pandas/io/excel/_odswriter.py +++ b/pandas/io/excel/_odswriter.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from collections import defaultdict diff --git a/pandas/io/excel/_openpyxl.py b/pandas/io/excel/_openpyxl.py index a2b1fbcce2b6d..d11f9fa051413 100644 --- a/pandas/io/excel/_openpyxl.py +++ b/pandas/io/excel/_openpyxl.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import mmap diff --git a/pandas/io/excel/_pyxlsb.py b/pandas/io/excel/_pyxlsb.py index 226361605df01..141a050d25b56 100644 --- a/pandas/io/excel/_pyxlsb.py +++ b/pandas/io/excel/_pyxlsb.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false # pyright: reportMissingImports=false from __future__ import annotations diff --git a/pandas/io/excel/_xlrd.py b/pandas/io/excel/_xlrd.py index 897011252f532..11180d8755da3 100644 --- a/pandas/io/excel/_xlrd.py +++ b/pandas/io/excel/_xlrd.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from datetime import time import numpy as np diff --git a/pandas/io/excel/_xlsxwriter.py b/pandas/io/excel/_xlsxwriter.py index 45fe4713ce194..f765441fa0423 100644 --- a/pandas/io/excel/_xlsxwriter.py +++ b/pandas/io/excel/_xlsxwriter.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from typing import Any diff --git a/pandas/io/excel/_xlwt.py b/pandas/io/excel/_xlwt.py index 871fcbd3a8475..85a982d72e97b 100644 --- a/pandas/io/excel/_xlwt.py +++ b/pandas/io/excel/_xlwt.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from typing import ( diff --git a/pandas/io/formats/csvs.py b/pandas/io/formats/csvs.py index cfbd2d9c9c8da..62e5c9333017b 100644 --- a/pandas/io/formats/csvs.py +++ b/pandas/io/formats/csvs.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Module for formatting output data into CSV files. """ diff --git a/pandas/io/formats/excel.py b/pandas/io/formats/excel.py index 5371957365eae..39b8ab3536f51 100644 --- a/pandas/io/formats/excel.py +++ b/pandas/io/formats/excel.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Utilities for conversion to writer-agnostic Excel representation. """ diff --git a/pandas/io/formats/format.py b/pandas/io/formats/format.py index 4bc45e290ce4a..a5dd6ae51ccaf 100644 --- a/pandas/io/formats/format.py +++ b/pandas/io/formats/format.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Internal module for formatting output data in csv, html, xml, and latex files. This module also applies to display formatting. diff --git a/pandas/io/formats/html.py b/pandas/io/formats/html.py index 0c927277e899a..62840b680764a 100644 --- a/pandas/io/formats/html.py +++ b/pandas/io/formats/html.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Module for formatting output data in HTML. """ diff --git a/pandas/io/formats/info.py b/pandas/io/formats/info.py index dbdb1b1b96984..e3e22aafc69fa 100644 --- a/pandas/io/formats/info.py +++ b/pandas/io/formats/info.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from abc import ( diff --git a/pandas/io/formats/printing.py b/pandas/io/formats/printing.py index 77431533e703a..4a8f04c8a89ce 100644 --- a/pandas/io/formats/printing.py +++ b/pandas/io/formats/printing.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Printing tools. """ diff --git a/pandas/io/formats/style.py b/pandas/io/formats/style.py index 15b2381c40d24..65bef3c60e9ce 100644 --- a/pandas/io/formats/style.py +++ b/pandas/io/formats/style.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Module for applying conditional formatting to DataFrames and Series. """ diff --git a/pandas/io/formats/style_render.py b/pandas/io/formats/style_render.py index 0b3500cb34f87..94ca504651f65 100644 --- a/pandas/io/formats/style_render.py +++ b/pandas/io/formats/style_render.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from collections import defaultdict diff --git a/pandas/io/formats/xml.py b/pandas/io/formats/xml.py index a5e53edcdb02b..14e22ee2cb0be 100644 --- a/pandas/io/formats/xml.py +++ b/pandas/io/formats/xml.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ :mod:`pandas.io.formats.xml` is a module for formatting data in XML. """ diff --git a/pandas/io/html.py b/pandas/io/html.py index 05d7c2998ef27..3479d71c9ea56 100644 --- a/pandas/io/html.py +++ b/pandas/io/html.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ :mod:`pandas.io.html` is a module containing functionality for dealing with HTML IO. diff --git a/pandas/io/json/_json.py b/pandas/io/json/_json.py index ab04240e8e791..a086dab583c99 100644 --- a/pandas/io/json/_json.py +++ b/pandas/io/json/_json.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from abc import ( diff --git a/pandas/io/json/_normalize.py b/pandas/io/json/_normalize.py index 36a7949a9f1e3..8b80be46264f5 100644 --- a/pandas/io/json/_normalize.py +++ b/pandas/io/json/_normalize.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false # --------------------------------------------------------------------- # JSON normalization routines from __future__ import annotations diff --git a/pandas/io/json/_table_schema.py b/pandas/io/json/_table_schema.py index c630f0d7613e0..58cc13ace42a9 100644 --- a/pandas/io/json/_table_schema.py +++ b/pandas/io/json/_table_schema.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Table Schema builders diff --git a/pandas/io/parquet.py b/pandas/io/parquet.py index 1b8526275c155..86e4434474b55 100644 --- a/pandas/io/parquet.py +++ b/pandas/io/parquet.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ parquet compat """ from __future__ import annotations diff --git a/pandas/io/parsers/arrow_parser_wrapper.py b/pandas/io/parsers/arrow_parser_wrapper.py index 618da9d33c490..4c84b64578177 100644 --- a/pandas/io/parsers/arrow_parser_wrapper.py +++ b/pandas/io/parsers/arrow_parser_wrapper.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from pandas._typing import ReadBuffer diff --git a/pandas/io/parsers/base_parser.py b/pandas/io/parsers/base_parser.py index e071e281d5a90..60ee77484aea6 100644 --- a/pandas/io/parsers/base_parser.py +++ b/pandas/io/parsers/base_parser.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from collections import defaultdict diff --git a/pandas/io/parsers/c_parser_wrapper.py b/pandas/io/parsers/c_parser_wrapper.py index e8909f542f335..5d307589bd23f 100644 --- a/pandas/io/parsers/c_parser_wrapper.py +++ b/pandas/io/parsers/c_parser_wrapper.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from typing import ( diff --git a/pandas/io/parsers/python_parser.py b/pandas/io/parsers/python_parser.py index eac8e3b08083d..68a1a87856128 100644 --- a/pandas/io/parsers/python_parser.py +++ b/pandas/io/parsers/python_parser.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from collections import ( diff --git a/pandas/io/parsers/readers.py b/pandas/io/parsers/readers.py index c5b84dd18ec13..1332f5a909166 100644 --- a/pandas/io/parsers/readers.py +++ b/pandas/io/parsers/readers.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Module contains tools for processing files into DataFrames or other objects """ diff --git a/pandas/io/pytables.py b/pandas/io/pytables.py index 7c784c1489617..ac7ed90d244d1 100644 --- a/pandas/io/pytables.py +++ b/pandas/io/pytables.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ High level interface to PyTables for reading and writing pandas data structures to disk diff --git a/pandas/io/sas/sas7bdat.py b/pandas/io/sas/sas7bdat.py index ef77ff286c780..9f2b36aee53e3 100644 --- a/pandas/io/sas/sas7bdat.py +++ b/pandas/io/sas/sas7bdat.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Read SAS7BDAT files diff --git a/pandas/io/sas/sasreader.py b/pandas/io/sas/sasreader.py index f50fc777f55e9..deee011e19046 100644 --- a/pandas/io/sas/sasreader.py +++ b/pandas/io/sas/sasreader.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Read SAS sas7bdat or xport files. """ diff --git a/pandas/io/sql.py b/pandas/io/sql.py index e004e9c1ecbcc..8d1b4c26b761c 100644 --- a/pandas/io/sql.py +++ b/pandas/io/sql.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Collection of query wrappers / abstractions to both facilitate data retrieval and to reduce dependency on DB-specific API. diff --git a/pandas/io/stata.py b/pandas/io/stata.py index 60c4634662296..4699e5a77c398 100644 --- a/pandas/io/stata.py +++ b/pandas/io/stata.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ Module contains tools for processing Stata files into DataFrames diff --git a/pandas/io/xml.py b/pandas/io/xml.py index 01535d0c65581..50912d4854ac4 100644 --- a/pandas/io/xml.py +++ b/pandas/io/xml.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ :mod:`pandas.io.xml` is a module for reading XML. """ diff --git a/pandas/plotting/_core.py b/pandas/plotting/_core.py index 85bc3121f5e4e..d83830d30f82c 100644 --- a/pandas/plotting/_core.py +++ b/pandas/plotting/_core.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import importlib diff --git a/pandas/plotting/_matplotlib/boxplot.py b/pandas/plotting/_matplotlib/boxplot.py index 74605021385f5..4dc60d70fe96d 100644 --- a/pandas/plotting/_matplotlib/boxplot.py +++ b/pandas/plotting/_matplotlib/boxplot.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from typing import ( diff --git a/pandas/plotting/_matplotlib/converter.py b/pandas/plotting/_matplotlib/converter.py index 6c40770b4fac5..de76c3035ccfa 100644 --- a/pandas/plotting/_matplotlib/converter.py +++ b/pandas/plotting/_matplotlib/converter.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import contextlib diff --git a/pandas/plotting/_matplotlib/core.py b/pandas/plotting/_matplotlib/core.py index 41bd1df81ef61..0f9612583cd5a 100644 --- a/pandas/plotting/_matplotlib/core.py +++ b/pandas/plotting/_matplotlib/core.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from typing import ( diff --git a/pandas/plotting/_matplotlib/hist.py b/pandas/plotting/_matplotlib/hist.py index 08cffbf475db0..f8cf7ee2be057 100644 --- a/pandas/plotting/_matplotlib/hist.py +++ b/pandas/plotting/_matplotlib/hist.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from typing import TYPE_CHECKING diff --git a/pandas/plotting/_matplotlib/misc.py b/pandas/plotting/_matplotlib/misc.py index 6583328f916f1..fffe18e2a4c99 100644 --- a/pandas/plotting/_matplotlib/misc.py +++ b/pandas/plotting/_matplotlib/misc.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import random diff --git a/pandas/plotting/_matplotlib/style.py b/pandas/plotting/_matplotlib/style.py index 597c0dafa8cab..4472ba0f5e185 100644 --- a/pandas/plotting/_matplotlib/style.py +++ b/pandas/plotting/_matplotlib/style.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import itertools diff --git a/pandas/plotting/_matplotlib/timeseries.py b/pandas/plotting/_matplotlib/timeseries.py index 303266ae410de..ce585e8e9c33a 100644 --- a/pandas/plotting/_matplotlib/timeseries.py +++ b/pandas/plotting/_matplotlib/timeseries.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false # TODO: Use the fact that axis can have units to simplify the process from __future__ import annotations diff --git a/pandas/plotting/_matplotlib/tools.py b/pandas/plotting/_matplotlib/tools.py index 30af4f90d6869..737a92b06910f 100644 --- a/pandas/plotting/_matplotlib/tools.py +++ b/pandas/plotting/_matplotlib/tools.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false # being a bit too dynamic from __future__ import annotations diff --git a/pandas/tseries/frequencies.py b/pandas/tseries/frequencies.py index 1088b3b1a79ea..f430d993f7ff0 100644 --- a/pandas/tseries/frequencies.py +++ b/pandas/tseries/frequencies.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations import warnings diff --git a/pandas/tseries/holiday.py b/pandas/tseries/holiday.py index 365406617ab46..bbc8a196ff439 100644 --- a/pandas/tseries/holiday.py +++ b/pandas/tseries/holiday.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from datetime import ( diff --git a/pandas/util/_decorators.py b/pandas/util/_decorators.py index 39a729bc51f35..697f01c8fceab 100644 --- a/pandas/util/_decorators.py +++ b/pandas/util/_decorators.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false from __future__ import annotations from functools import wraps diff --git a/pandas/util/_test_decorators.py b/pandas/util/_test_decorators.py index 10322a25ffd18..676c6c6101bd2 100644 --- a/pandas/util/_test_decorators.py +++ b/pandas/util/_test_decorators.py @@ -1,3 +1,4 @@ +# pyright: reportGeneralTypeIssues = false """ This module provides decorator functions which can be applied to test objects in order to skip those objects when certain conditions occur. A sample use case diff --git a/pyproject.toml b/pyproject.toml index 19fd5335bfa9a..aff731cbc74cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -151,8 +151,7 @@ skip = "pandas/__init__.py" pythonVersion = "3.8" typeCheckingMode = "basic" include = ["pandas", "typings"] -exclude = ["pandas/tests", "pandas/io/clipboard", "pandas/util/version"] -reportGeneralTypeIssues = false +exclude = ["pandas/_version.py", "pandas/tests", "pandas/io/clipboard", "pandas/util/version"] reportConstantRedefinition = false reportFunctionMemberAccess = false reportImportCycles = false