Fix oinspect TypeError with generic __getattr__ objects; fix test path quoting#15237
Open
Carreau wants to merge 81 commits into
Open
Fix oinspect TypeError with generic __getattr__ objects; fix test path quoting#15237Carreau wants to merge 81 commits into
Carreau wants to merge 81 commits into
Conversation
…h quoting oinspect: guard __custom_documentations__ lookup with isinstance(dict) so objects like polars Expr (which return self for any attribute access via __getattr__) no longer raise TypeError when inspected with ?. Fixes #15072. oinspect: fix inspect.Parameter.empty comparison in MIME-hook path; the previous code accidentally compared against the property descriptor object rather than the sentinel, making the required-parameter filter a no-op. test_interactiveshell: wrap sys.executable and self.fname in shlex.quote() so test_exit_code_signal survives when the source path contains spaces. Fixes #15100. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
oinspect._getdef: bare except → except Exception so KeyboardInterrupt and SystemExit are no longer silently swallowed during signature rendering. interactiveshell.safe_execfile / safe_execfile_ipy: bare except on file-open probes → except OSError, which is the only exception that opening a file can legitimately raise. Prevents masking programmer errors and control-flow exceptions. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
oinspect.info: obj.__class__ lookup → except AttributeError (only failure mode). oinspect.info: str(obj) path → except Exception (user __str__ can raise anything). completer._default_arguments_from_docstring path: bare except → except Exception so KeyboardInterrupt from completion is no longer swallowed. page.page_file: two bare except → except Exception; pager env lookup → except KeyError (os.environ lookup can only raise KeyError). https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
…ashhandler test_history: test_hist_file_config didn't close the tempfile or the HistoryManager's SQLite connection before attempting file deletion, causing intermittent failures on macOS/Windows where the OS holds file locks. Fix: close the NamedTemporaryFile immediately after creation, explicitly stop the save_thread and close the db in the finally block, and call gc.collect() before unlinking. Closes #15161. application: os.getcwd() → except OSError (only OS-level errors possible). crashhandler: open() → except OSError; config pformat → except Exception. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
oinspect: alias obj[1] subscript → except (TypeError, IndexError); getattr(obj, '__class__') for class docstring → except AttributeError. shellapp: all nine startup/init bare except: → except Exception: so that KeyboardInterrupt and SystemExit are no longer silently swallowed during extension loading and exec_lines execution. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
…epts ptutils: _elide_point and _elide_typed now return the string unchanged when min_elide <= 0, giving users a documented way to disable filename abbreviations in tab-completion output entirely (c.TerminalInteractiveShell.min_elide = 0). Update trait help text. Add tests in terminal/tests/test_ptutils.py. Closes #12105. interactiveshell: narrow three safe bare except: clauses: - push_var_expand eval() → except Exception (can raise anything from user ns) - SyntaxError.filename assignment (×2) → except AttributeError (only failure mode) The other 9 bare excepts in interactiveshell.py are intentionally broad (user-code execution funnels, custom TB handlers) and are left unchanged. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Replace 10 near-identical test methods across two test classes with 7 parametrized functions. The non-positive min_elide cases (0, -1, -10) and the short-string boundary cases now run as named parameter sets, making failures immediately identifiable and adding -10 as a third boundary value that wasn't tested before. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Replace catch-all `except:` with specific exception types throughout: - execution.py: UnicodeEncodeError|LookupError for encoding probes - osm.py, logging.py: ValueError for int()/str.split() conversions - logging.py, namespace.py: Exception for general failure paths - code.py: AttributeError for displayhook.prompt_count access - basic.py: fix dead code after `raise` in xmode handler (unreachable xmode_switch_err call); now properly catches and warns on failure - script.py: OSError for process signal/terminate/kill calls - completerlib.py: ImportError for import_module failures - tbtools.py, ultratb.py, doctb.py: Exception in repr/str safety wrappers - deepreload.py: Exception for reload paths, KeyError for dict lookup - dir2.py: Exception in hasattr2 helper https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
- autoreload.py: Exception in superreload and post-execute hook paths; Exception (re-raise) in module reload dictionary restore - backgroundjobs.py: Exception in traceback handler lookup and job run() - path.py: Exception for Windows registry homedir lookup; Exception (re-raise) in link_or_copy fallback cleanup https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Final pass of narrowing bare except: clauses: - ipapp.py: Exception for crash report user-ns access - custom_doctests.py: Exception for numpy array conversion - testing/tools.py: OSError for temp file unlink on Windows - formatters.py: Exception in formatter dispatch (FIXME re-raise) - pickleshare.py: Exception converting pickle load errors to KeyError - debugger.py: ValueError for int() parse in list command arg - debugger_backport.py: Exception in exec-with-restore-context path - demo.py: Exception in demo block execution handler Only remaining bare except: are in interactiveshell.py (9 intentional user-code execution funnels) and a docstring example in ultratb.py. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
…tions Fill in type annotations that were missing from the completer module: - get__all__entries: obj: Any -> list[str] - _parse_tokens: c: str -> list[tokenize.TokenInfo] - python_func_kw_matches: text: str -> list[str] - latex_name_matcher: -> SimpleMatcherResult - custom_completer_matcher: context: CompletionContext -> SimpleMatcherResult - dispatch_custom_completer: text: str -> list[str] | None - fwd_unicode_matcher: -> SimpleMatcherResult https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
The literal string \"string_form\" contains no tabs, so .expandtabs() was a no-op. Remove it to clarify intent. The indentation width (11) is preserved — it aligns with the display label \"String form\" (same length) used when showing long string representations. Also add test_pinfo_long_string_form_truncated to cover the truncation code path (previously untested): objects whose repr exceeds 200 chars should have <...> inserted in ? mode but not in ?? (detail_level=1). https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
New test file covering the entire display_functions public API: - _merge(): flat/nested dict merging, non-dict inputs, mutation - _new_id(): hex validity, uniqueness, length (32 chars = 16 bytes) - DisplayHandle: auto/explicit ID, repr, uniqueness guarantee - display(): fallback to print() without InteractiveShell; display_id=True returns handle; display_id str preserved; no display_id returns None; TypeError on update=True without display_id; no-objects+display_id OK - @pytest.mark.parametrize covering int/str/list/dict types - update_display(): verifies update=True and display_id forwarded https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
…; add tests macro.py improvements: - Add __setstate__ so pickled Macros round-trip correctly (__getstate__ was defined without the matching __setstate__, breaking unpickling) - TypeError in __add__ now includes informative message with the offending type name instead of bare raise TypeError - Add type hint on __init__ code: str parameter - Add return type annotation on __add__ New tests/test_macro.py (17 tests, previously zero coverage): - Code storage, trailing newline guarantee - coding: / coding= declaration stripping (both PEP 263 syntaxes) - __str__, __repr__ formatting - @parametrize for multi-line code preservation - __add__ with Macro, str, and invalid type (TypeError message check) - Pickle round-trip via __getstate__/__setstate__ https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
timing.py: - Replace `assert reps >= 1` with a proper `if reps < 1: raise ValueError` since assert statements are silently removed with python -O, which would cause a ZeroDivisionError on the av_time calculation instead of the expected validation error. New tests/test_error.py (17 tests, previously untested): - Exception hierarchy: IPythonCoreError, TryNext, UsageError, StdinNotImplementedError, InputRejected - Multiple inheritance: StdinNotImplementedError catches as both IPythonCoreError and NotImplementedError - InputRejected is NOT a subclass of IPythonCoreError (by design) - @parametrize across all 5 exception classes for raise/catch New tests/test_timing.py (14 tests, previously untested): - clock()/clock2() return non-negative floats - timings_out() executes exactly reps times, returns last output - ValueError on reps=0 and reps<0 (now that assert is replaced) - @parametrize verifying per_call == total/reps identity - timings()/timing() convenience wrappers - kwargs forwarding via timings_out https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
…ests
builtin_trap.py: Remove self._builtins_added = False from deactivate().
The flag was set but never read anywhere in the codebase — a leftover
from an older implementation. Cleanup logic already uses _orig_builtins.
New tests/test_contexts.py (13 tests, previously untested):
- preserve_keys: restores existing values, deletes keys that didn't exist
on entry, preserves unrelated keys, multiple keys at once
- Restoration after exception (context managers must clean up)
- @parametrize for falsy values (None, 0, False, '', [], {}) — guards
against truthiness bugs in restoration logic
- No-keys edge case is a no-op
https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
…sted) New tests/test_encoding.py (12 tests): - get_stream_enc: stream with encoding, without encoding attr, empty/None encoding, custom default arg, real sys.stdin - getdefaultencoding: returns valid encodable string, DeprecationWarning on prefer_stream= kwarg, cp0→cp1252 fallback with RuntimeWarning - DEFAULT_ENCODING: non-empty string that's a valid codec New tests/test_syspathcontext.py (9 tests): - prepended_to_syspath: adds at front, removes on exit, returns self - No-op (and no-removal) when dir already in sys.path - Removal on exception, exception propagation (returns False) - Handles concurrent removal (ValueError suppressed on exit) https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
New tests/test_sentinel.py (7 tests): - repr format is 'module.name' - Optional docstring set/not-set behavior - Two Sentinels with same name are distinct objects (identity check) - name and module attributes accessible New tests/test_strdispatch.py (12 tests): - add_s / s_matches: exact match, no-match returns empty - add_re: pattern match, no match - flat_matches combining string and regex matches - Priority ordering (lower number = higher priority = comes first) - dispatch() generator yields chains, empty for no match - Multiple values for same key preserved - Docstring example from the class produces expected [123, 34, 686] https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
New tests/test_display_trap.py (7 tests): - Context manager sets/restores sys.displayhook correctly - is_active property true inside context, false outside - Returns self from __enter__ - Nested traps: outer restored when inner exits - Exception propagates (returns False from __exit__) - _nested_level increments/decrements correctly through nesting New tests/test_payload.py (11 tests): - write_payload with dict stored; TypeError for non-dict inputs - single=True updates existing payload with same source (replaces) - single=False appends regardless of source - No-source payloads always append - Different sources coexist - read_payload returns all, clear_payload empties, initial state empty https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
- Corrects comment that mistakenly referenced BuiltinTrap instead of DisplayTrap - Adds 13 tests for IPython.utils.data (chop and deprecated uniq_stable) covering edge cases: empty sequences, uneven splits, string chops, deprecation warning emission, and order preservation https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
builtin_trap.py: - Add from __future__ import annotations - Annotate __init__, __enter__, __exit__, add_builtin, remove_builtin, activate, deactivate with precise types hooks.py: - Add from __future__ import annotations - Annotate CommandChainDispatcher.__init__, __call__, __str__, add tests/test_hooks.py (8 new tests): - Empty chain raises TryNext - __str__ and __iter__ coverage - Parametrized priority-sort verification (3 cases) - First successful func stops the chain (later funcs not called) - Argument forwarding to registered callables https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
py3compat.py: - Add from __future__ import annotations - Remove typing.Optional in favor of X | None - Add type annotations to safe_unicode, input, execfile logger.py: - Add from __future__ import annotations - Replace old-style _get_mode/_set_mode + property() with @property/@Setter - Add type annotations to all public methods - Fix logfile attribute type to IO[str] | None tests/test_logger_unit.py (new, 25 tests): - logmode property validation (all 5 valid modes, invalid raises ValueError) - Initial state assertions - logstart/logstop lifecycle (over, append, error if already active) - log_write for input/output, suppression when inactive - switch_log toggling and edge cases - logstate output when active/inactive https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
capture.py: - Add from __future__ import annotations - Replace typing.List/Optional/Type with built-in list/X|None/type[X] - Add return type to CapturedIO.outputs property compilerop.py: - Add from __future__ import annotations - Add parameter and return types to code_name, ast_parse, reset_compiler_flags, compiler_flags, get_code_name, cache, extra_flags - Fix format_code_name return type: was str (wrong), now tuple[str,str]|None - Remove unused import time https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Replace typing.Optional/Type/Tuple with built-in X|None/type[X]/tuple[...] Add from __future__ import annotations where missing https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Replace typing.Optional/Tuple/List with built-in X|None/tuple[...]/list[...] Add from __future__ import annotations to both files https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
doctb.py: - Add from __future__ import annotations - Replace Optional[X] with X | None crashhandler.py: - Add from __future__ import annotations - Replace Dict/Optional with dict[...]/X | None - Move types import with stdlib imports https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Replace deprecated typing.Optional/List/Dict/Union with built-in equivalents using from __future__ import annotations. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Replace typing.List/Optional/Tuple/Type with built-in equivalents Add from __future__ import annotations to both files https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Add from __future__ import annotations; replace List/Dict/Tuple/Optional/Union with built-in generics. Use builtins.list in methods of LSString and SList where 'list = property(...)' shadows the built-in list in annotations. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Replace deprecated typing.Optional/List/Dict/Tuple/Union with built-in equivalents using from __future__ import annotations. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
…on -> X | Y Remove Optional from typing imports and replace all Optional[X] usages with X | None. Replace Union[X, Y] with X | Y for type aliases and annotations where no string forward references are involved. Keep Union for _JediCompletionLike which uses a string forward reference for jedi. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Add from __future__ import annotations. Remove Optional from typing imports and replace Optional[X] with X | None. Replace Union[X, Y] type aliases and annotations with X | Y syntax. Keep Union import since it is used at runtime in the origin is Union identity check. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Add from __future__ import annotations. Replace Optional[X] with X | None, Union[X, Y] with X | Y, Dict/List/Tuple with dict/list/tuple. Remove string quotes from forward references that are now valid due to deferred evaluation. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Covers skipdoctest.py, displaypub.py (also remove typing as t / use dict), ptutils.py, paths.py, page.py, tips.py, magics/basic.py, magics/auto.py, _process_posix.py, and extensions/autoreload.py. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Set self._closed = True before channel validation in Tee.__init__ so that __del__ does not raise AttributeError if __init__ raises ValueError for an invalid channel. Convert test_io.py from unittest.TestCase to plain pytest functions with @pytest.mark.parametrize. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
…ytest Fix buggy assertions in test_full_path_posix/win32 (were checking truthiness not actual values). Convert test_parser to @pytest.mark.parametrize. Convert TestAssertPrints from unittest.TestCase to plain pytest functions. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
…cess_win32_controller.py Combine test_code_name and test_code_name2 into parametrized test covering multiple cell numbers. Add parametrized test for cache with various source types including Unicode. Add from __future__ import annotations to _process_win32_controller.py. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Replace unittest.TestCase setUp with @pytest.fixture for the EventManager, allowing plain function-based tests that are easier to read and compose. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Replace unittest.TestCase and manual for-loops with @pytest.mark.parametrize, turning each pattern/expected pair into a distinct named test case. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
…etrize Replace unittest.TestCase setUp/tearDown with pytest tmp_path + monkeypatch fixtures, and parametrize the magic_run_completer pattern tests. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
- shellapp.py: add from __future__ import annotations, replace `import typing as t` with `from typing import Any` - test_path.py: replace TestShellGlob and TestLinkOrCopy unittest.TestCase classes with pytest fixtures (tmp_path, monkeypatch) and parametrized shellglob tests https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Replace unittest.TestCase with plain functions; parametrize the four long-collection tests into a single test_long_collection_repr. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
…est.raises In TestAudioDataWithNumpy, replace all self.assertRaises calls with pytest.raises. Keep the class inheritance structure intact since TestAudioDataWithoutNumpy reuses all tests via inheritance. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Convert for-loop test patterns to @pytest.mark.parametrize, turning each input/expected pair into a distinct named test case. Also unwrap single-item loops into direct assignments. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Add from __future__ import annotations, remove deprecated List/Union typing imports, use list[...] and X | Y | Z union syntax. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
- test_oinspect: parametrize test_calldef_none over 4 callable objects - test_inputtransformer2: parametrize test_find_autocalls and test_transform_autocall over the three autocall syntax cases https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Convert for-loops in test_select_figure_formats_set and test_no_gui_backends to @pytest.mark.parametrize for clearer per-case failure reporting. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Remove all unittest.TestCase classes: - TestAutoSuggest → test_changing_provider() - TestContextAwareCompletion → parametrized test_adjust_completion_text_based_on_context - InteractiveShellTestCase → plain functions (update mock_input to not need self) - TerminalMagicsTestCase → test_paste_magics_blankline() https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Replace unittest.TestCase setUp/tearDown with a pytest fixture using tmp_path and monkeypatch.syspath_prepend. Combine the 6 run-submodule test methods into two parametrized functions test_run_submodule and test_debug_run_submodule. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
…and parametrize - Remove all unittest.TestCase subclasses - Add @pytest.fixture recursion_setup to replace setUp - Move class-level code string constants to module level - Convert conditional MemoryErrorTest to @pytest.mark.skipif - Add functools.wraps to recursionlimit decorator so pytest can resolve fixtures through the wrapper - Remove duplicate import sys and import unittest https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Replace TempFileMixin+TestCase with a tmp_pyfile pytest fixture that creates and cleans up temporary Python/IPython files. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
- Replace self.assert* with plain assert statements throughout - Convert setUp/tearDown to pytest fixtures with autouse=True - Replace tt.TempFileMixin with local tmp_pyfile fixture helpers - Remove import unittest; keep class hierarchy for ExitCodeChecks/ TestSystemRaw/TestSystemPipedExitCode (inherited test methods) - Fix trailing whitespace in usage.py, dtexample.py, test_ipdoctest.py https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
…e TestCase classes test_naked_string_cells: The test was failing when run after test_displayhook.py because test_interactivehooks_ast_modes_semi_suppress leaves a semicolon-terminated cell as the last entry in input_hist_parsed. When the next run_cell call uses the default store_history=False, quiet() checks that stale semicolon cell and silences the display hook, so _ is never updated. Fix: use store_history=True and also pre- clear _, __ and ___ from user_ns to avoid the separate update_unders=False issue. Also convert two more test files: - tests/test_tools.py: replace Test_ipexec_validate(TempFileMixin) with ipexec_tmpfile pytest fixture - tests/test_process.py: replace SubProcessTestCase(TempFileMixin) with subprocess_tmpfile pytest fixture; replace self.assert* with plain assert https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Remove unittest.TestCase classes and convert to top-level functions with pytest fixtures. Use pytest.raises instead of self.assertRaises, plain assert instead of self.assert*, and autouse fixtures for teardown. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Remove unittest.TestCase classes and convert to top-level functions with pytest fixtures. Use pytest.raises, plain assert, and caplog instead of assertLogs for log capture. Flatten TestAudioDataWithoutNumpy inheritance into separate _no_numpy functions with skipif_not_numpy guards. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Remove unittest.TestCase base from Fixture and TestAutoreload classes. Convert Fixture setUp/tearDown to an autoreload_fixture pytest fixture using types.SimpleNamespace. All test methods become top-level functions accepting autoreload_fixture. Use pytest.raises and plain assert throughout. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Remove all unittest.TestCase classes. Convert setUp/tearDown to pytest fixtures. Convert all self.assert* to plain assert / pytest.raises. Top-level test functions replace class methods throughout both files. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Replace TempFileMixin-based classes with a run_tmpfile pytest fixture. Convert all test methods to top-level functions. Remove the context manager usage of TempFileMixin by calling the fixture directly. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
- test_ultratb.py: collapse 4-mode test_nonascii_msg loop into parametrize - test_magic.py: convert test_extract_symbols for-loop to parametrize - test_deduperreload.py: collapse 6 identical test_deduperreloader_basic* tests (3 pairs of duplicates) into 3 parametrized cases - test_display.py: fix orphaned test_audio_raises_for_nested_list method left inside a function after class conversion https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
Consolidate 4 test_has_open_quotes* functions into a single parametrized test. Convert test_all_completions_dups internal jedi_status loop to parametrize. https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
oinspect: guard custom_documentations lookup with isinstance(dict) so
objects like polars Expr (which return self for any attribute access via
getattr) no longer raise TypeError when inspected with ?. Fixes #15072.
oinspect: fix inspect.Parameter.empty comparison in MIME-hook path; the
previous code accidentally compared against the property descriptor object
rather than the sentinel, making the required-parameter filter a no-op.
test_interactiveshell: wrap sys.executable and self.fname in shlex.quote()
so test_exit_code_signal survives when the source path contains spaces.
Fixes #15100.
https://claude.ai/code/session_01VPnGTgifZ8HMAfiqEVftjj