openrewrite-migrate-python 0.13.0.dev20260820170959__tar.gz → 0.13.1__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.
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/PKG-INFO +1 -1
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/pyproject.toml +1 -1
- openrewrite_migrate_python-0.13.1/src/openrewrite_code_quality_python/codequality/find_suspicious_chained_comparison.py +122 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python.egg-info/PKG-INFO +1 -1
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python.egg-info/SOURCES.txt +1 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/setup.cfg +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_code_quality_python/__init__.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_code_quality_python/codequality/__init__.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_code_quality_python/codequality/_semantically_equal.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_code_quality_python/codequality/all_branches_identical.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_code_quality_python/codequality/boolean_checks_not_inverted.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_code_quality_python/codequality/collapsible_if_statements.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_code_quality_python/codequality/merge_identical_branches.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_code_quality_python/codequality/remove_duplicate_conditions.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_code_quality_python/codequality/remove_self_assignment.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_code_quality_python/codequality/remove_unconditional_value_overwrite.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_code_quality_python/codequality/simplify_boolean_literal.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_code_quality_python/codequality/simplify_redundant_logical_expression.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/__init__.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/__init__.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/_import_hygiene.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/_markers.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/_typing_imports.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/aifc_migrations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/array_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/ast_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/asyncio_coroutine_to_async.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/asyncio_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/avro_migrations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/calendar_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/cgi_migrations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/cgi_parse_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/collections_abc_migrations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/configparser_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/datetime_utc.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/distutils_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/distutils_migrations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/functools_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/future_imports.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/gettext_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/html_parser_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/imp_migrations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/langchain_classic_imports.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/langchain_community_imports.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/langchain_provider_imports.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/locale_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/locale_getdefaultlocale_deprecation.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/macpath_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/mailcap_migrations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/nntplib_migrations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/os_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/pathlib_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/pep594_system_migrations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/pipes_migrations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/pkgutil_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/platform_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/pydantic_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/pydantic_fields.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/pydantic_model_fields.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/re_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/removed_modules_312.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/shutil_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/socket_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/ssl_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/string_formatting.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/sys_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/sys_last_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/tarfile_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/telnetlib_migrations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/tempfile_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/threading_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/threading_is_alive_deprecation.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/typing_callable.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/typing_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/typing_union_to_pipe.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/unittest_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/upgrade_to_langchain02.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/upgrade_to_langchain1.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/upgrade_to_pydantic.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/upgrade_to_python310.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/upgrade_to_python311.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/upgrade_to_python312.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/upgrade_to_python313.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/upgrade_to_python314.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/upgrade_to_python38.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/upgrade_to_python39.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/urllib_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/uu_migrations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/xdrlib_migrations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python/migrate/xml_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python.egg-info/dependency_links.txt +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python.egg-info/entry_points.txt +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python.egg-info/requires.txt +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/src/openrewrite_migrate_python.egg-info/top_level.txt +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_aifc_migrations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_array_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_ast_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_asyncio_coroutine_to_async.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_asyncio_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_avro_migrations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_calendar_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_cgi_parse_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_change_import_recipes.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_collections_abc_migrations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_configparser_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_datetime_utc.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_distutils_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_future_imports.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_gettext_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_html_parser_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_imp_migrations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_langchain_classic_imports.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_langchain_community_imports.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_langchain_provider_imports.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_locale_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_locale_getdefaultlocale_deprecation.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_macpath_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_os_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_pep594_migrations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_pep594_system_migrations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_pkgutil_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_platform_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_pydantic_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_pydantic_fields.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_pydantic_model_fields.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_re_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_removed_modules_312.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_shutil_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_ssl_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_string_formatting.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_sys_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_sys_last_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_tarfile_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_threading_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_threading_extended.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_threading_is_alive_deprecation.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_typing_alias_moves.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_typing_callable.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_typing_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_typing_union_to_pipe.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_unittest_deprecations.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_upgrade_recipes.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_upgrade_to_pydantic.py +0 -0
- {openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/tests/test_xml_deprecations.py +0 -0
{openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: openrewrite-migrate-python
|
|
3
|
-
Version: 0.13.
|
|
3
|
+
Version: 0.13.1
|
|
4
4
|
Summary: OpenRewrite recipes for migrating Python codebases to newer Python versions.
|
|
5
5
|
Author-email: "Moderne Inc." <support@moderne.io>
|
|
6
6
|
License: Moderne Proprietary
|
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "openrewrite-migrate-python"
|
|
7
7
|
description = "OpenRewrite recipes for migrating Python codebases to newer Python versions."
|
|
8
|
-
version = "0.13.
|
|
8
|
+
version = "0.13.1" # Updated dynamically during release
|
|
9
9
|
authors = [{ name = "Moderne Inc.", email = "support@moderne.io" }]
|
|
10
10
|
license = { text = "Moderne Proprietary" }
|
|
11
11
|
readme = "README.md"
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Recipe to find suspicious chained comparisons with conflicting direction.
|
|
3
|
+
|
|
4
|
+
Python evaluates ``a < b < c`` as ``(a < b) and (b < c)``. When the two
|
|
5
|
+
links point in opposite directions--one of ``<``/``<=`` and the other of
|
|
6
|
+
``>``/``>=``--the chain is almost always a mistake, e.g. ``0 <= x >= 10``
|
|
7
|
+
was likely meant to be ``0 <= x <= 10``. This is a search recipe: the
|
|
8
|
+
intent is ambiguous, so it flags the expression rather than rewriting it.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from typing import Any, List, Optional
|
|
12
|
+
|
|
13
|
+
from rewrite import ExecutionContext, Recipe, TreeVisitor
|
|
14
|
+
from rewrite.category import CategoryDescriptor
|
|
15
|
+
from rewrite.decorators import categorize
|
|
16
|
+
from rewrite.marketplace import Python
|
|
17
|
+
from rewrite.markers import Markers, SearchResult
|
|
18
|
+
from rewrite.python.visitor import PythonVisitor
|
|
19
|
+
from rewrite.java.tree import Binary as JBinary, Expression
|
|
20
|
+
from rewrite.utils import random_id
|
|
21
|
+
|
|
22
|
+
_CodeQuality = [
|
|
23
|
+
*Python,
|
|
24
|
+
CategoryDescriptor(display_name="Code quality"),
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
_LESS = (JBinary.Type.LessThan, JBinary.Type.LessThanOrEqual)
|
|
28
|
+
_GREATER = (JBinary.Type.GreaterThan, JBinary.Type.GreaterThanOrEqual)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def _direction(operator: JBinary.Type) -> Optional[str]:
|
|
32
|
+
"""Classify an ordering operator as ``"less"``, ``"greater"``, or None."""
|
|
33
|
+
if operator in _LESS:
|
|
34
|
+
return "less"
|
|
35
|
+
if operator in _GREATER:
|
|
36
|
+
return "greater"
|
|
37
|
+
return None
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def _mark(tree: Expression) -> Expression:
|
|
41
|
+
"""Attach a SearchResult flagging the conflicting chained comparison."""
|
|
42
|
+
message = (
|
|
43
|
+
"Suspicious chained comparison: the two comparisons point in "
|
|
44
|
+
"opposite directions, so the chain narrows to a surprising range. "
|
|
45
|
+
"Did you mean to keep both comparisons in the same direction?"
|
|
46
|
+
)
|
|
47
|
+
marker = SearchResult(random_id(), message)
|
|
48
|
+
current = tree.markers
|
|
49
|
+
return tree.replace(
|
|
50
|
+
_markers=Markers(current.id, list(current.markers) + [marker])
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
@categorize(_CodeQuality)
|
|
55
|
+
class FindSuspiciousChainedComparison(Recipe):
|
|
56
|
+
"""
|
|
57
|
+
Find chained comparisons whose links point in opposite directions.
|
|
58
|
+
|
|
59
|
+
A chain such as ``0 <= x >= 10`` reads as ``0 <= x and x >= 10``, which
|
|
60
|
+
is a needlessly convoluted way to say ``x >= 10`` and is almost always a
|
|
61
|
+
typo for ``0 <= x <= 10``. Mixing ``<``/``<=`` with ``>``/``>=`` in a
|
|
62
|
+
single chain is the tell-tale sign.
|
|
63
|
+
|
|
64
|
+
Example:
|
|
65
|
+
Flagged:
|
|
66
|
+
if 0 <= x >= 10:
|
|
67
|
+
pass
|
|
68
|
+
|
|
69
|
+
Not flagged (monotonic):
|
|
70
|
+
if 0 <= x <= 10:
|
|
71
|
+
pass
|
|
72
|
+
"""
|
|
73
|
+
|
|
74
|
+
@property
|
|
75
|
+
def name(self) -> str:
|
|
76
|
+
return "org.openrewrite.python.codequality.FindSuspiciousChainedComparison"
|
|
77
|
+
|
|
78
|
+
@property
|
|
79
|
+
def display_name(self) -> str:
|
|
80
|
+
return "Find suspicious chained comparisons"
|
|
81
|
+
|
|
82
|
+
@property
|
|
83
|
+
def description(self) -> str:
|
|
84
|
+
return (
|
|
85
|
+
"Find chained comparisons that mix `<`/`<=` with `>`/`>=` (for "
|
|
86
|
+
"example `0 <= x >= 10`), where the links point in opposite "
|
|
87
|
+
"directions and the chain is almost always a mistake."
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
@property
|
|
91
|
+
def tags(self) -> List[str]:
|
|
92
|
+
return ["python", "code-quality"]
|
|
93
|
+
|
|
94
|
+
@property
|
|
95
|
+
def estimated_effort_per_occurrence(self) -> int:
|
|
96
|
+
return 5
|
|
97
|
+
|
|
98
|
+
def editor(self) -> TreeVisitor[Any, ExecutionContext]:
|
|
99
|
+
class Visitor(PythonVisitor[ExecutionContext]):
|
|
100
|
+
def visit_binary(
|
|
101
|
+
self, binary: JBinary, p: ExecutionContext
|
|
102
|
+
) -> Optional[Expression]:
|
|
103
|
+
binary = super().visit_binary(binary, p)
|
|
104
|
+
|
|
105
|
+
if not isinstance(binary, JBinary):
|
|
106
|
+
return binary
|
|
107
|
+
|
|
108
|
+
outer = _direction(binary.operator)
|
|
109
|
+
if outer is None:
|
|
110
|
+
return binary
|
|
111
|
+
|
|
112
|
+
inner = binary.left
|
|
113
|
+
if not isinstance(inner, JBinary):
|
|
114
|
+
return binary
|
|
115
|
+
|
|
116
|
+
left = _direction(inner.operator)
|
|
117
|
+
if left is None or left == outer:
|
|
118
|
+
return binary
|
|
119
|
+
|
|
120
|
+
return _mark(binary)
|
|
121
|
+
|
|
122
|
+
return Visitor()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: openrewrite-migrate-python
|
|
3
|
-
Version: 0.13.
|
|
3
|
+
Version: 0.13.1
|
|
4
4
|
Summary: OpenRewrite recipes for migrating Python codebases to newer Python versions.
|
|
5
5
|
Author-email: "Moderne Inc." <support@moderne.io>
|
|
6
6
|
License: Moderne Proprietary
|
|
@@ -5,6 +5,7 @@ src/openrewrite_code_quality_python/codequality/_semantically_equal.py
|
|
|
5
5
|
src/openrewrite_code_quality_python/codequality/all_branches_identical.py
|
|
6
6
|
src/openrewrite_code_quality_python/codequality/boolean_checks_not_inverted.py
|
|
7
7
|
src/openrewrite_code_quality_python/codequality/collapsible_if_statements.py
|
|
8
|
+
src/openrewrite_code_quality_python/codequality/find_suspicious_chained_comparison.py
|
|
8
9
|
src/openrewrite_code_quality_python/codequality/merge_identical_branches.py
|
|
9
10
|
src/openrewrite_code_quality_python/codequality/remove_duplicate_conditions.py
|
|
10
11
|
src/openrewrite_code_quality_python/codequality/remove_self_assignment.py
|
{openrewrite_migrate_python-0.13.0.dev20260820170959 → openrewrite_migrate_python-0.13.1}/setup.cfg
RENAMED
|
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
|
|
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
|