dangotbanned commented on code in PR #47609: URL: https://github.com/apache/arrow/pull/47609#discussion_r2426774911
########## python/pyproject.toml: ########## @@ -83,11 +83,61 @@ include = ["pyarrow"] namespaces = false [tool.setuptools.package-data] -pyarrow = ["*.pxd", "*.pyx", "includes/*.pxd"] +pyarrow = ["*.pxd", "*.pyx", "includes/*.pxd", "py.typed"] [tool.setuptools_scm] root = '..' version_file = 'pyarrow/_generated_version.py' version_scheme = 'guess-next-dev' git_describe_command = 'git describe --dirty --tags --long --match "apache-arrow-[0-9]*.*"' fallback_version = '22.0.0a0' + +[tool.mypy] +files = ["pyarrow"] +exclude = 'pyarrow/interchange/.*|pyarrow/vendored/.*' +mypy_path = "$MYPY_CONFIG_FILE_DIR/pyarrow-stubs" + +[tool.pyright] +include = ["pyarrow"] Review Comment: > Please do advise if some of these could be kept disabled. :) Sure thing, here's [our current config](https://github.com/narwhals-dev/narwhals/blob/849326f7682ac741b3bad4edca775cec79fe11f3/pyproject.toml#L349-L365) <details><summary>Details</summary> <p> ```toml [tool.pyright] pythonPlatform = "All" # NOTE (`pyarrow-stubs` do unsafe `TypeAlias` and `TypeVar` imports) # pythonVersion = "3.9" reportMissingTypeArgument = "error" reportIncompatibleMethodOverride = "error" reportMissingImports = "none" reportMissingModuleSource = "none" reportPrivateImportUsage = "none" reportUnusedExpression = "none" # handled by (https://docs.astral.sh/ruff/rules/unused-variable/) typeCheckingMode = "basic" include = ["narwhals", "tests"] ignore = [ "../.venv/", "../../../**/Lib", # stdlib "../../../**/typeshed*" # typeshed-fallback ] ``` </p> </details> And some other rules I was thinking of disabling to allow us to switch `typeCheckingMode = "basic"` -> `"strict"` - https://github.com/narwhals-dev/narwhals/issues/3103 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
