rp 0.1.1352__tar.gz → 0.1.1354__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rp-0.1.1352 → rp-0.1.1354}/.setup.py.un~ +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/PKG-INFO +1 -1
- {rp-0.1.1352 → rp-0.1.1354}/rp/r.py +5 -4
- rp-0.1.1354/rp/rp_ptpython/unreachable_detector.py +287 -0
- rp-0.1.1354/rp/version.py +1 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp.egg-info/PKG-INFO +1 -1
- {rp-0.1.1352 → rp-0.1.1354}/rp.egg-info/SOURCES.txt +1 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp.egg-info/requires.txt +1 -0
- {rp-0.1.1352 → rp-0.1.1354}/setup.py +1 -0
- rp-0.1.1354/version.py +1 -0
- rp-0.1.1352/rp/version.py +0 -1
- rp-0.1.1352/version.py +0 -1
- {rp-0.1.1352 → rp-0.1.1354}/.gitignore +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/.idea/QuickPython.iml +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/.idea/QuickPython.time +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/.idea/encodings.xml +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/.idea/inspectionProfiles/Project_Default.xml +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/.idea/misc.xml +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/.idea/modules.xml +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/.idea/vcs.xml +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/.idea/workspace.xml +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/.publish.sh.un~ +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/.update_module_paths.py.un~ +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/LICENSE.txt +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/README +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/Scrap +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/aoisdasd +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/increment_version.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/oijio +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/publish.sh +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/pyqtconsoletest.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/__main__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/documentation.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/Pyperclip.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/debug_comment.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/draw_code_minimap.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/graveyard.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/_compatibility.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/cache.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/file_io.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/grammar.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/normalizer.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/parser.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/pgen2/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/pgen2/generator.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/pgen2/grammar_parser.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/python/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/python/diff.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/python/errors.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/python/grammar26.txt +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/python/grammar27.txt +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/python/grammar310.txt +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/python/grammar311.txt +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/python/grammar312.txt +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/python/grammar33.txt +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/python/grammar34.txt +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/python/grammar35.txt +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/python/grammar36.txt +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/python/grammar37.txt +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/python/grammar38.txt +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/python/grammar39.txt +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/python/parser.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/python/pep8.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/python/prefix.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/python/token.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/python/tokenize.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/python/tree.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/tree.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/parso/utils.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/peepdis/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/peepdis/core.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/peepdis/datastructures.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/peepdis/legacy.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/peepdis/preferences.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/powerpoint_converter.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/profile_vim_plugins.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyflann/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyflann/bindings/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyflann/bindings/flann_ctypes.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyflann/exceptions.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyflann/index.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyflann/io/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyflann/io/binary_dataset.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyflann/io/dat_dataset.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyflann/io/dataset.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyflann/io/hdf5_dataset.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyflann/io/npy_dataset.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyflann/util/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyflann/util/weave_tools.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/__version__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/app.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/cli.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/cli_utils.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/config/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/config/config.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/config/config_error.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/config/config_parser.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/config/config_transformer.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/config/validators/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/config/validators/options.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/logging.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/model/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/model/autocomplete/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/model/autocomplete/autocomplete_listener.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/model/common/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/model/common/jsonpath/JSONPathLexer.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/model/common/jsonpath/JSONPathListener.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/model/common/jsonpath/JSONPathParser.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/model/common/jsonpath/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/model/io/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/model/io/datasource.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/model/model.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/service/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/service/client.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/service/dispatcher.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/common/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/common/popup.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/common/selectable_text.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/components/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/components/autocomplete_popup/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/components/autocomplete_popup/autocomplete_popup.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/components/autocomplete_popup/autocomplete_popup_keymapper.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/components/help_bar/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/components/help_bar/help_bar.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/components/help_page/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/components/help_page/detailed_help_page.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/components/json_browser/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/components/json_browser/json_browser.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/components/json_browser/json_browser_keymapper.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/components/query_bar/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/components/query_bar/query_bar.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/components/query_bar/query_bar_keymapper.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/array/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/array/array_end_node.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/array/array_end_widget.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/array/array_node.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/array/array_start_widget.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/array/array_unexpanded_widget.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/json_composite_end_node.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/json_composite_node.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/json_listbox.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/json_listwalker.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/json_simple_node.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/json_widget.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/node_factory.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/object/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/object/object_end_node.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/object/object_end_widget.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/object/object_node.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/object/object_start_widget.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/object/object_unexpanded_widget.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/primitive/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/primitive/base.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/primitive/boolean.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/primitive/generic.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/primitive/integer.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/primitive/null.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/primitive/numeric.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/primitive/string.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/json_lib/selector/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/keymapper/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/keymapper/abstract_component_keymapper.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/keymapper/keymapper.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/keymapper/keymapper_config.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/keymapper/keymapper_config_parser.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/theme/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/theme/theme.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/theme/theme_config.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/theme/theme_config_parser.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/view_config.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/view_frame.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pyfx/view/view_manager.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pynput_recorder.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pypi_inspection.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/pytorch_module_explorer.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/refactor/string_format/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/refactor/string_format/format_to_fstring_converter.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/refactor/string_format/fstring_converter.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/refactor/string_format/test_format_to_fstring_converter.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/refactor/string_format/test_fstring_converter.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/rp_black_macchiato.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/stamp_tensor.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/stdin_python_highlighter.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/tetris/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/tetris/__main__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/tetris/graphics/graphics/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/tetris/graphics/graphics/canvas.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/tetris/graphics/graphics/colors.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/tetris/graphics/graphics/console.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/tetris/graphics/graphics/funcs.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/tetris/graphics/graphics/nbinput.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/tetris/graphics/graphics/shapes.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/tetris/graphics/graphics/sprite.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/tetris/letters.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/tetris/tetrisShapes.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/timg/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/timg/__main__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/timg/argparser.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/timg/meta.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/timg/methods/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/timg/methods/ansi.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/timg/methods/ansi_methods.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/timg/methods/ascii.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/timg/methods/method.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/timg/methods/sixel.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/timg/renderer.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/torch_hooks.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/torch_tools.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/tracetraptest.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/tweenline.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/libs/webeval_dataset.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/list_of_modules.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/application.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/auto_suggest.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/buffer.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/buffer_mapping.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/cache.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/clipboard/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/clipboard/base.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/clipboard/in_memory.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/clipboard/pyperclip.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/completion.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/contrib/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/contrib/completers/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/contrib/completers/base.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/contrib/completers/filesystem.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/contrib/completers/system.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/contrib/regular_languages/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/contrib/regular_languages/compiler.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/contrib/regular_languages/completion.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/contrib/regular_languages/lexer.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/contrib/regular_languages/regex_parser.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/contrib/regular_languages/validation.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/contrib/telnet/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/contrib/telnet/application.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/contrib/telnet/log.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/contrib/telnet/protocol.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/contrib/telnet/server.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/contrib/validators/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/contrib/validators/base.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/document.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/enums.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/eventloop/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/eventloop/asyncio_base.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/eventloop/asyncio_posix.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/eventloop/asyncio_win32.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/eventloop/base.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/eventloop/callbacks.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/eventloop/inputhook.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/eventloop/posix.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/eventloop/posix_utils.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/eventloop/select.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/eventloop/utils.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/eventloop/win32.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/filters/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/filters/base.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/filters/cli.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/filters/types.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/filters/utils.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/history.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/input.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/interface.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/key_binding/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/key_binding/bindings/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/key_binding/bindings/basic.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/key_binding/bindings/completion.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/key_binding/bindings/emacs.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/key_binding/bindings/named_commands.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/key_binding/bindings/scroll.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/key_binding/bindings/vi.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/key_binding/defaults.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/key_binding/digraphs.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/key_binding/input_processor.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/key_binding/manager.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/key_binding/registry.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/key_binding/vi_state.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/keys.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/layout/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/layout/containers.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/layout/controls.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/layout/dimension.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/layout/lexers.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/layout/margins.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/layout/menus.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/layout/mouse_handlers.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/layout/processors.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/layout/prompt.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/layout/screen.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/layout/toolbars.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/layout/untitled.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/layout/utils.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/mouse_events.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/output.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/reactive.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/renderer.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/search_state.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/selection.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/shortcuts.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/styles/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/styles/base.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/styles/defaults.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/styles/from_dict.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/styles/from_pygments.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/styles/utils.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/terminal/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/terminal/conemu_output.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/terminal/vt100_input.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/terminal/vt100_output.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/terminal/win32_input.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/terminal/win32_output.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/token.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/utils.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/validation.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/prompt_toolkit/win32_types.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/__main__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/ast_selection.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/async_analyzer_base.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/async_jedi_highlighter.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/bash_completer.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/completer.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/completer_old.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/completion_ranker.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/completion_schema.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/completion_types.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/eventloop.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/filters.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/history_browser.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/ipython.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/jedi_highlighter.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/jedi_lexer.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/jedi_utils.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/key_bindings.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/layout.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/patch_linecache.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/path_completer_utils.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/prompt_style.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/python_input.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/r_iterm_comm.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/repl.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/rp_ptpdb/__init__.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/rp_ptpdb/commands.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/rp_ptpdb/completers.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/rp_ptpdb/completion_hints.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/rp_ptpdb/grammar.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/rp_ptpdb/key_bindings.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/rp_ptpdb/layout.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/rp_ptpdb/style.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/rp_ptpdb/toolbars.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/style.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/testable_keybindings.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/treesitter_semantic.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/utils.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/rp_ptpython/validator.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/ryan_vimrc.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp/web_evaluator.py +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp.egg-info/dependency_links.txt +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp.egg-info/entry_points.txt +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/rp.egg-info/top_level.txt +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/setup.cfg +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/untitled.c +0 -0
- {rp-0.1.1352 → rp-0.1.1354}/update_module_paths.py +0 -0
|
Binary file
|
|
@@ -22452,6 +22452,8 @@ def _multi_line_python_input(prompt):
|
|
|
22452
22452
|
return out+'\n'+_multi_line_python_input(' '*len(prompt))
|
|
22453
22453
|
return out
|
|
22454
22454
|
|
|
22455
|
+
|
|
22456
|
+
_treesitter_supported=tuple(sys.version_info) >= (3,10)
|
|
22455
22457
|
_default_pyin_settings=dict(
|
|
22456
22458
|
enable_mouse_support=False,
|
|
22457
22459
|
enable_history_search=True,
|
|
@@ -22476,10 +22478,9 @@ _default_pyin_settings=dict(
|
|
|
22476
22478
|
wrap_lines=True,
|
|
22477
22479
|
complete_while_typing=True,
|
|
22478
22480
|
allow_jedi_dynamic_imports=False, # When False, prevent Jedi from importing unloaded modules (faster on NFS)
|
|
22479
|
-
enable_semantic_highlighting=True, # When True, use Jedi to add semantic highlighting (callables, modules)
|
|
22480
|
-
gray_unreachable_code=True, # When True, dim unreachable code (requires enable_semantic_highlighting)
|
|
22481
|
-
enable_linting=True, #
|
|
22482
|
-
linting_mode='on', # Linting mode: 'off' (no linting), 'on' (critical errors only), 'verbose' (all errors including style nazis)
|
|
22481
|
+
enable_semantic_highlighting=True and _treesitter_supported, # When True, use Jedi to add semantic highlighting (callables, modules)
|
|
22482
|
+
gray_unreachable_code =True and _treesitter_supported, # When True, dim unreachable code (requires enable_semantic_highlighting)
|
|
22483
|
+
enable_linting =True and _treesitter_supported, # Might set to false if I dont make this async...kinda slow right now...
|
|
22483
22484
|
vi_mode=False,
|
|
22484
22485
|
paste_mode=False ,
|
|
22485
22486
|
confirm_exit=True ,
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Unreachable code detection using AST analysis.
|
|
3
|
+
|
|
4
|
+
Detects code that can never be executed due to control flow.
|
|
5
|
+
"""
|
|
6
|
+
import ast
|
|
7
|
+
from typing import Set, List, Optional
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class UnreachableCodeDetector:
|
|
11
|
+
"""
|
|
12
|
+
Detects unreachable code using static AST analysis.
|
|
13
|
+
|
|
14
|
+
Patterns detected:
|
|
15
|
+
- Code after return/raise/break/continue at same indentation level
|
|
16
|
+
- Code in `if False/0:` blocks
|
|
17
|
+
- Else blocks in `if True/1:` statements
|
|
18
|
+
- Code after `assert False`
|
|
19
|
+
- Code after `sys.exit()` or `exit()` or `quit()`
|
|
20
|
+
- Code after infinite loops (while True with no break)
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
def __init__(self, code: str):
|
|
24
|
+
"""Initialize with Python code string."""
|
|
25
|
+
self.code = code
|
|
26
|
+
self.lines = code.splitlines()
|
|
27
|
+
self.unreachable_lines: Set[int] = set()
|
|
28
|
+
self.unreachable_ranges: List[tuple] = [] # [(start_line, end_line), ...]
|
|
29
|
+
|
|
30
|
+
try:
|
|
31
|
+
self.tree = ast.parse(code)
|
|
32
|
+
self._analyze()
|
|
33
|
+
except SyntaxError:
|
|
34
|
+
# Invalid Python - can't analyze
|
|
35
|
+
self.tree = None
|
|
36
|
+
|
|
37
|
+
def _analyze(self):
|
|
38
|
+
"""Run unreachable code analysis."""
|
|
39
|
+
if not self.tree:
|
|
40
|
+
return
|
|
41
|
+
|
|
42
|
+
visitor = _UnreachableVisitor(self)
|
|
43
|
+
visitor.visit(self.tree)
|
|
44
|
+
|
|
45
|
+
def get_unreachable_lines(self) -> Set[int]:
|
|
46
|
+
"""Get all unreachable line numbers (1-indexed)."""
|
|
47
|
+
return self.unreachable_lines
|
|
48
|
+
|
|
49
|
+
def is_unreachable(self, line: int) -> bool:
|
|
50
|
+
"""Check if a specific line is unreachable."""
|
|
51
|
+
return line in self.unreachable_lines
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class _UnreachableVisitor(ast.NodeVisitor):
|
|
55
|
+
"""Internal visitor for detecting unreachable code."""
|
|
56
|
+
|
|
57
|
+
def __init__(self, detector: UnreachableCodeDetector):
|
|
58
|
+
self.detector = detector
|
|
59
|
+
self.current_returns = [] # Stack of return-like statements
|
|
60
|
+
|
|
61
|
+
def visit_FunctionDef(self, node):
|
|
62
|
+
"""Process function definitions."""
|
|
63
|
+
self._check_body_for_unreachable(node.body)
|
|
64
|
+
self.generic_visit(node)
|
|
65
|
+
|
|
66
|
+
def visit_AsyncFunctionDef(self, node):
|
|
67
|
+
"""Process async function definitions."""
|
|
68
|
+
self._check_body_for_unreachable(node.body)
|
|
69
|
+
self.generic_visit(node)
|
|
70
|
+
|
|
71
|
+
def visit_If(self, node):
|
|
72
|
+
"""Process if statements to find always true/false conditions."""
|
|
73
|
+
# Check if condition is constant
|
|
74
|
+
const_value = self._get_constant_value(node.test)
|
|
75
|
+
|
|
76
|
+
if const_value is True or const_value == 1:
|
|
77
|
+
# if True: the else block is unreachable
|
|
78
|
+
if node.orelse:
|
|
79
|
+
self._mark_unreachable_nodes(node.orelse)
|
|
80
|
+
elif const_value is False or const_value == 0:
|
|
81
|
+
# if False: the if block is unreachable
|
|
82
|
+
self._mark_unreachable_nodes(node.body)
|
|
83
|
+
# Continue analyzing the else block
|
|
84
|
+
for item in node.orelse:
|
|
85
|
+
self.visit(item)
|
|
86
|
+
return # Don't visit the unreachable if body
|
|
87
|
+
|
|
88
|
+
# Check bodies for unreachable code
|
|
89
|
+
self._check_body_for_unreachable(node.body)
|
|
90
|
+
self._check_body_for_unreachable(node.orelse)
|
|
91
|
+
|
|
92
|
+
self.generic_visit(node)
|
|
93
|
+
|
|
94
|
+
def visit_While(self, node):
|
|
95
|
+
"""Process while loops."""
|
|
96
|
+
const_value = self._get_constant_value(node.test)
|
|
97
|
+
|
|
98
|
+
if const_value is False or const_value == 0:
|
|
99
|
+
# while False: the body is unreachable
|
|
100
|
+
self._mark_unreachable_nodes(node.body)
|
|
101
|
+
# Continue with else block
|
|
102
|
+
for item in node.orelse:
|
|
103
|
+
self.visit(item)
|
|
104
|
+
return
|
|
105
|
+
elif const_value is True or const_value == 1:
|
|
106
|
+
# while True: check if there's a break
|
|
107
|
+
has_break = self._has_break(node.body)
|
|
108
|
+
if not has_break:
|
|
109
|
+
# Infinite loop with no break - else is unreachable
|
|
110
|
+
if node.orelse:
|
|
111
|
+
self._mark_unreachable_nodes(node.orelse)
|
|
112
|
+
# Also mark this as a terminating statement for the parent scope
|
|
113
|
+
# Store this info so parent can detect unreachable code after the loop
|
|
114
|
+
self.is_infinite_loop = True
|
|
115
|
+
|
|
116
|
+
self._check_body_for_unreachable(node.body)
|
|
117
|
+
self._check_body_for_unreachable(node.orelse)
|
|
118
|
+
self.generic_visit(node)
|
|
119
|
+
|
|
120
|
+
def visit_For(self, node):
|
|
121
|
+
"""Process for loops."""
|
|
122
|
+
self._check_body_for_unreachable(node.body)
|
|
123
|
+
self._check_body_for_unreachable(node.orelse)
|
|
124
|
+
self.generic_visit(node)
|
|
125
|
+
|
|
126
|
+
def visit_Try(self, node):
|
|
127
|
+
"""Process try blocks."""
|
|
128
|
+
self._check_body_for_unreachable(node.body)
|
|
129
|
+
for handler in node.handlers:
|
|
130
|
+
self._check_body_for_unreachable(handler.body)
|
|
131
|
+
self._check_body_for_unreachable(node.orelse)
|
|
132
|
+
self._check_body_for_unreachable(node.finalbody)
|
|
133
|
+
self.generic_visit(node)
|
|
134
|
+
|
|
135
|
+
def visit_With(self, node):
|
|
136
|
+
"""Process with statements."""
|
|
137
|
+
self._check_body_for_unreachable(node.body)
|
|
138
|
+
self.generic_visit(node)
|
|
139
|
+
|
|
140
|
+
def _check_body_for_unreachable(self, body: List[ast.AST]):
|
|
141
|
+
"""Check a body of statements for unreachable code."""
|
|
142
|
+
if not body:
|
|
143
|
+
return
|
|
144
|
+
|
|
145
|
+
for i, stmt in enumerate(body):
|
|
146
|
+
# Check if this statement makes following code unreachable
|
|
147
|
+
if self._is_terminating_statement(stmt):
|
|
148
|
+
# Mark all following statements as unreachable
|
|
149
|
+
for unreachable_stmt in body[i + 1:]:
|
|
150
|
+
self._mark_unreachable_nodes([unreachable_stmt])
|
|
151
|
+
break
|
|
152
|
+
|
|
153
|
+
# Check for infinite loops (while True without break)
|
|
154
|
+
if isinstance(stmt, ast.While):
|
|
155
|
+
const_value = self._get_constant_value(stmt.test)
|
|
156
|
+
if const_value is True or const_value == 1:
|
|
157
|
+
if not self._has_break(stmt.body):
|
|
158
|
+
# Infinite loop - everything after is unreachable
|
|
159
|
+
for unreachable_stmt in body[i + 1:]:
|
|
160
|
+
self._mark_unreachable_nodes([unreachable_stmt])
|
|
161
|
+
# Still visit the loop body
|
|
162
|
+
self.visit(stmt)
|
|
163
|
+
break
|
|
164
|
+
|
|
165
|
+
# Continue visiting this statement
|
|
166
|
+
self.visit(stmt)
|
|
167
|
+
|
|
168
|
+
def _is_terminating_statement(self, node: ast.AST) -> bool:
|
|
169
|
+
"""Check if a statement terminates control flow."""
|
|
170
|
+
if isinstance(node, (ast.Return, ast.Raise, ast.Break, ast.Continue)):
|
|
171
|
+
return True
|
|
172
|
+
|
|
173
|
+
# Check for assert False
|
|
174
|
+
if isinstance(node, ast.Assert):
|
|
175
|
+
const_value = self._get_constant_value(node.test)
|
|
176
|
+
if const_value is False:
|
|
177
|
+
return True
|
|
178
|
+
|
|
179
|
+
# Check for sys.exit(), exit(), quit()
|
|
180
|
+
if isinstance(node, ast.Expr) and isinstance(node.value, ast.Call):
|
|
181
|
+
call = node.value
|
|
182
|
+
if isinstance(call.func, ast.Name):
|
|
183
|
+
if call.func.id in ('exit', 'quit'):
|
|
184
|
+
return True
|
|
185
|
+
elif isinstance(call.func, ast.Attribute):
|
|
186
|
+
# sys.exit()
|
|
187
|
+
if (isinstance(call.func.value, ast.Name) and
|
|
188
|
+
call.func.value.id == 'sys' and
|
|
189
|
+
call.func.attr == 'exit'):
|
|
190
|
+
return True
|
|
191
|
+
|
|
192
|
+
return False
|
|
193
|
+
|
|
194
|
+
def _has_break(self, body: List[ast.AST]) -> bool:
|
|
195
|
+
"""Check if a body contains a break statement (not in nested loop)."""
|
|
196
|
+
for stmt in body:
|
|
197
|
+
if isinstance(stmt, ast.Break):
|
|
198
|
+
return True
|
|
199
|
+
# Don't look inside nested loops
|
|
200
|
+
if not isinstance(stmt, (ast.For, ast.While)):
|
|
201
|
+
# Check nested if/try/with blocks
|
|
202
|
+
if isinstance(stmt, ast.If):
|
|
203
|
+
if self._has_break(stmt.body) or self._has_break(stmt.orelse):
|
|
204
|
+
return True
|
|
205
|
+
elif isinstance(stmt, ast.Try):
|
|
206
|
+
if self._has_break(stmt.body):
|
|
207
|
+
return True
|
|
208
|
+
for handler in stmt.handlers:
|
|
209
|
+
if self._has_break(handler.body):
|
|
210
|
+
return True
|
|
211
|
+
elif isinstance(stmt, ast.With):
|
|
212
|
+
if self._has_break(stmt.body):
|
|
213
|
+
return True
|
|
214
|
+
return False
|
|
215
|
+
|
|
216
|
+
def _get_constant_value(self, node: ast.AST) -> Optional[object]:
|
|
217
|
+
"""Get the constant value of a node if it's a constant."""
|
|
218
|
+
if isinstance(node, ast.Constant):
|
|
219
|
+
# Python 3.8+ uses ast.Constant
|
|
220
|
+
return node.value
|
|
221
|
+
elif isinstance(node, ast.NameConstant):
|
|
222
|
+
# Python 3.7 uses ast.NameConstant for True/False/None
|
|
223
|
+
return node.value
|
|
224
|
+
elif isinstance(node, ast.Num):
|
|
225
|
+
# Python 3.7 uses ast.Num for numbers
|
|
226
|
+
return node.n
|
|
227
|
+
elif isinstance(node, ast.UnaryOp) and isinstance(node.op, ast.Not):
|
|
228
|
+
# Handle `not True`, `not False`, etc.
|
|
229
|
+
inner = self._get_constant_value(node.operand)
|
|
230
|
+
if inner is not None:
|
|
231
|
+
return not inner
|
|
232
|
+
return None
|
|
233
|
+
|
|
234
|
+
def _mark_unreachable_nodes(self, nodes: List[ast.AST]):
|
|
235
|
+
"""Mark nodes as unreachable by adding their line ranges."""
|
|
236
|
+
for node in nodes:
|
|
237
|
+
if hasattr(node, 'lineno'):
|
|
238
|
+
start_line = node.lineno
|
|
239
|
+
end_line = getattr(node, 'end_lineno', start_line)
|
|
240
|
+
|
|
241
|
+
# Add all lines in this range
|
|
242
|
+
for line in range(start_line, end_line + 1):
|
|
243
|
+
self.detector.unreachable_lines.add(line)
|
|
244
|
+
|
|
245
|
+
# Store the range for reference
|
|
246
|
+
self.detector.unreachable_ranges.append((start_line, end_line))
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
def get_unreachable_positions(code: str) -> Set[tuple]:
|
|
250
|
+
"""
|
|
251
|
+
Get all unreachable token positions in the code using actual lexer tokenization.
|
|
252
|
+
|
|
253
|
+
Returns:
|
|
254
|
+
Set of (line, column, length) tuples for unreachable code.
|
|
255
|
+
"""
|
|
256
|
+
from pygments.lexers import PythonLexer
|
|
257
|
+
from pygments import lex
|
|
258
|
+
|
|
259
|
+
detector = UnreachableCodeDetector(code)
|
|
260
|
+
unreachable_lines = detector.get_unreachable_lines()
|
|
261
|
+
|
|
262
|
+
if not unreachable_lines:
|
|
263
|
+
return set()
|
|
264
|
+
|
|
265
|
+
positions = set()
|
|
266
|
+
lexer = PythonLexer()
|
|
267
|
+
|
|
268
|
+
# Tokenize the entire code with Pygments to get real token positions
|
|
269
|
+
lines = code.splitlines(keepends=True)
|
|
270
|
+
line_num = 1
|
|
271
|
+
col = 0
|
|
272
|
+
|
|
273
|
+
for token_type, text in lex(code, lexer):
|
|
274
|
+
# Track line and column as we go through tokens
|
|
275
|
+
if line_num in unreachable_lines:
|
|
276
|
+
# Add this token's position if it's on an unreachable line
|
|
277
|
+
positions.add((line_num, col, len(text)))
|
|
278
|
+
|
|
279
|
+
# Update position tracking
|
|
280
|
+
for char in text:
|
|
281
|
+
if char == '\n':
|
|
282
|
+
line_num += 1
|
|
283
|
+
col = 0
|
|
284
|
+
else:
|
|
285
|
+
col += 1
|
|
286
|
+
|
|
287
|
+
return positions
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1354
|
|
@@ -939,6 +939,7 @@ rp/rp_ptpython/repl.py
|
|
|
939
939
|
rp/rp_ptpython/style.py
|
|
940
940
|
rp/rp_ptpython/testable_keybindings.py
|
|
941
941
|
rp/rp_ptpython/treesitter_semantic.py
|
|
942
|
+
rp/rp_ptpython/unreachable_detector.py
|
|
942
943
|
rp/rp_ptpython/utils.py
|
|
943
944
|
rp/rp_ptpython/validator.py
|
|
944
945
|
rp/rp_ptpython/../libs/parso/python/grammar26.txt
|
|
@@ -111,6 +111,7 @@ setup(
|
|
|
111
111
|
'dill', #For the pseudo_terminal to run properly
|
|
112
112
|
'lazy_loader', #Boot RP super fast
|
|
113
113
|
'cachetools', #Used for a relatively minor part of RP. But it helps.
|
|
114
|
+
'tree-sitter; python_version >= "3.10"', # Syntax highlighting - ONLY REQUIRE IF OUR PYTHON >= 3.10 !!!
|
|
114
115
|
'tree-sitter-python; python_version >= "3.10"', # Syntax highlighting - ONLY REQUIRE IF OUR PYTHON >= 3.10 !!!
|
|
115
116
|
],
|
|
116
117
|
entry_points=
|
rp-0.1.1354/version.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1354
|
rp-0.1.1352/rp/version.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1352
|
rp-0.1.1352/version.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1352
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|