diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 3d1ec637ae202..a16580679ff54 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -169,15 +169,6 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then invgrep -r -E --include '*.py' '(unittest(\.| import )mock|mock\.Mock\(\)|mock\.patch)' pandas/tests/ RET=$(($RET + $?)) ; echo $MSG "DONE" - # Check that we use pytest.raises only as a context manager - # - # For any flake8-compliant code, the only way this regex gets - # matched is if there is no "with" statement preceding "pytest.raises" - MSG='Check for pytest.raises as context manager (a line starting with `pytest.raises` is invalid, needs a `with` to precede it)' ; echo $MSG - MSG='TODO: This check is currently skipped because so many files fail this. Please enable when all are corrected (xref gh-24332)' ; echo $MSG - # invgrep -R --include '*.py' -E '[[:space:]] pytest.raises' pandas/tests - # RET=$(($RET + $?)) ; echo $MSG "DONE" - MSG='Check for wrong space after code-block directive and before colon (".. code-block ::" instead of ".. code-block::")' ; echo $MSG invgrep -R --include="*.rst" ".. code-block ::" doc/source RET=$(($RET + $?)) ; echo $MSG "DONE"