jorisvandenbossche commented on code in PR #55264:
URL: https://github.com/apache/arrow/pull/55264#discussion_r4597302813


##########
docs/source/developers/python/development.rst:
##########
@@ -114,6 +114,18 @@ Running Type Checkers
 We support multiple type checkers. Their configurations are in
 ``pyproject.toml``.
 
+The easiest way to run all of them is with ``pre-commit``, which installs
+the same versions of the type checkers and stub packages for everyone. This
+also lints and formats the stubs with ruff:
+
+.. code-block::
+
+   $ pre-commit run --hook-stage manual python-stubs --all-files

Review Comment:
   Yes, this works now for `ty` (I suppose the `-u CONDA_PREFIX` addition fixed 
it).
   
   Still getting the mypy error about `pyarrow.compute` not having Expression:
   
   ```
   $ pre-commit run --hook-stage manual python-stubs --all-files
   Python Stubs Lint 
(ruff).................................................Passed
   Python Stubs Format 
(ruff)...............................................Passed
   Python Stubs Type Check 
(mypy)...........................................Failed
   - hook id: mypy
   - exit code: 1
   
   pyarrow-stubs/__lib/table.pyi:67: error: Module "pyarrow.compute" has no 
attribute "Expression"  [attr-defined]
   Found 1 error in 1 file (checked 25 source files)
   
   Python Stubs Type Check 
(pyright)........................................Passed
   Python Stubs Type Check 
(ty).............................................Passed
   ```



-- 
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]

Reply via email to