pyproject.toml 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819
  1. [build-system]
  2. # Minimum requirements for the build system to execute.
  3. # See https://github.com/scipy/scipy/pull/12940 for the AIX issue.
  4. requires = [
  5. "meson-python>=0.13.1",
  6. "meson>=1.2.1,<2",
  7. "wheel",
  8. "Cython<4.0.0a0", # Note: sync with setup.py, environment.yml and asv.conf.json
  9. # Force numpy higher than 2.0rc1, so that built wheels are compatible
  10. # with both numpy 1 and 2
  11. "numpy>=2.0",
  12. "versioneer[toml]"
  13. ]
  14. build-backend = "mesonpy"
  15. [project]
  16. name = 'pandas'
  17. dynamic = [
  18. 'version'
  19. ]
  20. description = 'Powerful data structures for data analysis, time series, and statistics'
  21. readme = 'README.md'
  22. authors = [
  23. { name = 'The Pandas Development Team', email='pandas-dev@python.org' },
  24. ]
  25. license = {file = 'LICENSE'}
  26. requires-python = '>=3.9'
  27. dependencies = [
  28. "numpy>=1.22.4; python_version<'3.11'",
  29. "numpy>=1.23.2; python_version=='3.11'",
  30. "numpy>=1.26.0; python_version>='3.12'",
  31. "python-dateutil>=2.8.2",
  32. "pytz>=2020.1",
  33. "tzdata>=2022.7"
  34. ]
  35. classifiers = [
  36. 'Development Status :: 5 - Production/Stable',
  37. 'Environment :: Console',
  38. 'Intended Audience :: Science/Research',
  39. 'License :: OSI Approved :: BSD License',
  40. 'Operating System :: OS Independent',
  41. 'Programming Language :: Cython',
  42. 'Programming Language :: Python',
  43. 'Programming Language :: Python :: 3',
  44. 'Programming Language :: Python :: 3 :: Only',
  45. 'Programming Language :: Python :: 3.9',
  46. 'Programming Language :: Python :: 3.10',
  47. 'Programming Language :: Python :: 3.11',
  48. 'Programming Language :: Python :: 3.12',
  49. 'Programming Language :: Python :: 3.13',
  50. 'Programming Language :: Python :: 3.14',
  51. 'Topic :: Scientific/Engineering'
  52. ]
  53. [project.urls]
  54. homepage = 'https://pandas.pydata.org'
  55. documentation = 'https://pandas.pydata.org/docs/'
  56. repository = 'https://github.com/pandas-dev/pandas'
  57. [project.entry-points."pandas_plotting_backends"]
  58. matplotlib = "pandas:plotting._matplotlib"
  59. [project.optional-dependencies]
  60. test = ['hypothesis>=6.46.1', 'pytest>=7.3.2', 'pytest-xdist>=2.2.0']
  61. pyarrow = ['pyarrow>=10.0.1']
  62. performance = ['bottleneck>=1.3.6', 'numba>=0.56.4', 'numexpr>=2.8.4']
  63. computation = ['scipy>=1.10.0', 'xarray>=2022.12.0']
  64. fss = ['fsspec>=2022.11.0']
  65. aws = ['s3fs>=2022.11.0']
  66. gcp = ['gcsfs>=2022.11.0', 'pandas-gbq>=0.19.0']
  67. excel = ['odfpy>=1.4.1', 'openpyxl>=3.1.0', 'python-calamine>=0.1.7', 'pyxlsb>=1.0.10', 'xlrd>=2.0.1', 'xlsxwriter>=3.0.5']
  68. parquet = ['pyarrow>=10.0.1']
  69. feather = ['pyarrow>=10.0.1']
  70. hdf5 = [# blosc only available on conda (https://github.com/Blosc/python-blosc/issues/297)
  71. #'blosc>=1.20.1',
  72. 'tables>=3.8.0']
  73. spss = ['pyreadstat>=1.2.0']
  74. postgresql = ['SQLAlchemy>=2.0.0', 'psycopg2>=2.9.6', 'adbc-driver-postgresql>=0.8.0']
  75. mysql = ['SQLAlchemy>=2.0.0', 'pymysql>=1.0.2']
  76. sql-other = ['SQLAlchemy>=2.0.0', 'adbc-driver-postgresql>=0.8.0', 'adbc-driver-sqlite>=0.8.0']
  77. html = ['beautifulsoup4>=4.11.2', 'html5lib>=1.1', 'lxml>=4.9.2']
  78. xml = ['lxml>=4.9.2']
  79. plot = ['matplotlib>=3.6.3']
  80. output-formatting = ['jinja2>=3.1.2', 'tabulate>=0.9.0']
  81. clipboard = ['PyQt5>=5.15.9', 'qtpy>=2.3.0']
  82. compression = ['zstandard>=0.19.0']
  83. consortium-standard = ['dataframe-api-compat>=0.1.7']
  84. all = ['adbc-driver-postgresql>=0.8.0',
  85. 'adbc-driver-sqlite>=0.8.0',
  86. 'beautifulsoup4>=4.11.2',
  87. # blosc only available on conda (https://github.com/Blosc/python-blosc/issues/297)
  88. #'blosc>=1.21.3',
  89. 'bottleneck>=1.3.6',
  90. 'dataframe-api-compat>=0.1.7',
  91. 'fastparquet>=2022.12.0',
  92. 'fsspec>=2022.11.0',
  93. 'gcsfs>=2022.11.0',
  94. 'html5lib>=1.1',
  95. 'hypothesis>=6.46.1',
  96. 'jinja2>=3.1.2',
  97. 'lxml>=4.9.2',
  98. 'matplotlib>=3.6.3',
  99. 'numba>=0.56.4',
  100. 'numexpr>=2.8.4',
  101. 'odfpy>=1.4.1',
  102. 'openpyxl>=3.1.0',
  103. 'pandas-gbq>=0.19.0',
  104. 'psycopg2>=2.9.6',
  105. 'pyarrow>=10.0.1',
  106. 'pymysql>=1.0.2',
  107. 'PyQt5>=5.15.9',
  108. 'pyreadstat>=1.2.0',
  109. 'pytest>=7.3.2',
  110. 'pytest-xdist>=2.2.0',
  111. 'python-calamine>=0.1.7',
  112. 'pyxlsb>=1.0.10',
  113. 'qtpy>=2.3.0',
  114. 'scipy>=1.10.0',
  115. 's3fs>=2022.11.0',
  116. 'SQLAlchemy>=2.0.0',
  117. 'tables>=3.8.0',
  118. 'tabulate>=0.9.0',
  119. 'xarray>=2022.12.0',
  120. 'xlrd>=2.0.1',
  121. 'xlsxwriter>=3.0.5',
  122. 'zstandard>=0.19.0']
  123. # TODO: Remove after setuptools support is dropped.
  124. [tool.setuptools]
  125. include-package-data = true
  126. [tool.setuptools.packages.find]
  127. include = ["pandas", "pandas.*"]
  128. namespaces = false
  129. [tool.setuptools.exclude-package-data]
  130. "*" = ["*.c", "*.h"]
  131. # See the docstring in versioneer.py for instructions. Note that you must
  132. # re-run 'versioneer.py setup' after changing this section, and commit the
  133. # resulting files.
  134. [tool.versioneer]
  135. VCS = "git"
  136. style = "pep440"
  137. versionfile_source = "pandas/_version.py"
  138. versionfile_build = "pandas/_version.py"
  139. tag_prefix = "v"
  140. parentdir_prefix = "pandas-"
  141. [tool.meson-python.args]
  142. setup = ['--vsenv'] # For Windows
  143. [tool.cibuildwheel]
  144. skip = "cp38-* *_i686 *_ppc64le *_s390x"
  145. build-verbosity = "3"
  146. environment = {LDFLAGS="-Wl,--strip-all"}
  147. # pytz 2024.2 causing some failures
  148. test-requires = "hypothesis>=6.46.1 pytest>=7.3.2 pytest-xdist>=2.2.0 pytz<2024.2"
  149. test-command = """
  150. PANDAS_CI='1' python -c 'import pandas as pd; \
  151. pd.test(extra_args=["-m not clipboard and not single_cpu and not slow and not network and not db", "-n 2", "--no-strict-data-files"]); \
  152. pd.test(extra_args=["-m not clipboard and single_cpu and not slow and not network and not db", "--no-strict-data-files"]);' \
  153. """
  154. enable = ["cpython-freethreading"]
  155. before-build = "PACKAGE_DIR={package} bash {package}/scripts/cibw_before_build.sh"
  156. [tool.cibuildwheel.windows]
  157. before-build = "pip install delvewheel"
  158. repair-wheel-command = "delvewheel repair -w {dest_dir} {wheel}"
  159. [[tool.cibuildwheel.overrides]]
  160. select = "*-manylinux_aarch64*"
  161. test-command = """
  162. PANDAS_CI='1' python -c 'import pandas as pd; \
  163. pd.test(extra_args=["-m not clipboard and not single_cpu and not slow and not network and not db and not fails_arm_wheels", "-n 2", "--no-strict-data-files"]); \
  164. pd.test(extra_args=["-m not clipboard and single_cpu and not slow and not network and not db", "--no-strict-data-files"]);' \
  165. """
  166. [[tool.cibuildwheel.overrides]]
  167. select = "*-musllinux*"
  168. before-test = "apk update && apk add musl-locales"
  169. [[tool.cibuildwheel.overrides]]
  170. select = "*-win*"
  171. # We test separately for Windows, since we use
  172. # the windowsservercore docker image to check if any dlls are
  173. # missing from the wheel
  174. test-command = ""
  175. [[tool.cibuildwheel.overrides]]
  176. # Don't strip wheels on macOS.
  177. # macOS doesn't support stripping wheels with linker
  178. # https://github.com/MacPython/numpy-wheels/pull/87#issuecomment-624878264
  179. select = "*-macosx*"
  180. environment = {CFLAGS="-g0"}
  181. [tool.black]
  182. target-version = ['py39', 'py310']
  183. required-version = '23.11.0'
  184. exclude = '''
  185. (
  186. asv_bench/env
  187. | \.egg
  188. | \.git
  189. | \.hg
  190. | \.mypy_cache
  191. | \.nox
  192. | \.tox
  193. | \.venv
  194. | _build
  195. | buck-out
  196. | build
  197. | dist
  198. | setup.py
  199. )
  200. '''
  201. [tool.ruff]
  202. line-length = 88
  203. target-version = "py310"
  204. fix = true
  205. unfixable = []
  206. typing-modules = ["pandas._typing"]
  207. select = [
  208. # pyflakes
  209. "F",
  210. # pycodestyle
  211. "E", "W",
  212. # flake8-2020
  213. "YTT",
  214. # flake8-bugbear
  215. "B",
  216. # flake8-quotes
  217. "Q",
  218. # flake8-debugger
  219. "T10",
  220. # flake8-gettext
  221. "INT",
  222. # pylint
  223. "PL",
  224. # misc lints
  225. "PIE",
  226. # flake8-pyi
  227. "PYI",
  228. # tidy imports
  229. "TID",
  230. # implicit string concatenation
  231. "ISC",
  232. # type-checking imports
  233. "TCH",
  234. # comprehensions
  235. "C4",
  236. # pygrep-hooks
  237. "PGH",
  238. # Ruff-specific rules
  239. "RUF",
  240. # flake8-bandit: exec-builtin
  241. "S102",
  242. # numpy-legacy-random
  243. "NPY002",
  244. # Perflint
  245. "PERF",
  246. # flynt
  247. "FLY",
  248. # flake8-logging-format
  249. "G",
  250. # flake8-future-annotations
  251. "FA",
  252. ]
  253. ignore = [
  254. ### Intentionally disabled
  255. # space before : (needed for how black formats slicing)
  256. "E203",
  257. # module level import not at top of file
  258. "E402",
  259. # do not assign a lambda expression, use a def
  260. "E731",
  261. # line break before binary operator
  262. # "W503", # not yet implemented
  263. # line break after binary operator
  264. # "W504", # not yet implemented
  265. # controversial
  266. "B006",
  267. # controversial
  268. "B007",
  269. # controversial
  270. "B008",
  271. # setattr is used to side-step mypy
  272. "B009",
  273. # getattr is used to side-step mypy
  274. "B010",
  275. # tests use assert False
  276. "B011",
  277. # tests use comparisons but not their returned value
  278. "B015",
  279. # false positives
  280. "B019",
  281. # Loop control variable overrides iterable it iterates
  282. "B020",
  283. # Function definition does not bind loop variable
  284. "B023",
  285. # Functions defined inside a loop must not use variables redefined in the loop
  286. # "B301", # not yet implemented
  287. # Only works with python >=3.10
  288. "B905",
  289. # Too many arguments to function call
  290. "PLR0913",
  291. # Too many returns
  292. "PLR0911",
  293. # Too many branches
  294. "PLR0912",
  295. # Too many statements
  296. "PLR0915",
  297. # Redefined loop name
  298. "PLW2901",
  299. # Global statements are discouraged
  300. "PLW0603",
  301. # Docstrings should not be included in stubs
  302. "PYI021",
  303. # Use `typing.NamedTuple` instead of `collections.namedtuple`
  304. "PYI024",
  305. # No builtin `eval()` allowed
  306. "PGH001",
  307. # compare-to-empty-string
  308. "PLC1901",
  309. # while int | float can be shortened to float, the former is more explicit
  310. "PYI041",
  311. # incorrect-dict-iterator, flags valid Series.items usage
  312. "PERF102",
  313. # try-except-in-loop, becomes useless in Python 3.11
  314. "PERF203",
  315. ### TODO: Enable gradually
  316. # Useless statement
  317. "B018",
  318. # Within an except clause, raise exceptions with ...
  319. "B904",
  320. # Magic number
  321. "PLR2004",
  322. # comparison-with-itself
  323. "PLR0124",
  324. # Consider `elif` instead of `else` then `if` to remove indentation level
  325. "PLR5501",
  326. # collection-literal-concatenation
  327. "RUF005",
  328. # pairwise-over-zipped (>=PY310 only)
  329. "RUF007",
  330. # explicit-f-string-type-conversion
  331. "RUF010",
  332. # mutable-class-default
  333. "RUF012"
  334. ]
  335. exclude = [
  336. "doc/sphinxext/*.py",
  337. "doc/build/*.py",
  338. "doc/temp/*.py",
  339. ".eggs/*.py",
  340. # vendored files
  341. "pandas/util/version/*",
  342. "pandas/io/clipboard/__init__.py",
  343. # exclude asv benchmark environments from linting
  344. "env",
  345. ]
  346. [tool.ruff.per-file-ignores]
  347. # relative imports allowed for asv_bench
  348. "asv_bench/*" = ["TID", "NPY002"]
  349. # to be enabled gradually
  350. "pandas/core/*" = ["PLR5501"]
  351. "pandas/tests/*" = ["B028", "FLY"]
  352. "scripts/*" = ["B028"]
  353. # Keep this one enabled
  354. "pandas/_typing.py" = ["TCH"]
  355. [tool.pylint.messages_control]
  356. max-line-length = 88
  357. disable = [
  358. # intentionally turned off
  359. "bad-mcs-classmethod-argument",
  360. "broad-except",
  361. "c-extension-no-member",
  362. "comparison-with-itself",
  363. "consider-using-enumerate",
  364. "import-error",
  365. "import-outside-toplevel",
  366. "invalid-name",
  367. "invalid-unary-operand-type",
  368. "line-too-long",
  369. "no-else-continue",
  370. "no-else-raise",
  371. "no-else-return",
  372. "no-member",
  373. "no-name-in-module",
  374. "not-an-iterable",
  375. "overridden-final-method",
  376. "pointless-statement",
  377. "redundant-keyword-arg",
  378. "singleton-comparison",
  379. "too-many-ancestors",
  380. "too-many-arguments",
  381. "too-many-boolean-expressions",
  382. "too-many-branches",
  383. "too-many-function-args",
  384. "too-many-instance-attributes",
  385. "too-many-locals",
  386. "too-many-nested-blocks",
  387. "too-many-public-methods",
  388. "too-many-return-statements",
  389. "too-many-statements",
  390. "unexpected-keyword-arg",
  391. "ungrouped-imports",
  392. "unsubscriptable-object",
  393. "unsupported-assignment-operation",
  394. "unsupported-membership-test",
  395. "unused-import",
  396. "use-dict-literal",
  397. "use-implicit-booleaness-not-comparison",
  398. "use-implicit-booleaness-not-len",
  399. "wrong-import-order",
  400. "wrong-import-position",
  401. "redefined-loop-name",
  402. # misc
  403. "abstract-class-instantiated",
  404. "no-value-for-parameter",
  405. "undefined-variable",
  406. "unpacking-non-sequence",
  407. "used-before-assignment",
  408. # pylint type "C": convention, for programming standard violation
  409. "missing-class-docstring",
  410. "missing-function-docstring",
  411. "missing-module-docstring",
  412. "superfluous-parens",
  413. "too-many-lines",
  414. "unidiomatic-typecheck",
  415. "unnecessary-dunder-call",
  416. "unnecessary-lambda-assignment",
  417. # pylint type "R": refactor, for bad code smell
  418. "consider-using-with",
  419. "cyclic-import",
  420. "duplicate-code",
  421. "inconsistent-return-statements",
  422. "redefined-argument-from-local",
  423. "too-few-public-methods",
  424. # pylint type "W": warning, for python specific problems
  425. "abstract-method",
  426. "arguments-differ",
  427. "arguments-out-of-order",
  428. "arguments-renamed",
  429. "attribute-defined-outside-init",
  430. "broad-exception-raised",
  431. "comparison-with-callable",
  432. "dangerous-default-value",
  433. "deprecated-module",
  434. "eval-used",
  435. "expression-not-assigned",
  436. "fixme",
  437. "global-statement",
  438. "invalid-overridden-method",
  439. "keyword-arg-before-vararg",
  440. "possibly-unused-variable",
  441. "protected-access",
  442. "raise-missing-from",
  443. "redefined-builtin",
  444. "redefined-outer-name",
  445. "self-cls-assignment",
  446. "signature-differs",
  447. "super-init-not-called",
  448. "try-except-raise",
  449. "unnecessary-lambda",
  450. "unused-argument",
  451. "unused-variable",
  452. "using-constant-test",
  453. # disabled on 2.3.x branch
  454. "consider-using-in",
  455. "simplifiable-if-expression",
  456. ]
  457. [tool.pytest.ini_options]
  458. # sync minversion with pyproject.toml & install.rst
  459. minversion = "7.3.2"
  460. addopts = "--strict-markers --strict-config --capture=no --durations=30 --junitxml=test-data.xml"
  461. empty_parameter_set_mark = "fail_at_collect"
  462. xfail_strict = true
  463. testpaths = "pandas"
  464. doctest_optionflags = [
  465. "NORMALIZE_WHITESPACE",
  466. "IGNORE_EXCEPTION_DETAIL",
  467. "ELLIPSIS",
  468. ]
  469. filterwarnings = [
  470. "error:::pandas",
  471. "error::ResourceWarning",
  472. "error::pytest.PytestUnraisableExceptionWarning",
  473. # TODO(PY311-minimum): Specify EncodingWarning
  474. # Ignore 3rd party EncodingWarning but raise on pandas'
  475. "ignore:.*encoding.* argument not specified",
  476. "error:.*encoding.* argument not specified::pandas",
  477. "ignore:.*ssl.SSLSocket:pytest.PytestUnraisableExceptionWarning",
  478. "ignore:.*ssl.SSLSocket:ResourceWarning",
  479. # GH 44844: Can remove once minimum matplotlib version >= 3.7
  480. "ignore:.*FileIO:pytest.PytestUnraisableExceptionWarning",
  481. "ignore:.*BufferedRandom:ResourceWarning",
  482. "ignore::ResourceWarning:asyncio",
  483. # From plotting doctests
  484. "ignore:More than 20 figures have been opened:RuntimeWarning",
  485. # Will be fixed in numba 0.56: https://github.com/numba/numba/issues/7758
  486. "ignore:`np.MachAr` is deprecated:DeprecationWarning:numba",
  487. "ignore:.*urllib3:DeprecationWarning:botocore",
  488. "ignore:Setuptools is replacing distutils.:UserWarning:_distutils_hack",
  489. # https://github.com/PyTables/PyTables/issues/822
  490. "ignore:a closed node found in the registry:UserWarning:tables",
  491. "ignore:`np.object` is a deprecated:DeprecationWarning:tables",
  492. "ignore:tostring:DeprecationWarning:tables",
  493. "ignore:distutils Version classes are deprecated:DeprecationWarning:pandas_datareader",
  494. "ignore:distutils Version classes are deprecated:DeprecationWarning:numexpr",
  495. "ignore:distutils Version classes are deprecated:DeprecationWarning:fastparquet",
  496. "ignore:distutils Version classes are deprecated:DeprecationWarning:fsspec",
  497. # Can be removed once https://github.com/numpy/numpy/pull/24794 is merged
  498. "ignore:.*In the future `np.long` will be defined as.*:FutureWarning",
  499. # https://github.com/numpy/numpy/pull/29301
  500. "ignore:.*align should be passed:",
  501. ]
  502. junit_family = "xunit2"
  503. markers = [
  504. "single_cpu: tests that should run on a single cpu only",
  505. "slow: mark a test as slow",
  506. "network: mark a test as network",
  507. "db: tests requiring a database (mysql or postgres)",
  508. "clipboard: mark a pd.read_clipboard test",
  509. "arm_slow: mark a test as slow for arm64 architecture",
  510. "skip_ubsan: Tests known to fail UBSAN check",
  511. # TODO: someone should investigate this ...
  512. # these tests only fail in the wheel builder and don't fail in regular
  513. # ARM CI
  514. "fails_arm_wheels: Tests that fail in the ARM wheel build only",
  515. ]
  516. [tool.mypy]
  517. # Import discovery
  518. mypy_path = "typings"
  519. files = ["pandas", "typings"]
  520. namespace_packages = false
  521. explicit_package_bases = false
  522. ignore_missing_imports = true
  523. follow_imports = "normal"
  524. follow_imports_for_stubs = false
  525. no_site_packages = false
  526. no_silence_site_packages = false
  527. # Platform configuration
  528. python_version = "3.11"
  529. platform = "linux-64"
  530. # Disallow dynamic typing
  531. disallow_any_unimported = false # TODO
  532. disallow_any_expr = false # TODO
  533. disallow_any_decorated = false # TODO
  534. disallow_any_explicit = false # TODO
  535. disallow_any_generics = false # TODO
  536. disallow_subclassing_any = false # TODO
  537. # Untyped definitions and calls
  538. disallow_untyped_calls = true
  539. disallow_untyped_defs = true
  540. disallow_incomplete_defs = true
  541. check_untyped_defs = true
  542. disallow_untyped_decorators = true
  543. # None and Optional handling
  544. no_implicit_optional = true
  545. strict_optional = true
  546. # Configuring warnings
  547. warn_redundant_casts = true
  548. warn_unused_ignores = true
  549. warn_no_return = true
  550. warn_return_any = false # TODO
  551. warn_unreachable = false # GH#27396
  552. # Suppressing errors
  553. ignore_errors = false
  554. enable_error_code = "ignore-without-code"
  555. # Miscellaneous strictness flags
  556. allow_untyped_globals = false
  557. allow_redefinition = false
  558. local_partial_types = false
  559. implicit_reexport = true
  560. strict_equality = true
  561. # Configuring error messages
  562. show_error_context = false
  563. show_column_numbers = false
  564. show_error_codes = true
  565. [[tool.mypy.overrides]]
  566. module = [
  567. "pandas._config.config", # TODO
  568. "pandas._libs.*",
  569. "pandas._testing.*", # TODO
  570. "pandas.arrays", # TODO
  571. "pandas.compat.numpy.function", # TODO
  572. "pandas.compat._optional", # TODO
  573. "pandas.compat.compressors", # TODO
  574. "pandas.compat.pickle_compat", # TODO
  575. "pandas.core._numba.executor", # TODO
  576. "pandas.core.array_algos.datetimelike_accumulations", # TODO
  577. "pandas.core.array_algos.masked_accumulations", # TODO
  578. "pandas.core.array_algos.masked_reductions", # TODO
  579. "pandas.core.array_algos.putmask", # TODO
  580. "pandas.core.array_algos.quantile", # TODO
  581. "pandas.core.array_algos.replace", # TODO
  582. "pandas.core.array_algos.take", # TODO
  583. "pandas.core.arrays.*", # TODO
  584. "pandas.core.computation.*", # TODO
  585. "pandas.core.dtypes.astype", # TODO
  586. "pandas.core.dtypes.cast", # TODO
  587. "pandas.core.dtypes.common", # TODO
  588. "pandas.core.dtypes.concat", # TODO
  589. "pandas.core.dtypes.dtypes", # TODO
  590. "pandas.core.dtypes.generic", # TODO
  591. "pandas.core.dtypes.inference", # TODO
  592. "pandas.core.dtypes.missing", # TODO
  593. "pandas.core.groupby.categorical", # TODO
  594. "pandas.core.groupby.generic", # TODO
  595. "pandas.core.groupby.grouper", # TODO
  596. "pandas.core.groupby.groupby", # TODO
  597. "pandas.core.groupby.ops", # TODO
  598. "pandas.core.indexers.*", # TODO
  599. "pandas.core.indexes.*", # TODO
  600. "pandas.core.interchange.column", # TODO
  601. "pandas.core.interchange.dataframe_protocol", # TODO
  602. "pandas.core.interchange.from_dataframe", # TODO
  603. "pandas.core.internals.*", # TODO
  604. "pandas.core.methods.*", # TODO
  605. "pandas.core.ops.array_ops", # TODO
  606. "pandas.core.ops.common", # TODO
  607. "pandas.core.ops.invalid", # TODO
  608. "pandas.core.ops.mask_ops", # TODO
  609. "pandas.core.ops.missing", # TODO
  610. "pandas.core.reshape.*", # TODO
  611. "pandas.core.strings.*", # TODO
  612. "pandas.core.tools.*", # TODO
  613. "pandas.core.window.common", # TODO
  614. "pandas.core.window.ewm", # TODO
  615. "pandas.core.window.expanding", # TODO
  616. "pandas.core.window.numba_", # TODO
  617. "pandas.core.window.online", # TODO
  618. "pandas.core.window.rolling", # TODO
  619. "pandas.core.accessor", # TODO
  620. "pandas.core.algorithms", # TODO
  621. "pandas.core.apply", # TODO
  622. "pandas.core.arraylike", # TODO
  623. "pandas.core.base", # TODO
  624. "pandas.core.common", # TODO
  625. "pandas.core.config_init", # TODO
  626. "pandas.core.construction", # TODO
  627. "pandas.core.flags", # TODO
  628. "pandas.core.frame", # TODO
  629. "pandas.core.generic", # TODO
  630. "pandas.core.indexing", # TODO
  631. "pandas.core.missing", # TODO
  632. "pandas.core.nanops", # TODO
  633. "pandas.core.resample", # TODO
  634. "pandas.core.roperator", # TODO
  635. "pandas.core.sample", # TODO
  636. "pandas.core.series", # TODO
  637. "pandas.core.sorting", # TODO
  638. "pandas.errors", # TODO
  639. "pandas.io.clipboard", # TODO
  640. "pandas.io.excel._base", # TODO
  641. "pandas.io.excel._odfreader", # TODO
  642. "pandas.io.excel._odswriter", # TODO
  643. "pandas.io.excel._openpyxl", # TODO
  644. "pandas.io.excel._pyxlsb", # TODO
  645. "pandas.io.excel._xlrd", # TODO
  646. "pandas.io.excel._xlsxwriter", # TODO
  647. "pandas.io.formats.console", # TODO
  648. "pandas.io.formats.css", # TODO
  649. "pandas.io.formats.excel", # TODO
  650. "pandas.io.formats.format", # TODO
  651. "pandas.io.formats.info", # TODO
  652. "pandas.io.formats.printing", # TODO
  653. "pandas.io.formats.style", # TODO
  654. "pandas.io.formats.style_render", # TODO
  655. "pandas.io.formats.xml", # TODO
  656. "pandas.io.json.*", # TODO
  657. "pandas.io.parsers.*", # TODO
  658. "pandas.io.sas.sas_xport", # TODO
  659. "pandas.io.sas.sas7bdat", # TODO
  660. "pandas.io.clipboards", # TODO
  661. "pandas.io.common", # TODO
  662. "pandas.io.gbq", # TODO
  663. "pandas.io.html", # TODO
  664. "pandas.io.gbq", # TODO
  665. "pandas.io.parquet", # TODO
  666. "pandas.io.pytables", # TODO
  667. "pandas.io.sql", # TODO
  668. "pandas.io.stata", # TODO
  669. "pandas.io.xml", # TODO
  670. "pandas.plotting.*", # TODO
  671. "pandas.tests.*",
  672. "pandas.tseries.frequencies", # TODO
  673. "pandas.tseries.holiday", # TODO
  674. "pandas.util._decorators", # TODO
  675. "pandas.util._doctools", # TODO
  676. "pandas.util._print_versions", # TODO
  677. "pandas.util._test_decorators", # TODO
  678. "pandas.util._validators", # TODO
  679. "pandas.util", # TODO
  680. "pandas._version",
  681. "pandas.conftest",
  682. "pandas"
  683. ]
  684. disallow_untyped_calls = false
  685. disallow_untyped_defs = false
  686. disallow_incomplete_defs = false
  687. [[tool.mypy.overrides]]
  688. module = [
  689. "pandas.tests.*",
  690. "pandas._version",
  691. "pandas.io.clipboard",
  692. ]
  693. check_untyped_defs = false
  694. [[tool.mypy.overrides]]
  695. module = [
  696. "pandas.tests.apply.test_series_apply",
  697. "pandas.tests.arithmetic.conftest",
  698. "pandas.tests.arrays.sparse.test_combine_concat",
  699. "pandas.tests.dtypes.test_common",
  700. "pandas.tests.frame.methods.test_to_records",
  701. "pandas.tests.groupby.test_rank",
  702. "pandas.tests.groupby.transform.test_transform",
  703. "pandas.tests.indexes.interval.test_interval",
  704. "pandas.tests.indexing.test_categorical",
  705. "pandas.tests.io.excel.test_writers",
  706. "pandas.tests.reductions.test_reductions",
  707. "pandas.tests.test_expressions",
  708. ]
  709. ignore_errors = true
  710. # To be kept consistent with "Import Formatting" section in contributing.rst
  711. [tool.isort]
  712. known_pre_libs = "pandas._config"
  713. known_pre_core = ["pandas._libs", "pandas._typing", "pandas.util._*", "pandas.compat", "pandas.errors"]
  714. known_dtypes = "pandas.core.dtypes"
  715. known_post_core = ["pandas.tseries", "pandas.io", "pandas.plotting"]
  716. sections = ["FUTURE", "STDLIB", "THIRDPARTY" ,"PRE_LIBS" , "PRE_CORE", "DTYPES", "FIRSTPARTY", "POST_CORE", "LOCALFOLDER"]
  717. profile = "black"
  718. combine_as_imports = true
  719. force_grid_wrap = 2
  720. force_sort_within_sections = true
  721. skip_glob = "env"
  722. skip = "pandas/__init__.py"
  723. [tool.pyright]
  724. pythonVersion = "3.11"
  725. typeCheckingMode = "basic"
  726. useLibraryCodeForTypes = false
  727. include = ["pandas", "typings"]
  728. exclude = ["pandas/tests", "pandas/io/clipboard", "pandas/util/version", "pandas/core/_numba/extensions.py"]
  729. # enable subset of "strict"
  730. reportDuplicateImport = true
  731. reportInconsistentConstructor = true
  732. reportInvalidStubStatement = true
  733. reportOverlappingOverload = true
  734. reportPropertyTypeMismatch = true
  735. reportUntypedClassDecorator = true
  736. reportUntypedFunctionDecorator = true
  737. reportUntypedNamedTuple = true
  738. reportUnusedImport = true
  739. disableBytesTypePromotions = true
  740. # disable subset of "basic"
  741. reportGeneralTypeIssues = false
  742. reportMissingModuleSource = false
  743. reportOptionalCall = false
  744. reportOptionalIterable = false
  745. reportOptionalMemberAccess = false
  746. reportOptionalOperand = false
  747. reportOptionalSubscript = false
  748. reportPrivateImportUsage = false
  749. reportUnboundVariable = false
  750. [tool.coverage.run]
  751. branch = true
  752. omit = ["pandas/_typing.py", "pandas/_version.py"]
  753. plugins = ["Cython.Coverage"]
  754. source = ["pandas"]
  755. [tool.coverage.report]
  756. ignore_errors = false
  757. show_missing = true
  758. omit = ["pandas/_version.py"]
  759. exclude_lines = [
  760. # Have to re-enable the standard pragma
  761. "pragma: no cover",
  762. # Don't complain about missing debug-only code:s
  763. "def __repr__",
  764. "if self.debug",
  765. # Don't complain if tests don't hit defensive assertion code:
  766. "raise AssertionError",
  767. "raise NotImplementedError",
  768. "AbstractMethodError",
  769. # Don't complain if non-runnable code isn't run:
  770. "if 0:",
  771. "if __name__ == .__main__.:",
  772. "if TYPE_CHECKING:",
  773. ]
  774. [tool.coverage.html]
  775. directory = "coverage_html_report"
  776. [tool.codespell]
  777. ignore-words-list = "blocs, coo, hist, nd, sav, ser, recuse, nin, timere, expec, expecs"
  778. ignore-regex = 'https://([\w/\.])+'