supplier-meesho.webflow 1.0.0
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.
Potentially problematic release.
This version of supplier-meesho.webflow might be problematic. Click here for more details.
- package/.localized +0 -0
- package/2.sh +1 -0
- package/Complaince.pdf +0 -0
- package/GitRepos/CircleIndicator/.idea/caches/build_file_checksums.ser +0 -0
- package/GitRepos/CircleIndicator/.idea/caches/gradle_models.ser +0 -0
- package/GitRepos/CircleIndicator/.idea/checkstyle-idea.xml +16 -0
- package/GitRepos/CircleIndicator/.idea/compiler.xml +21 -0
- package/GitRepos/CircleIndicator/.idea/copyright/profiles_settings.xml +3 -0
- package/GitRepos/CircleIndicator/.idea/encodings.xml +6 -0
- package/GitRepos/CircleIndicator/.idea/gradle.xml +23 -0
- package/GitRepos/CircleIndicator/.idea/misc.xml +93 -0
- package/GitRepos/CircleIndicator/.idea/modules.xml +11 -0
- package/GitRepos/CircleIndicator/.idea/runConfigurations.xml +12 -0
- package/GitRepos/CircleIndicator/.idea/vcs.xml +6 -0
- package/GitRepos/CircleIndicator/CHANGELOG.md +62 -0
- package/GitRepos/CircleIndicator/LoopingViewPager/README.md +4 -0
- package/GitRepos/CircleIndicator/LoopingViewPager/build.gradle +22 -0
- package/GitRepos/CircleIndicator/LoopingViewPager/proguard-rules.pro +17 -0
- package/GitRepos/CircleIndicator/LoopingViewPager/src/main/AndroidManifest.xml +5 -0
- package/GitRepos/CircleIndicator/LoopingViewPager/src/main/java/com/imbryk/viewPager/LoopPagerAdapterWrapper.java +168 -0
- package/GitRepos/CircleIndicator/LoopingViewPager/src/main/java/com/imbryk/viewPager/LoopViewPager.java +208 -0
- package/GitRepos/CircleIndicator/README.md +73 -0
- package/GitRepos/CircleIndicator/apk/sample.apk +0 -0
- package/GitRepos/CircleIndicator/build.gradle +20 -0
- package/GitRepos/CircleIndicator/circleindicator/build.gradle +30 -0
- package/GitRepos/CircleIndicator/circleindicator/gradle.properties +22 -0
- package/GitRepos/CircleIndicator/circleindicator/proguard-rules.pro +17 -0
- package/GitRepos/CircleIndicator/circleindicator/src/main/AndroidManifest.xml +5 -0
- package/GitRepos/CircleIndicator/circleindicator/src/main/java/me/relex/circleindicator/CircleIndicator.java +323 -0
- package/GitRepos/CircleIndicator/circleindicator/src/main/java/me/relex/circleindicator/SnackbarBehavior.java +45 -0
- package/GitRepos/CircleIndicator/circleindicator/src/main/res/animator/scale_with_alpha.xml +22 -0
- package/GitRepos/CircleIndicator/circleindicator/src/main/res/drawable/white_radius.xml +6 -0
- package/GitRepos/CircleIndicator/circleindicator/src/main/res/values/attrs.xml +60 -0
- package/GitRepos/CircleIndicator/circleindicator/upload-jcenter.gradle +67 -0
- package/GitRepos/CircleIndicator/circleindicator/upload-maven.gradle +55 -0
- package/GitRepos/CircleIndicator/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/GitRepos/CircleIndicator/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/GitRepos/CircleIndicator/gradle.properties +18 -0
- package/GitRepos/CircleIndicator/gradlew +164 -0
- package/GitRepos/CircleIndicator/gradlew.bat +90 -0
- package/GitRepos/CircleIndicator/sample/build.gradle +32 -0
- package/GitRepos/CircleIndicator/sample/proguard-rules.pro +17 -0
- package/GitRepos/CircleIndicator/sample/src/main/AndroidManifest.xml +23 -0
- package/GitRepos/CircleIndicator/sample/src/main/java/me/relex/circleindicator/sample/SampleActivity.java +158 -0
- package/GitRepos/CircleIndicator/sample/src/main/java/me/relex/circleindicator/sample/SamplePagerAdapter.java +59 -0
- package/GitRepos/CircleIndicator/sample/src/main/java/me/relex/circleindicator/sample/fragment/ChangeColorFragment.java +28 -0
- package/GitRepos/CircleIndicator/sample/src/main/java/me/relex/circleindicator/sample/fragment/CustomAnimationFragment.java +28 -0
- package/GitRepos/CircleIndicator/sample/src/main/java/me/relex/circleindicator/sample/fragment/DefaultFragment.java +29 -0
- package/GitRepos/CircleIndicator/sample/src/main/java/me/relex/circleindicator/sample/fragment/DynamicAdapterFragment.java +52 -0
- package/GitRepos/CircleIndicator/sample/src/main/java/me/relex/circleindicator/sample/fragment/LoopViewPagerFragment.java +28 -0
- package/GitRepos/CircleIndicator/sample/src/main/java/me/relex/circleindicator/sample/fragment/ResetAdapterFragment.java +41 -0
- package/GitRepos/CircleIndicator/sample/src/main/java/me/relex/circleindicator/sample/fragment/SnackbarBehaviorFragment.java +44 -0
- package/GitRepos/CircleIndicator/sample/src/main/res/animator/indicator_animator.xml +16 -0
- package/GitRepos/CircleIndicator/sample/src/main/res/animator/indicator_animator_reverse.xml +10 -0
- package/GitRepos/CircleIndicator/sample/src/main/res/animator/indicator_no_animator.xml +4 -0
- package/GitRepos/CircleIndicator/sample/src/main/res/drawable/black_radius.xml +8 -0
- package/GitRepos/CircleIndicator/sample/src/main/res/drawable/black_radius_square.xml +7 -0
- package/GitRepos/CircleIndicator/sample/src/main/res/drawable/white_radius.xml +6 -0
- package/GitRepos/CircleIndicator/sample/src/main/res/drawable-hdpi/ic_launcher.png +0 -0
- package/GitRepos/CircleIndicator/sample/src/main/res/drawable-mdpi/ic_launcher.png +0 -0
- package/GitRepos/CircleIndicator/sample/src/main/res/drawable-xhdpi/ic_launcher.png +0 -0
- package/GitRepos/CircleIndicator/sample/src/main/res/drawable-xxhdpi/ic_launcher.png +0 -0
- package/GitRepos/CircleIndicator/sample/src/main/res/layout/activity_sample.xml +22 -0
- package/GitRepos/CircleIndicator/sample/src/main/res/layout/fragment_sample_change_color.xml +21 -0
- package/GitRepos/CircleIndicator/sample/src/main/res/layout/fragment_sample_custom_animation.xml +26 -0
- package/GitRepos/CircleIndicator/sample/src/main/res/layout/fragment_sample_default.xml +18 -0
- package/GitRepos/CircleIndicator/sample/src/main/res/layout/fragment_sample_dynamic_adapter.xml +34 -0
- package/GitRepos/CircleIndicator/sample/src/main/res/layout/fragment_sample_loop_viewpager.xml +18 -0
- package/GitRepos/CircleIndicator/sample/src/main/res/layout/fragment_sample_reset_adapter.xml +27 -0
- package/GitRepos/CircleIndicator/sample/src/main/res/layout/fragment_sample_snackbar_behavior.xml +28 -0
- package/GitRepos/CircleIndicator/sample/src/main/res/layout/item_view.xml +2 -0
- package/GitRepos/CircleIndicator/sample/src/main/res/layout/viewpager_activity.xml +74 -0
- package/GitRepos/CircleIndicator/sample/src/main/res/values/array.xml +10 -0
- package/GitRepos/CircleIndicator/sample/src/main/res/values/colors.xml +19 -0
- package/GitRepos/CircleIndicator/sample/src/main/res/values/ids.xml +17 -0
- package/GitRepos/CircleIndicator/sample/src/main/res/values/strings.xml +9 -0
- package/GitRepos/CircleIndicator/sample/src/main/res/values/styles.xml +26 -0
- package/GitRepos/CircleIndicator/screenshot.gif +0 -0
- package/GitRepos/CircleIndicator/settings.gradle +1 -0
- package/GitRepos/Time/.travis.yml +14 -0
- package/GitRepos/Time/LICENSE.md +22 -0
- package/GitRepos/Time/README.md +269 -0
- package/GitRepos/Time/build.gradle +23 -0
- package/GitRepos/Time/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/GitRepos/Time/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/GitRepos/Time/gradlew +172 -0
- package/GitRepos/Time/gradlew.bat +84 -0
- package/GitRepos/Time/settings.gradle +3 -0
- package/GitRepos/Time/time/build.gradle +20 -0
- package/GitRepos/Time/time/src/main/kotlin/com/kizitonwose/time/Extensions.kt +65 -0
- package/GitRepos/Time/time/src/main/kotlin/com/kizitonwose/time/Time.kt +143 -0
- package/GitRepos/Time/time/src/test/kotlin/com/kizitonwose/time/TimeTest.kt +110 -0
- package/GitRepos/Time/time-android/build.gradle +38 -0
- package/GitRepos/Time/time-android/proguard-rules.pro +21 -0
- package/GitRepos/Time/time-android/src/main/AndroidManifest.xml +2 -0
- package/GitRepos/Time/time-android/src/main/kotlin/com/kizitonwose/timeandroid/AndroidExtensions.kt +15 -0
- package/GitRepos/Time/time-android/src/main/res/values/strings.xml +3 -0
- package/GitRepos/black/.coveragerc +9 -0
- package/GitRepos/black/.flake8 +7 -0
- package/GitRepos/black/.github/CODE_OF_CONDUCT.md +11 -0
- package/GitRepos/black/.github/ISSUE_TEMPLATE/bug_report.md +36 -0
- package/GitRepos/black/.github/ISSUE_TEMPLATE/feature_request.md +19 -0
- package/GitRepos/black/.github/ISSUE_TEMPLATE/style_issue.md +29 -0
- package/GitRepos/black/.github/workflows/changelog.yml +21 -0
- package/GitRepos/black/.github/workflows/doc.yml +30 -0
- package/GitRepos/black/.github/workflows/docker.yml +43 -0
- package/GitRepos/black/.github/workflows/fuzz.yml +35 -0
- package/GitRepos/black/.github/workflows/lint.yml +28 -0
- package/GitRepos/black/.github/workflows/primer.yml +47 -0
- package/GitRepos/black/.github/workflows/pypi_upload.yml +31 -0
- package/GitRepos/black/.github/workflows/test.yml +76 -0
- package/GitRepos/black/.github/workflows/upload_binary.yml +51 -0
- package/GitRepos/black/.pre-commit-config.yaml +30 -0
- package/GitRepos/black/.pre-commit-hooks.yaml +9 -0
- package/GitRepos/black/.prettierrc.yaml +3 -0
- package/GitRepos/black/.readthedocs.yaml +14 -0
- package/GitRepos/black/AUTHORS.md +184 -0
- package/GitRepos/black/CHANGES.md +648 -0
- package/GitRepos/black/CONTRIBUTING.md +10 -0
- package/GitRepos/black/Dockerfile +14 -0
- package/GitRepos/black/LICENSE +21 -0
- package/GitRepos/black/Pipfile +36 -0
- package/GitRepos/black/Pipfile.lock +1308 -0
- package/GitRepos/black/README.md +220 -0
- package/GitRepos/black/action/Dockerfile +10 -0
- package/GitRepos/black/action/entrypoint.sh +9 -0
- package/GitRepos/black/action.yml +24 -0
- package/GitRepos/black/autoload/black.vim +172 -0
- package/GitRepos/black/docs/Makefile +20 -0
- package/GitRepos/black/docs/_static/custom.css +38 -0
- package/GitRepos/black/docs/_static/license.svg +1 -0
- package/GitRepos/black/docs/_static/logo2-readme.png +0 -0
- package/GitRepos/black/docs/_static/logo2.png +0 -0
- package/GitRepos/black/docs/_static/pypi_template.svg +1 -0
- package/GitRepos/black/docs/compatible_configs/flake8/.flake8 +3 -0
- package/GitRepos/black/docs/compatible_configs/flake8/setup.cfg +3 -0
- package/GitRepos/black/docs/compatible_configs/flake8/tox.ini +3 -0
- package/GitRepos/black/docs/compatible_configs/isort/.editorconfig +2 -0
- package/GitRepos/black/docs/compatible_configs/isort/.isort.cfg +2 -0
- package/GitRepos/black/docs/compatible_configs/isort/pyproject.toml +2 -0
- package/GitRepos/black/docs/compatible_configs/isort/setup.cfg +2 -0
- package/GitRepos/black/docs/compatible_configs/pylint/pylintrc +5 -0
- package/GitRepos/black/docs/compatible_configs/pylint/pyproject.toml +5 -0
- package/GitRepos/black/docs/compatible_configs/pylint/setup.cfg +5 -0
- package/GitRepos/black/docs/conf.py +227 -0
- package/GitRepos/black/docs/contributing/gauging_changes.md +42 -0
- package/GitRepos/black/docs/contributing/index.rst +42 -0
- package/GitRepos/black/docs/contributing/issue_triage.md +169 -0
- package/GitRepos/black/docs/contributing/reference/reference_classes.rst +76 -0
- package/GitRepos/black/docs/contributing/reference/reference_exceptions.rst +12 -0
- package/GitRepos/black/docs/contributing/reference/reference_functions.rst +178 -0
- package/GitRepos/black/docs/contributing/reference/reference_summary.rst +16 -0
- package/GitRepos/black/docs/contributing/release_process.md +89 -0
- package/GitRepos/black/docs/contributing/the_basics.md +101 -0
- package/GitRepos/black/docs/getting_started.md +49 -0
- package/GitRepos/black/docs/guides/index.rst +14 -0
- package/GitRepos/black/docs/guides/introducing_black_to_your_project.md +50 -0
- package/GitRepos/black/docs/guides/using_black_with_other_tools.md +278 -0
- package/GitRepos/black/docs/index.rst +120 -0
- package/GitRepos/black/docs/integrations/editors.md +326 -0
- package/GitRepos/black/docs/integrations/github_actions.md +35 -0
- package/GitRepos/black/docs/integrations/index.rst +28 -0
- package/GitRepos/black/docs/integrations/source_version_control.md +14 -0
- package/GitRepos/black/docs/license.rst +6 -0
- package/GitRepos/black/docs/make.bat +36 -0
- package/GitRepos/black/docs/requirements.txt +6 -0
- package/GitRepos/black/docs/the_black_code_style/current_style.md +456 -0
- package/GitRepos/black/docs/the_black_code_style/future_style.md +35 -0
- package/GitRepos/black/docs/the_black_code_style/index.rst +19 -0
- package/GitRepos/black/docs/usage_and_configuration/black_as_a_server.md +78 -0
- package/GitRepos/black/docs/usage_and_configuration/file_collection_and_discovery.md +36 -0
- package/GitRepos/black/docs/usage_and_configuration/index.rst +24 -0
- package/GitRepos/black/docs/usage_and_configuration/the_basics.md +286 -0
- package/GitRepos/black/fuzz.py +85 -0
- package/GitRepos/black/gallery/Dockerfile +11 -0
- package/GitRepos/black/gallery/README.md +45 -0
- package/GitRepos/black/gallery/gallery.py +307 -0
- package/GitRepos/black/mypy.ini +39 -0
- package/GitRepos/black/plugin/black.vim +60 -0
- package/GitRepos/black/profiling/dict_big.py +8001 -0
- package/GitRepos/black/profiling/dict_huge.py +41440 -0
- package/GitRepos/black/profiling/list_big.py +4000 -0
- package/GitRepos/black/profiling/list_huge.py +22431 -0
- package/GitRepos/black/profiling/mix_big.py +1002 -0
- package/GitRepos/black/profiling/mix_huge.py +7692 -0
- package/GitRepos/black/profiling/mix_small.py +102 -0
- package/GitRepos/black/pyproject.toml +34 -0
- package/GitRepos/black/setup.cfg +2 -0
- package/GitRepos/black/setup.py +113 -0
- package/GitRepos/black/src/black/__init__.py +1062 -0
- package/GitRepos/black/src/black/__main__.py +3 -0
- package/GitRepos/black/src/black/brackets.py +334 -0
- package/GitRepos/black/src/black/cache.py +83 -0
- package/GitRepos/black/src/black/comments.py +269 -0
- package/GitRepos/black/src/black/concurrency.py +39 -0
- package/GitRepos/black/src/black/const.py +4 -0
- package/GitRepos/black/src/black/debug.py +48 -0
- package/GitRepos/black/src/black/files.py +243 -0
- package/GitRepos/black/src/black/linegen.py +984 -0
- package/GitRepos/black/src/black/lines.py +734 -0
- package/GitRepos/black/src/black/mode.py +123 -0
- package/GitRepos/black/src/black/nodes.py +843 -0
- package/GitRepos/black/src/black/numerics.py +65 -0
- package/GitRepos/black/src/black/output.py +83 -0
- package/GitRepos/black/src/black/parsing.py +215 -0
- package/GitRepos/black/src/black/py.typed +1 -0
- package/GitRepos/black/src/black/report.py +100 -0
- package/GitRepos/black/src/black/rusty.py +28 -0
- package/GitRepos/black/src/black/strings.py +216 -0
- package/GitRepos/black/src/black/trans.py +1925 -0
- package/GitRepos/black/src/black_primer/cli.py +147 -0
- package/GitRepos/black/src/black_primer/lib.py +361 -0
- package/GitRepos/black/src/black_primer/primer.json +143 -0
- package/GitRepos/black/src/blackd/__init__.py +211 -0
- package/GitRepos/black/src/blib2to3/Grammar.txt +215 -0
- package/GitRepos/black/src/blib2to3/LICENSE +254 -0
- package/GitRepos/black/src/blib2to3/PatternGrammar.txt +28 -0
- package/GitRepos/black/src/blib2to3/README +16 -0
- package/GitRepos/black/src/blib2to3/__init__.py +1 -0
- package/GitRepos/black/src/blib2to3/pgen2/__init__.py +4 -0
- package/GitRepos/black/src/blib2to3/pgen2/conv.py +256 -0
- package/GitRepos/black/src/blib2to3/pgen2/driver.py +253 -0
- package/GitRepos/black/src/blib2to3/pgen2/grammar.py +223 -0
- package/GitRepos/black/src/blib2to3/pgen2/literals.py +68 -0
- package/GitRepos/black/src/blib2to3/pgen2/parse.py +235 -0
- package/GitRepos/black/src/blib2to3/pgen2/pgen.py +428 -0
- package/GitRepos/black/src/blib2to3/pgen2/token.py +94 -0
- package/GitRepos/black/src/blib2to3/pgen2/tokenize.py +681 -0
- package/GitRepos/black/src/blib2to3/pygram.py +197 -0
- package/GitRepos/black/src/blib2to3/pytree.py +980 -0
- package/GitRepos/black/test_requirements.txt +9 -0
- package/GitRepos/black/tests/__init__.py +0 -0
- package/GitRepos/black/tests/conftest.py +1 -0
- package/GitRepos/black/tests/data/async_as_identifier.py +49 -0
- package/GitRepos/black/tests/data/beginning_backslash.py +12 -0
- package/GitRepos/black/tests/data/blackd_diff.diff +13 -0
- package/GitRepos/black/tests/data/blackd_diff.py +6 -0
- package/GitRepos/black/tests/data/bracketmatch.py +15 -0
- package/GitRepos/black/tests/data/cantfit.py +107 -0
- package/GitRepos/black/tests/data/class_blank_parentheses.py +58 -0
- package/GitRepos/black/tests/data/class_methods_new_line.py +270 -0
- package/GitRepos/black/tests/data/collections.py +174 -0
- package/GitRepos/black/tests/data/comment_after_escaped_newline.py +18 -0
- package/GitRepos/black/tests/data/comments.py +96 -0
- package/GitRepos/black/tests/data/comments2.py +342 -0
- package/GitRepos/black/tests/data/comments3.py +47 -0
- package/GitRepos/black/tests/data/comments4.py +94 -0
- package/GitRepos/black/tests/data/comments5.py +71 -0
- package/GitRepos/black/tests/data/comments6.py +118 -0
- package/GitRepos/black/tests/data/comments7.py +271 -0
- package/GitRepos/black/tests/data/comments_non_breaking_space.py +44 -0
- package/GitRepos/black/tests/data/composition.py +181 -0
- package/GitRepos/black/tests/data/composition_no_trailing_comma.py +367 -0
- package/GitRepos/black/tests/data/debug_visitor.out +810 -0
- package/GitRepos/black/tests/data/debug_visitor.py +32 -0
- package/GitRepos/black/tests/data/decorators.py +182 -0
- package/GitRepos/black/tests/data/docstring.py +377 -0
- package/GitRepos/black/tests/data/docstring_no_string_normalization.py +249 -0
- package/GitRepos/black/tests/data/empty_lines.py +187 -0
- package/GitRepos/black/tests/data/empty_pyproject.toml +2 -0
- package/GitRepos/black/tests/data/expression.diff +447 -0
- package/GitRepos/black/tests/data/expression.py +630 -0
- package/GitRepos/black/tests/data/expression_skip_magic_trailing_comma.diff +428 -0
- package/GitRepos/black/tests/data/fmtonoff.py +413 -0
- package/GitRepos/black/tests/data/fmtonoff2.py +40 -0
- package/GitRepos/black/tests/data/fmtonoff3.py +35 -0
- package/GitRepos/black/tests/data/fmtonoff4.py +36 -0
- package/GitRepos/black/tests/data/fmtskip.py +3 -0
- package/GitRepos/black/tests/data/fmtskip2.py +17 -0
- package/GitRepos/black/tests/data/fmtskip3.py +20 -0
- package/GitRepos/black/tests/data/fmtskip4.py +13 -0
- package/GitRepos/black/tests/data/fmtskip5.py +22 -0
- package/GitRepos/black/tests/data/force_py36.py +16 -0
- package/GitRepos/black/tests/data/force_pyi.py +65 -0
- package/GitRepos/black/tests/data/fstring.py +21 -0
- package/GitRepos/black/tests/data/function.py +247 -0
- package/GitRepos/black/tests/data/function2.py +58 -0
- package/GitRepos/black/tests/data/function_trailing_comma.py +88 -0
- package/GitRepos/black/tests/data/import_spacing.py +118 -0
- package/GitRepos/black/tests/data/include_exclude_tests/b/.definitely_exclude/a.pie +0 -0
- package/GitRepos/black/tests/data/include_exclude_tests/b/.definitely_exclude/a.py +0 -0
- package/GitRepos/black/tests/data/include_exclude_tests/b/.definitely_exclude/a.pyi +0 -0
- package/GitRepos/black/tests/data/include_exclude_tests/b/dont_exclude/a.pie +0 -0
- package/GitRepos/black/tests/data/include_exclude_tests/b/dont_exclude/a.py +0 -0
- package/GitRepos/black/tests/data/include_exclude_tests/b/dont_exclude/a.pyi +0 -0
- package/GitRepos/black/tests/data/include_exclude_tests/b/exclude/a.pie +0 -0
- package/GitRepos/black/tests/data/include_exclude_tests/b/exclude/a.py +0 -0
- package/GitRepos/black/tests/data/include_exclude_tests/b/exclude/a.pyi +0 -0
- package/GitRepos/black/tests/data/include_exclude_tests/pyproject.toml +3 -0
- package/GitRepos/black/tests/data/long_strings.py +589 -0
- package/GitRepos/black/tests/data/long_strings__edge_case.py +110 -0
- package/GitRepos/black/tests/data/long_strings__regression.py +888 -0
- package/GitRepos/black/tests/data/long_strings_flag_disabled.py +289 -0
- package/GitRepos/black/tests/data/missing_final_newline.diff +8 -0
- package/GitRepos/black/tests/data/missing_final_newline.py +3 -0
- package/GitRepos/black/tests/data/nested_gitignore_tests/pyproject.toml +3 -0
- package/GitRepos/black/tests/data/nested_gitignore_tests/root/b.py +1 -0
- package/GitRepos/black/tests/data/nested_gitignore_tests/root/c.py +1 -0
- package/GitRepos/black/tests/data/nested_gitignore_tests/root/child/c.py +1 -0
- package/GitRepos/black/tests/data/nested_gitignore_tests/x.py +0 -0
- package/GitRepos/black/tests/data/numeric_literals.py +44 -0
- package/GitRepos/black/tests/data/numeric_literals_py2.py +16 -0
- package/GitRepos/black/tests/data/numeric_literals_skip_underscores.py +23 -0
- package/GitRepos/black/tests/data/pep_570.py +44 -0
- package/GitRepos/black/tests/data/pep_572.py +47 -0
- package/GitRepos/black/tests/data/pep_572_do_not_remove_parens.py +21 -0
- package/GitRepos/black/tests/data/pep_572_remove_parens.py +105 -0
- package/GitRepos/black/tests/data/percent_precedence.py +41 -0
- package/GitRepos/black/tests/data/python2.py +33 -0
- package/GitRepos/black/tests/data/python2_print_function.py +16 -0
- package/GitRepos/black/tests/data/python2_unicode_literals.py +20 -0
- package/GitRepos/black/tests/data/python37.py +65 -0
- package/GitRepos/black/tests/data/python38.py +45 -0
- package/GitRepos/black/tests/data/python39.py +37 -0
- package/GitRepos/black/tests/data/remove_parens.py +142 -0
- package/GitRepos/black/tests/data/slices.py +31 -0
- package/GitRepos/black/tests/data/string_prefixes.py +18 -0
- package/GitRepos/black/tests/data/string_quotes.py +102 -0
- package/GitRepos/black/tests/data/stub.pyi +35 -0
- package/GitRepos/black/tests/data/trailing_comma_optional_parens1.py +3 -0
- package/GitRepos/black/tests/data/trailing_comma_optional_parens2.py +3 -0
- package/GitRepos/black/tests/data/trailing_comma_optional_parens3.py +8 -0
- package/GitRepos/black/tests/data/tricky_unicode_symbols.py +6 -0
- package/GitRepos/black/tests/data/tupleassign.py +23 -0
- package/GitRepos/black/tests/empty.toml +1 -0
- package/GitRepos/black/tests/optional.py +119 -0
- package/GitRepos/black/tests/test.toml +10 -0
- package/GitRepos/black/tests/test_black.py +2100 -0
- package/GitRepos/black/tests/test_blackd.py +166 -0
- package/GitRepos/black/tests/test_format.py +144 -0
- package/GitRepos/black/tests/test_primer.py +217 -0
- package/GitRepos/black/tests/util.py +74 -0
- package/GitRepos/black/tox.ini +28 -0
- package/GitRepos/danger-static_analyzer_comments/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/GitRepos/danger-static_analyzer_comments/.idea/modules.xml +8 -0
- package/GitRepos/danger-static_analyzer_comments/Gemfile +3 -0
- package/GitRepos/danger-static_analyzer_comments/Gemfile.lock +141 -0
- package/GitRepos/danger-static_analyzer_comments/Guardfile +19 -0
- package/GitRepos/danger-static_analyzer_comments/LICENSE +21 -0
- package/GitRepos/danger-static_analyzer_comments/PLUGIN.gemspec.template.cpgz +0 -0
- package/GitRepos/danger-static_analyzer_comments/PLUGIN_LICENSE.txt +22 -0
- package/GitRepos/danger-static_analyzer_comments/PLUGIN_README.md +20 -0
- package/GitRepos/danger-static_analyzer_comments/README.md +2 -0
- package/GitRepos/danger-static_analyzer_comments/Rakefile +23 -0
- package/GitRepos/danger-static_analyzer_comments/configure +123 -0
- package/GitRepos/danger-static_analyzer_comments/danger-static_analyzer_comments.gemspec +49 -0
- package/GitRepos/danger-static_analyzer_comments/lib/danger_plugin.rb +73 -0
- package/GitRepos/danger-static_analyzer_comments/lib/version.rb +3 -0
- package/GitRepos/danger-static_analyzer_comments/spec/danger_static_analyzer_comments_spec.rb +23 -0
- package/GitRepos/danger-static_analyzer_comments/spec/spec_helper.rb +65 -0
- package/GitRepos/isort/.codecov.yml +10 -0
- package/GitRepos/isort/.coveragerc +20 -0
- package/GitRepos/isort/.cruft.json +17 -0
- package/GitRepos/isort/.deepsource.toml +18 -0
- package/GitRepos/isort/.dockerignore +17 -0
- package/GitRepos/isort/.editorconfig +19 -0
- package/GitRepos/isort/.github/FUNDING.yml +2 -0
- package/GitRepos/isort/.github/workflows/integration.yml +35 -0
- package/GitRepos/isort/.github/workflows/lint.yml +35 -0
- package/GitRepos/isort/.github/workflows/test.yml +64 -0
- package/GitRepos/isort/.isort.cfg +5 -0
- package/GitRepos/isort/.pre-commit-config.yaml +5 -0
- package/GitRepos/isort/.pre-commit-hooks.yaml +9 -0
- package/GitRepos/isort/CHANGELOG.md +522 -0
- package/GitRepos/isort/Dockerfile +26 -0
- package/GitRepos/isort/LICENSE +21 -0
- package/GitRepos/isort/MANIFEST.in +4 -0
- package/GitRepos/isort/README.md +355 -0
- package/GitRepos/isort/art/isort_loves_black.png +0 -0
- package/GitRepos/isort/art/logo.png +0 -0
- package/GitRepos/isort/art/logo.xcf +0 -0
- package/GitRepos/isort/art/logo_5.png +0 -0
- package/GitRepos/isort/art/logo_large.png +0 -0
- package/GitRepos/isort/art/logo_large.xcf +0 -0
- package/GitRepos/isort/art/stylesheets/extra.css +5 -0
- package/GitRepos/isort/docs/configuration/action_comments.md +108 -0
- package/GitRepos/isort/docs/configuration/add_or_remove_imports.md +28 -0
- package/GitRepos/isort/docs/configuration/black_compatibility.md +63 -0
- package/GitRepos/isort/docs/configuration/config_files.md +89 -0
- package/GitRepos/isort/docs/configuration/custom_sections_and_ordering.md +131 -0
- package/GitRepos/isort/docs/configuration/git_hook.md +34 -0
- package/GitRepos/isort/docs/configuration/github_action.md +63 -0
- package/GitRepos/isort/docs/configuration/multi_line_output_modes.md +121 -0
- package/GitRepos/isort/docs/configuration/options.md +1314 -0
- package/GitRepos/isort/docs/configuration/pre-commit.md +32 -0
- package/GitRepos/isort/docs/configuration/profiles.md +86 -0
- package/GitRepos/isort/docs/configuration/setuptools_integration.md +27 -0
- package/GitRepos/isort/docs/contributing/1.-contributing-guide.md +81 -0
- package/GitRepos/isort/docs/contributing/2.-coding-standard.md +57 -0
- package/GitRepos/isort/docs/contributing/3.-code-of-conduct.md +88 -0
- package/GitRepos/isort/docs/contributing/4.-acknowledgements.md +259 -0
- package/GitRepos/isort/docs/major_releases/introducing_isort_5.md +142 -0
- package/GitRepos/isort/docs/major_releases/release_policy.md +46 -0
- package/GitRepos/isort/docs/quick_start/0.-try.md +50 -0
- package/GitRepos/isort/docs/quick_start/1.-install.md +22 -0
- package/GitRepos/isort/docs/quick_start/2.-cli.md +43 -0
- package/GitRepos/isort/docs/quick_start/3.-api.md +22 -0
- package/GitRepos/isort/docs/quick_start/interactive.css +26 -0
- package/GitRepos/isort/docs/quick_start/interactive.js +55 -0
- package/GitRepos/isort/docs/quick_start/isort-5.0.0-py3-none-any.whl +0 -0
- package/GitRepos/isort/docs/quick_start/isort-5.0.1-py3-none-any.whl +0 -0
- package/GitRepos/isort/docs/upgrade_guides/5.0.0.md +97 -0
- package/GitRepos/isort/docs/warning_and_error_codes/W0500.md +22 -0
- package/GitRepos/isort/example.gif +0 -0
- package/GitRepos/isort/example_isort_formatting_plugin/example_isort_formatting_plugin.py +23 -0
- package/GitRepos/isort/example_isort_formatting_plugin/poetry.lock +173 -0
- package/GitRepos/isort/example_isort_formatting_plugin/pyproject.toml +20 -0
- package/GitRepos/isort/example_shared_isort_profile/example_shared_isort_profile.py +7 -0
- package/GitRepos/isort/example_shared_isort_profile/poetry.lock +7 -0
- package/GitRepos/isort/example_shared_isort_profile/pyproject.toml +18 -0
- package/GitRepos/isort/isort/__init__.py +19 -0
- package/GitRepos/isort/isort/__main__.py +3 -0
- package/GitRepos/isort/isort/_future/__init__.py +12 -0
- package/GitRepos/isort/isort/_future/_dataclasses.py +1209 -0
- package/GitRepos/isort/isort/_vendored/toml/LICENSE +27 -0
- package/GitRepos/isort/isort/_vendored/toml/__init__.py +23 -0
- package/GitRepos/isort/isort/_vendored/toml/decoder.py +1053 -0
- package/GitRepos/isort/isort/_vendored/toml/encoder.py +295 -0
- package/GitRepos/isort/isort/_vendored/toml/ordered.py +13 -0
- package/GitRepos/isort/isort/_vendored/toml/tz.py +21 -0
- package/GitRepos/isort/isort/_version.py +1 -0
- package/GitRepos/isort/isort/api.py +576 -0
- package/GitRepos/isort/isort/comments.py +32 -0
- package/GitRepos/isort/isort/core.py +455 -0
- package/GitRepos/isort/isort/deprecated/__init__.py +0 -0
- package/GitRepos/isort/isort/deprecated/finders.py +415 -0
- package/GitRepos/isort/isort/exceptions.py +180 -0
- package/GitRepos/isort/isort/files.py +41 -0
- package/GitRepos/isort/isort/format.py +150 -0
- package/GitRepos/isort/isort/hooks.py +86 -0
- package/GitRepos/isort/isort/identify.py +206 -0
- package/GitRepos/isort/isort/io.py +73 -0
- package/GitRepos/isort/isort/literal.py +109 -0
- package/GitRepos/isort/isort/logo.py +19 -0
- package/GitRepos/isort/isort/main.py +1230 -0
- package/GitRepos/isort/isort/output.py +634 -0
- package/GitRepos/isort/isort/parse.py +569 -0
- package/GitRepos/isort/isort/place.py +145 -0
- package/GitRepos/isort/isort/profiles.py +86 -0
- package/GitRepos/isort/isort/py.typed +0 -0
- package/GitRepos/isort/isort/pylama_isort.py +43 -0
- package/GitRepos/isort/isort/sections.py +9 -0
- package/GitRepos/isort/isort/settings.py +779 -0
- package/GitRepos/isort/isort/setuptools_commands.py +61 -0
- package/GitRepos/isort/isort/sorting.py +118 -0
- package/GitRepos/isort/isort/stdlibs/__init__.py +2 -0
- package/GitRepos/isort/isort/stdlibs/all.py +3 -0
- package/GitRepos/isort/isort/stdlibs/py2.py +3 -0
- package/GitRepos/isort/isort/stdlibs/py27.py +300 -0
- package/GitRepos/isort/isort/stdlibs/py3.py +3 -0
- package/GitRepos/isort/isort/stdlibs/py35.py +222 -0
- package/GitRepos/isort/isort/stdlibs/py36.py +223 -0
- package/GitRepos/isort/isort/stdlibs/py37.py +224 -0
- package/GitRepos/isort/isort/stdlibs/py38.py +223 -0
- package/GitRepos/isort/isort/stdlibs/py39.py +223 -0
- package/GitRepos/isort/isort/utils.py +16 -0
- package/GitRepos/isort/isort/wrap.py +139 -0
- package/GitRepos/isort/isort/wrap_modes.py +323 -0
- package/GitRepos/isort/logo.png +0 -0
- package/GitRepos/isort/mkdocs.yml +2 -0
- package/GitRepos/isort/poetry.lock +2472 -0
- package/GitRepos/isort/pyproject.toml +114 -0
- package/GitRepos/isort/rtd/index.md +6 -0
- package/GitRepos/isort/scripts/build_config_option_docs.py +214 -0
- package/GitRepos/isort/scripts/build_profile_docs.py +42 -0
- package/GitRepos/isort/scripts/check_acknowledgments.py +83 -0
- package/GitRepos/isort/scripts/clean.sh +7 -0
- package/GitRepos/isort/scripts/docker.sh +12 -0
- package/GitRepos/isort/scripts/done.sh +5 -0
- package/GitRepos/isort/scripts/lint.sh +11 -0
- package/GitRepos/isort/scripts/mkstdlibs.py +47 -0
- package/GitRepos/isort/scripts/test.sh +6 -0
- package/GitRepos/isort/scripts/test_integration.sh +4 -0
- package/GitRepos/isort/setup.cfg +28 -0
- package/GitRepos/isort/tests/__init__.py +0 -0
- package/GitRepos/isort/tests/integration/test_hypothesmith.py +96 -0
- package/GitRepos/isort/tests/integration/test_projects_using_isort.py +166 -0
- package/GitRepos/isort/tests/integration/test_setting_combinations.py +1869 -0
- package/GitRepos/isort/tests/unit/__init__.py +0 -0
- package/GitRepos/isort/tests/unit/conftest.py +33 -0
- package/GitRepos/isort/tests/unit/example_crlf_file.py +10 -0
- package/GitRepos/isort/tests/unit/example_projects/namespaces/almost-implicit/.isort.cfg +2 -0
- package/GitRepos/isort/tests/unit/example_projects/namespaces/almost-implicit/root/nested/__init__.py +0 -0
- package/GitRepos/isort/tests/unit/example_projects/namespaces/almost-implicit/root/nested/x.py +0 -0
- package/GitRepos/isort/tests/unit/example_projects/namespaces/almost-implicit/root/y.py +0 -0
- package/GitRepos/isort/tests/unit/example_projects/namespaces/implicit/.isort.cfg +2 -0
- package/GitRepos/isort/tests/unit/example_projects/namespaces/implicit/root/nested/__init__.py +0 -0
- package/GitRepos/isort/tests/unit/example_projects/namespaces/implicit/root/nested/x.py +0 -0
- package/GitRepos/isort/tests/unit/example_projects/namespaces/none/.isort.cfg +2 -0
- package/GitRepos/isort/tests/unit/example_projects/namespaces/none/root/__init__.py +0 -0
- package/GitRepos/isort/tests/unit/example_projects/namespaces/none/root/nested/__init__.py +0 -0
- package/GitRepos/isort/tests/unit/example_projects/namespaces/pkg_resource/.isort.cfg +2 -0
- package/GitRepos/isort/tests/unit/example_projects/namespaces/pkg_resource/root/__init__.py +1 -0
- package/GitRepos/isort/tests/unit/example_projects/namespaces/pkg_resource/root/nested/__init__.py +0 -0
- package/GitRepos/isort/tests/unit/example_projects/namespaces/pkg_resource/root/nested/x.py +0 -0
- package/GitRepos/isort/tests/unit/example_projects/namespaces/pkgutil/.isort.cfg +2 -0
- package/GitRepos/isort/tests/unit/example_projects/namespaces/pkgutil/root/__init__.py +1 -0
- package/GitRepos/isort/tests/unit/example_projects/namespaces/pkgutil/root/nested/__init__.py +0 -0
- package/GitRepos/isort/tests/unit/example_projects/namespaces/pkgutil/root/nested/x.py +0 -0
- package/GitRepos/isort/tests/unit/profiles/__init__.py +0 -0
- package/GitRepos/isort/tests/unit/profiles/test_attrs.py +102 -0
- package/GitRepos/isort/tests/unit/profiles/test_black.py +370 -0
- package/GitRepos/isort/tests/unit/profiles/test_django.py +122 -0
- package/GitRepos/isort/tests/unit/profiles/test_google.py +413 -0
- package/GitRepos/isort/tests/unit/profiles/test_hug.py +112 -0
- package/GitRepos/isort/tests/unit/profiles/test_open_stack.py +134 -0
- package/GitRepos/isort/tests/unit/profiles/test_plone.py +75 -0
- package/GitRepos/isort/tests/unit/profiles/test_pycharm.py +55 -0
- package/GitRepos/isort/tests/unit/profiles/test_wemake.py +87 -0
- package/GitRepos/isort/tests/unit/test_action_comments.py +47 -0
- package/GitRepos/isort/tests/unit/test_api.py +108 -0
- package/GitRepos/isort/tests/unit/test_comments.py +34 -0
- package/GitRepos/isort/tests/unit/test_deprecated_finders.py +210 -0
- package/GitRepos/isort/tests/unit/test_exceptions.py +100 -0
- package/GitRepos/isort/tests/unit/test_files.py +8 -0
- package/GitRepos/isort/tests/unit/test_format.py +121 -0
- package/GitRepos/isort/tests/unit/test_hooks.py +101 -0
- package/GitRepos/isort/tests/unit/test_identify.py +274 -0
- package/GitRepos/isort/tests/unit/test_importable.py +42 -0
- package/GitRepos/isort/tests/unit/test_io.py +43 -0
- package/GitRepos/isort/tests/unit/test_isort.py +5166 -0
- package/GitRepos/isort/tests/unit/test_literal.py +37 -0
- package/GitRepos/isort/tests/unit/test_main.py +1087 -0
- package/GitRepos/isort/tests/unit/test_output.py +22 -0
- package/GitRepos/isort/tests/unit/test_parse.py +82 -0
- package/GitRepos/isort/tests/unit/test_place.py +56 -0
- package/GitRepos/isort/tests/unit/test_pylama_isort.py +24 -0
- package/GitRepos/isort/tests/unit/test_regressions.py +1653 -0
- package/GitRepos/isort/tests/unit/test_settings.py +229 -0
- package/GitRepos/isort/tests/unit/test_setuptools_command.py +31 -0
- package/GitRepos/isort/tests/unit/test_ticketed_features.py +1117 -0
- package/GitRepos/isort/tests/unit/test_wrap.py +15 -0
- package/GitRepos/isort/tests/unit/test_wrap_modes.py +587 -0
- package/GitRepos/isort/tests/unit/utils.py +14 -0
- package/GitRepos/kettle/LICENSE.txt +21 -0
- package/GitRepos/kettle/README.md +215 -0
- package/GitRepos/kettle/bin/kettle-skeleton.php +316 -0
- package/GitRepos/kettle/composer.json +33 -0
- package/GitRepos/kettle/src/kettle.php +1418 -0
- package/GitRepos/mirrors-autoflake/.pre-commit-hooks.yaml +5 -0
- package/GitRepos/mirrors-autoflake/.version +1 -0
- package/GitRepos/mirrors-autoflake/hooks.yaml +7 -0
- package/GitRepos/mirrors-autoflake/setup.py +8 -0
- package/GitRepos/razorpay-java/LICENSE.txt +8 -0
- package/GitRepos/razorpay-java/README.md +421 -0
- package/GitRepos/razorpay-java/pom.xml +153 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/Addon.java +10 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/AddonClient.java +17 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/ApiClient.java +194 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/ApiUtils.java +179 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/BankTransfer.java +10 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/Card.java +10 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/CardClient.java +12 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/Constants.java +78 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/CustomTLSSocketFactory.java +75 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/Customer.java +10 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/CustomerClient.java +36 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/Entity.java +45 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/Invoice.java +10 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/InvoiceClient.java +32 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/Order.java +10 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/OrderClient.java +32 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/Payment.java +10 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/PaymentClient.java +83 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/Plan.java +10 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/PlanClient.java +28 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/RazorpayClient.java +45 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/RazorpayException.java +21 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/Refund.java +10 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/RefundClient.java +28 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/Reversal.java +10 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/Subscription.java +10 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/SubscriptionClient.java +36 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/Token.java +10 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/Transfer.java +10 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/TransferClient.java +36 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/Utils.java +62 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/VirtualAccount.java +10 -0
- package/GitRepos/razorpay-java/src/main/java/com/razorpay/VirtualAccountClient.java +44 -0
- package/GitRepos/razorpay-java/src/main/resources/project.properties +1 -0
- package/GitRepos/react-data-grid/.babelrc +8 -0
- package/GitRepos/react-data-grid/.github/ISSUE_TEMPLATE.md +25 -0
- package/GitRepos/react-data-grid/.github/PULL_REQUEST_TEMPLATE.md +38 -0
- package/GitRepos/react-data-grid/LICENSE +24 -0
- package/GitRepos/react-data-grid/README.md +82 -0
- package/GitRepos/react-data-grid/addons.js +1 -0
- package/GitRepos/react-data-grid/docs/api/docs.json +6685 -0
- package/GitRepos/react-data-grid/docs/markdowns/AdvancedToolbar.md +17 -0
- package/GitRepos/react-data-grid/docs/markdowns/AutoCompleteEditor.md +68 -0
- package/GitRepos/react-data-grid/docs/markdowns/AutoCompleteFilter.md +22 -0
- package/GitRepos/react-data-grid/docs/markdowns/AutoCompleteTokensEditor.md +22 -0
- package/GitRepos/react-data-grid/docs/markdowns/Canvas.md +126 -0
- package/GitRepos/react-data-grid/docs/markdowns/Cell.md +101 -0
- package/GitRepos/react-data-grid/docs/markdowns/CheckboxEditor.md +27 -0
- package/GitRepos/react-data-grid/docs/markdowns/ContextMenu.md +12 -0
- package/GitRepos/react-data-grid/docs/markdowns/DateRangeEditor.md +24 -0
- package/GitRepos/react-data-grid/docs/markdowns/DateRangeFilter.md +42 -0
- package/GitRepos/react-data-grid/docs/markdowns/DateRangeFormatter.md +25 -0
- package/GitRepos/react-data-grid/docs/markdowns/DragDropContainer.md +17 -0
- package/GitRepos/react-data-grid/docs/markdowns/Draggable.md +30 -0
- package/GitRepos/react-data-grid/docs/markdowns/DraggableHeaderCell.md +22 -0
- package/GitRepos/react-data-grid/docs/markdowns/DropDownEditor.md +12 -0
- package/GitRepos/react-data-grid/docs/markdowns/DropDownFormatter.md +17 -0
- package/GitRepos/react-data-grid/docs/markdowns/EditorBase.md +32 -0
- package/GitRepos/react-data-grid/docs/markdowns/EditorContainer.md +37 -0
- package/GitRepos/react-data-grid/docs/markdowns/FilterableHeaderCell.md +17 -0
- package/GitRepos/react-data-grid/docs/markdowns/Grid.md +169 -0
- package/GitRepos/react-data-grid/docs/markdowns/GroupedColumnButton.md +17 -0
- package/GitRepos/react-data-grid/docs/markdowns/GroupedColumnsPanel.md +44 -0
- package/GitRepos/react-data-grid/docs/markdowns/Header.md +62 -0
- package/GitRepos/react-data-grid/docs/markdowns/HeaderCell.md +40 -0
- package/GitRepos/react-data-grid/docs/markdowns/HeaderRow.md +92 -0
- package/GitRepos/react-data-grid/docs/markdowns/ImageFormatter.md +12 -0
- package/GitRepos/react-data-grid/docs/markdowns/MenuHeader.md +12 -0
- package/GitRepos/react-data-grid/docs/markdowns/NumericFilter.md +17 -0
- package/GitRepos/react-data-grid/docs/markdowns/ReactDataGrid.md +209 -0
- package/GitRepos/react-data-grid/docs/markdowns/Row.md +70 -0
- package/GitRepos/react-data-grid/docs/markdowns/RowActionsCell.md +53 -0
- package/GitRepos/react-data-grid/docs/markdowns/RowDragLayer.md +42 -0
- package/GitRepos/react-data-grid/docs/markdowns/RowGroup.md +57 -0
- package/GitRepos/react-data-grid/docs/markdowns/SimpleCellFormatter.md +12 -0
- package/GitRepos/react-data-grid/docs/markdowns/SortableHeaderCell.md +27 -0
- package/GitRepos/react-data-grid/docs/markdowns/Toolbar.md +44 -0
- package/GitRepos/react-data-grid/docs/markdowns/Viewport.md +102 -0
- package/GitRepos/react-data-grid/docs/readme.md +38 -0
- package/GitRepos/react-data-grid/docs/utils/generalUtils.js +50 -0
- package/GitRepos/react-data-grid/docs/utils/generateMarkdown.js +74 -0
- package/GitRepos/react-data-grid/index.js +1 -0
- package/GitRepos/react-data-grid/package.json +120 -0
- package/GitRepos/react-data-grid/themes/DragColumn.PNG +0 -0
- package/GitRepos/react-data-grid/themes/daterangepicker-bs3.css +284 -0
- package/GitRepos/react-data-grid/themes/drag_column_full.PNG +0 -0
- package/GitRepos/react-data-grid/themes/react-data-grid.css +961 -0
- package/GitRepos/react-data-grid/themes/react-data-grid.less +629 -0
- package/Kali +0 -0
- package/MobSF/.dockerignore +26 -0
- package/MobSF/.github/CODE_OF_CONDUCT.md +46 -0
- package/MobSF/.github/CONTRIBUTING.md +131 -0
- package/MobSF/.github/FUNDING.yml +3 -0
- package/MobSF/.github/ISSUE_TEMPLATE/bug_report.md +54 -0
- package/MobSF/.github/ISSUE_TEMPLATE/feature_request.md +22 -0
- package/MobSF/.github/PULL_REQUEST_TEMPLATE.md +20 -0
- package/MobSF/.github/SECURITY.md +21 -0
- package/MobSF/.github/SUPPORT.md +1 -0
- package/MobSF/.github/workflows/auto-comment.yml +22 -0
- package/MobSF/.github/workflows/docker-build.yml +35 -0
- package/MobSF/.github/workflows/mobsf_test.yml +58 -0
- package/MobSF/.github/workflows/python-publish.yml +28 -0
- package/MobSF/.gitmodules +3 -0
- package/MobSF/.pyup.yml +27 -0
- package/MobSF/.sonarcloud.properties +3 -0
- package/MobSF/Dockerfile +96 -0
- package/MobSF/LICENSE +675 -0
- package/MobSF/LICENSES/AdminLTE_theme.txt +8 -0
- package/MobSF/LICENSES/AntiEmulator.txt +660 -0
- package/MobSF/LICENSES/IP2LOCATION LITE DATA.txt +21 -0
- package/MobSF/LICENSES/Rootcloak.txt +13 -0
- package/MobSF/LICENSES/ac-pm_tools.txt +341 -0
- package/MobSF/LICENSES/androguard.txt +76 -0
- package/MobSF/LICENSES/backsmali.txt +29 -0
- package/MobSF/LICENSES/class-dump-z.txt +13 -0
- package/MobSF/LICENSES/droidmon.txt +624 -0
- package/MobSF/LICENSES/exodus-core.txt +661 -0
- package/MobSF/LICENSES/frida.txt +50 -0
- package/MobSF/LICENSES/ios_binary_analysis_rules.txt +28 -0
- package/MobSF/LICENSES/jadx.txt +202 -0
- package/MobSF/LICENSES/maltrail_blacklist.txt +21 -0
- package/MobSF/MANIFEST.in +12 -0
- package/MobSF/README.md +116 -0
- package/MobSF/docker-compose.yml +39 -0
- package/MobSF/manage.py +18 -0
- package/MobSF/mobsf/DynamicAnalyzer/__init__.py +0 -0
- package/MobSF/mobsf/DynamicAnalyzer/admin.py +0 -0
- package/MobSF/mobsf/DynamicAnalyzer/models.py +0 -0
- package/MobSF/mobsf/DynamicAnalyzer/tests.py +0 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/__init__.py +0 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/frida_scripts/auxiliary/class_trace.js +126 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/frida_scripts/auxiliary/get_loaded_classes.js +15 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/frida_scripts/auxiliary/get_methods.js +22 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/frida_scripts/auxiliary/search_class_pattern.js +55 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/frida_scripts/auxiliary/string_catch.js +10 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/frida_scripts/auxiliary/string_compare.js +15 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/frida_scripts/default/api_monitor.js +572 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/frida_scripts/default/debugger_check_bypass.js +8 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/frida_scripts/default/root_bypass.js +260 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/frida_scripts/default/ssl_pinning_bypass.js +255 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/frida_scripts/others/aes_key.js +161 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/frida_scripts/others/bypass_flag_secure.js +17 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/frida_scripts/others/bypass_method.js +8 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/frida_scripts/others/default.js +3 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/frida_scripts/others/file_trace.js +455 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/frida_scripts/others/get_android_id.js +9 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/frida_scripts/others/helper.js +16 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/frida_scripts/others/hook_constructor.js +7 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/frida_scripts/others/hook_java_reflection.js +7 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/frida_scripts/others/inputstream_dump.js +34 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/frida_scripts/others/intent_dumper.js +21 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/frida_scripts/others/jni_hook_by_address.js +28 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/frida_scripts/others/jni_trace.js +42 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/frida_scripts/others/webview_enable_debugging.js +12 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/onDevice/mobsf_agents/ClipDump.apk +0 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/onDevice/xposed/Xposed.apk +0 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/onDevice/xposed/XposedInstaller_3.1.5.apk +0 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/onDevice/xposed/hooks.json +389 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/onDevice/xposed/modules/AndroidBluePill.apk +0 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/onDevice/xposed/modules/Droidmon.apk +0 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/onDevice/xposed/modules/JustTrustMe.apk +0 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/onDevice/xposed/modules/com.devadvance.rootcloak2_v18_c43b61.apk +0 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/onDevice/xposed/modules/hooks.json +389 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/onDevice/xposed/modules/mobi.acpm.proxyon_v1_419b04.apk +0 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/onDevice/xposed/modules/mobi.acpm.sslunpinning_v2_37f44f.apk +0 -0
- package/MobSF/mobsf/DynamicAnalyzer/tools/webproxy.py +89 -0
- package/MobSF/mobsf/DynamicAnalyzer/views/__init__.py +0 -0
- package/MobSF/mobsf/DynamicAnalyzer/views/android/__init__.py +0 -0
- package/MobSF/mobsf/DynamicAnalyzer/views/android/analysis.py +285 -0
- package/MobSF/mobsf/DynamicAnalyzer/views/android/dynamic_analyzer.py +316 -0
- package/MobSF/mobsf/DynamicAnalyzer/views/android/environment.py +698 -0
- package/MobSF/mobsf/DynamicAnalyzer/views/android/frida_core.py +168 -0
- package/MobSF/mobsf/DynamicAnalyzer/views/android/frida_scripts.py +65 -0
- package/MobSF/mobsf/DynamicAnalyzer/views/android/frida_server_download.py +75 -0
- package/MobSF/mobsf/DynamicAnalyzer/views/android/operations.py +299 -0
- package/MobSF/mobsf/DynamicAnalyzer/views/android/report.py +179 -0
- package/MobSF/mobsf/DynamicAnalyzer/views/android/tests_common.py +212 -0
- package/MobSF/mobsf/DynamicAnalyzer/views/android/tests_frida.py +339 -0
- package/MobSF/mobsf/DynamicAnalyzer/views/android/tests_tls.py +109 -0
- package/MobSF/mobsf/DynamicAnalyzer/views/android/tests_xposed.py +194 -0
- package/MobSF/mobsf/MalwareAnalyzer/__init__.py +0 -0
- package/MobSF/mobsf/MalwareAnalyzer/admin.py +0 -0
- package/MobSF/mobsf/MalwareAnalyzer/models.py +0 -0
- package/MobSF/mobsf/MalwareAnalyzer/tests.py +0 -0
- package/MobSF/mobsf/MalwareAnalyzer/views/MalwareDomainCheck.py +226 -0
- package/MobSF/mobsf/MalwareAnalyzer/views/Trackers.py +237 -0
- package/MobSF/mobsf/MalwareAnalyzer/views/VirusTotal.py +140 -0
- package/MobSF/mobsf/MalwareAnalyzer/views/__init__.py +0 -0
- package/MobSF/mobsf/MalwareAnalyzer/views/apkid.py +61 -0
- package/MobSF/mobsf/MalwareAnalyzer/views/quark.py +145 -0
- package/MobSF/mobsf/MobSF/__init__.py +0 -0
- package/MobSF/mobsf/MobSF/forms.py +36 -0
- package/MobSF/mobsf/MobSF/init.py +143 -0
- package/MobSF/mobsf/MobSF/models.py +0 -0
- package/MobSF/mobsf/MobSF/settings.py +411 -0
- package/MobSF/mobsf/MobSF/urls.py +145 -0
- package/MobSF/mobsf/MobSF/utils.py +598 -0
- package/MobSF/mobsf/MobSF/views/__init__.py +0 -0
- package/MobSF/mobsf/MobSF/views/api/__init__.py +0 -0
- package/MobSF/mobsf/MobSF/views/api/api_dynamic_analysis.py +278 -0
- package/MobSF/mobsf/MobSF/views/api/api_middleware.py +47 -0
- package/MobSF/mobsf/MobSF/views/api/api_static_analysis.py +186 -0
- package/MobSF/mobsf/MobSF/views/apk_downloader.py +163 -0
- package/MobSF/mobsf/MobSF/views/helpers.py +94 -0
- package/MobSF/mobsf/MobSF/views/home.py +350 -0
- package/MobSF/mobsf/MobSF/views/scanning.py +149 -0
- package/MobSF/mobsf/MobSF/wsgi.py +24 -0
- package/MobSF/mobsf/StaticAnalyzer/__init__.py +0 -0
- package/MobSF/mobsf/StaticAnalyzer/admin.py +0 -0
- package/MobSF/mobsf/StaticAnalyzer/forms.py +92 -0
- package/MobSF/mobsf/StaticAnalyzer/models.py +123 -0
- package/MobSF/mobsf/StaticAnalyzer/tests.py +425 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/__init__.py +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/apktool_2.5.0.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/baksmali-2.5.2.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/ios/class-dump +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/ios/class-dump-swift +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/ios/jtool.ELF64 +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/LICENSE +201 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/NOTICE +213 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/README.md +125 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/bin/jadx +185 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/bin/jadx-gui +185 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/bin/jadx-gui.bat +89 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/bin/jadx.bat +89 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/android-29-clst.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/android-29-res.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/antlr-2.7.7.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/antlr-runtime-3.5.2.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/apksig-4.0.1.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/asm-8.0.1.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/baksmali-2.4.0.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/checker-qual-2.11.1.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/commons-lang3-3.11.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/commons-text-1.9.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/dexlib2-2.4.0.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/dx-1.16.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/error_prone_annotations-2.3.4.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/failureaccess-1.0.1.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/gson-2.8.6.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/guava-29.0-jre.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/image-viewer-1.2.3.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/j2objc-annotations-1.3.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/jadx-cli-1.2.0.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/jadx-core-1.2.0.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/jadx-dex-input-1.2.0.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/jadx-gui-1.2.0.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/jadx-java-convert-1.2.0.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/jadx-plugins-api-1.2.0.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/jadx-smali-input-1.2.0.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/jcommander-1.80.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/jfontchooser-1.0.5.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/jsr305-3.0.2.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/logback-classic-1.2.3.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/logback-core-1.2.3.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/reactive-streams-1.0.3.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/rsyntaxtextarea-3.1.1.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/rxjava-2.2.19.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/rxjava2-swing-0.3.7.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/slf4j-api-1.7.30.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/smali-2.4.0.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/stringtemplate-3.2.1.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/jadx/lib/util-2.4.0.jar +0 -0
- package/MobSF/mobsf/StaticAnalyzer/tools/strings.py +24 -0
- package/MobSF/mobsf/StaticAnalyzer/views/__init__.py +0 -0
- package/MobSF/mobsf/StaticAnalyzer/views/android/__init__.py +0 -0
- package/MobSF/mobsf/StaticAnalyzer/views/android/android_manifest_desc.py +747 -0
- package/MobSF/mobsf/StaticAnalyzer/views/android/binary_analysis.py +255 -0
- package/MobSF/mobsf/StaticAnalyzer/views/android/cert_analysis.py +160 -0
- package/MobSF/mobsf/StaticAnalyzer/views/android/code_analysis.py +96 -0
- package/MobSF/mobsf/StaticAnalyzer/views/android/converter.py +97 -0
- package/MobSF/mobsf/StaticAnalyzer/views/android/db_interaction.py +217 -0
- package/MobSF/mobsf/StaticAnalyzer/views/android/dvm_permissions.py +278 -0
- package/MobSF/mobsf/StaticAnalyzer/views/android/find.py +75 -0
- package/MobSF/mobsf/StaticAnalyzer/views/android/generate_downloads.py +53 -0
- package/MobSF/mobsf/StaticAnalyzer/views/android/icon_analysis.py +134 -0
- package/MobSF/mobsf/StaticAnalyzer/views/android/manifest_analysis.py +908 -0
- package/MobSF/mobsf/StaticAnalyzer/views/android/manifest_view.py +64 -0
- package/MobSF/mobsf/StaticAnalyzer/views/android/network_security.py +243 -0
- package/MobSF/mobsf/StaticAnalyzer/views/android/playstore.py +76 -0
- package/MobSF/mobsf/StaticAnalyzer/views/android/rules/android_apis.yaml +425 -0
- package/MobSF/mobsf/StaticAnalyzer/views/android/rules/android_niap.yaml +356 -0
- package/MobSF/mobsf/StaticAnalyzer/views/android/rules/android_rules.yaml +683 -0
- package/MobSF/mobsf/StaticAnalyzer/views/android/source_tree.py +79 -0
- package/MobSF/mobsf/StaticAnalyzer/views/android/static_analyzer.py +660 -0
- package/MobSF/mobsf/StaticAnalyzer/views/android/strings.py +64 -0
- package/MobSF/mobsf/StaticAnalyzer/views/android/view_source.py +78 -0
- package/MobSF/mobsf/StaticAnalyzer/views/android/win_fixes.py +53 -0
- package/MobSF/mobsf/StaticAnalyzer/views/android/xapk.py +57 -0
- package/MobSF/mobsf/StaticAnalyzer/views/comparer.py +234 -0
- package/MobSF/mobsf/StaticAnalyzer/views/ios/__init__.py +0 -0
- package/MobSF/mobsf/StaticAnalyzer/views/ios/app_transport_security.py +222 -0
- package/MobSF/mobsf/StaticAnalyzer/views/ios/appstore.py +54 -0
- package/MobSF/mobsf/StaticAnalyzer/views/ios/binary_analysis.py +119 -0
- package/MobSF/mobsf/StaticAnalyzer/views/ios/binary_rule_matcher.py +58 -0
- package/MobSF/mobsf/StaticAnalyzer/views/ios/classdump.py +112 -0
- package/MobSF/mobsf/StaticAnalyzer/views/ios/code_analysis.py +103 -0
- package/MobSF/mobsf/StaticAnalyzer/views/ios/db_interaction.py +177 -0
- package/MobSF/mobsf/StaticAnalyzer/views/ios/file_analysis.py +85 -0
- package/MobSF/mobsf/StaticAnalyzer/views/ios/file_recon.py +63 -0
- package/MobSF/mobsf/StaticAnalyzer/views/ios/icon_analysis.py +73 -0
- package/MobSF/mobsf/StaticAnalyzer/views/ios/macho_analysis.py +255 -0
- package/MobSF/mobsf/StaticAnalyzer/views/ios/permission_analysis.py +90 -0
- package/MobSF/mobsf/StaticAnalyzer/views/ios/plist_analysis.py +150 -0
- package/MobSF/mobsf/StaticAnalyzer/views/ios/rules/__init__.py +0 -0
- package/MobSF/mobsf/StaticAnalyzer/views/ios/rules/ios_apis.yaml +85 -0
- package/MobSF/mobsf/StaticAnalyzer/views/ios/rules/ipa_rules.py +226 -0
- package/MobSF/mobsf/StaticAnalyzer/views/ios/rules/objective_c_rules.yaml +355 -0
- package/MobSF/mobsf/StaticAnalyzer/views/ios/rules/swift_rules.yaml +461 -0
- package/MobSF/mobsf/StaticAnalyzer/views/ios/static_analyzer.py +282 -0
- package/MobSF/mobsf/StaticAnalyzer/views/ios/view_source.py +155 -0
- package/MobSF/mobsf/StaticAnalyzer/views/sast_engine.py +71 -0
- package/MobSF/mobsf/StaticAnalyzer/views/shared_func.py +424 -0
- package/MobSF/mobsf/StaticAnalyzer/views/windows/__init__.py +0 -0
- package/MobSF/mobsf/StaticAnalyzer/views/windows/db_interaction.py +130 -0
- package/MobSF/mobsf/StaticAnalyzer/views/windows/windows.py +590 -0
- package/MobSF/mobsf/__init__.py +0 -0
- package/MobSF/mobsf/__main__.py +49 -0
- package/MobSF/mobsf/install/__init__.py +0 -0
- package/MobSF/mobsf/install/windows/__init__.py +0 -0
- package/MobSF/mobsf/install/windows/config.txt +26 -0
- package/MobSF/mobsf/install/windows/readme.md +43 -0
- package/MobSF/mobsf/install/windows/rpc_client.py +191 -0
- package/MobSF/mobsf/install/windows/setup.py +433 -0
- package/MobSF/mobsf/signatures/IP2LOCATION-LITE-DB5.IPV6.BIN +0 -0
- package/MobSF/mobsf/signatures/exodus_trackers +1 -0
- package/MobSF/mobsf/signatures/maltrail-malware-domains.txt +157958 -0
- package/MobSF/mobsf/signatures/malwaredomainlist +2256 -0
- package/MobSF/mobsf/static/adminlte/dashboard/css/adminlte.min.css +12 -0
- package/MobSF/mobsf/static/adminlte/dashboard/css/adminlte.min.css.map +1 -0
- package/MobSF/mobsf/static/adminlte/dashboard/js/adminlte.min.js +7 -0
- package/MobSF/mobsf/static/adminlte/dashboard/js/adminlte.min.js.map +1 -0
- package/MobSF/mobsf/static/adminlte/plugins/bootstrap/bootstrap.bundle.min.js +7 -0
- package/MobSF/mobsf/static/adminlte/plugins/bootstrap/bootstrap.bundle.min.js.map +1 -0
- package/MobSF/mobsf/static/adminlte/plugins/datatables/jquery.dataTables.min.js +166 -0
- package/MobSF/mobsf/static/adminlte/plugins/datatables-bs4/dataTables.bootstrap4.min.css +1 -0
- package/MobSF/mobsf/static/adminlte/plugins/datatables-bs4/dataTables.bootstrap4.min.js +8 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/css/all.css +4423 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/css/all.min.css +5 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/css/brands.css +14 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/css/brands.min.css +5 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/css/fontawesome.css +4390 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/css/fontawesome.min.css +5 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/css/regular.css +15 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/css/regular.min.css +5 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/css/solid.css +16 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/css/solid.min.css +5 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/css/svg-with-js.css +371 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/css/svg-with-js.min.css +5 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/css/v4-shims.css +2166 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/css/v4-shims.min.css +5 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/webfonts/fa-brands-400.eot +0 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/webfonts/fa-brands-400.svg +3496 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/webfonts/fa-brands-400.ttf +0 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/webfonts/fa-brands-400.woff +0 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/webfonts/fa-brands-400.woff2 +0 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/webfonts/fa-regular-400.eot +0 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/webfonts/fa-regular-400.svg +803 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/webfonts/fa-regular-400.ttf +0 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/webfonts/fa-regular-400.woff +0 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/webfonts/fa-regular-400.woff2 +0 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/webfonts/fa-solid-900.eot +0 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/webfonts/fa-solid-900.svg +4667 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/webfonts/fa-solid-900.ttf +0 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/webfonts/fa-solid-900.woff +0 -0
- package/MobSF/mobsf/static/adminlte/plugins/fontawesome-free/webfonts/fa-solid-900.woff2 +0 -0
- package/MobSF/mobsf/static/adminlte/plugins/jquery-ui.min.js +13 -0
- package/MobSF/mobsf/static/adminlte/plugins/jquery.min.js +2 -0
- package/MobSF/mobsf/static/adminlte/plugins/overlayScrollbars/css/OverlayScrollbars.min.css +13 -0
- package/MobSF/mobsf/static/adminlte/plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js +13 -0
- package/MobSF/mobsf/static/adminlte/plugins/sweetalert2/sweetalert2.min.css +1 -0
- package/MobSF/mobsf/static/adminlte/plugins/sweetalert2/sweetalert2.min.js +1 -0
- package/MobSF/mobsf/static/amcharts/animated.js +1 -0
- package/MobSF/mobsf/static/amcharts/core.js +1 -0
- package/MobSF/mobsf/static/amcharts/maps.js +1 -0
- package/MobSF/mobsf/static/amcharts/worldIndiaLow.js +20 -0
- package/MobSF/mobsf/static/codemirror/codemirror.css +350 -0
- package/MobSF/mobsf/static/codemirror/codemirror.js +9803 -0
- package/MobSF/mobsf/static/codemirror/javascript-lint.js +65 -0
- package/MobSF/mobsf/static/codemirror/javascript.js +945 -0
- package/MobSF/mobsf/static/codemirror/jshint.js +29591 -0
- package/MobSF/mobsf/static/codemirror/lint.css +71 -0
- package/MobSF/mobsf/static/codemirror/lint.js +259 -0
- package/MobSF/mobsf/static/enlighterjs/enlighterjs.enlighter.min.css +3 -0
- package/MobSF/mobsf/static/enlighterjs/enlighterjs.min.css +15 -0
- package/MobSF/mobsf/static/enlighterjs/enlighterjs.min.js +3 -0
- package/MobSF/mobsf/static/fonts/Open_Sans/LICENSE.txt +202 -0
- package/MobSF/mobsf/static/fonts/Open_Sans/OpenSans-Regular.ttf +0 -0
- package/MobSF/mobsf/static/fonts/Oswald/OFL.txt +93 -0
- package/MobSF/mobsf/static/fonts/Oswald/Oswald-Regular.ttf +0 -0
- package/MobSF/mobsf/static/img/favicon.ico +0 -0
- package/MobSF/mobsf/static/img/loading.jpg +0 -0
- package/MobSF/mobsf/static/img/mobsf_icon.png +0 -0
- package/MobSF/mobsf/static/img/mobsf_logo.png +0 -0
- package/MobSF/mobsf/static/img/no_icon.png +0 -0
- package/MobSF/mobsf/static/jsTree/custom.css +114 -0
- package/MobSF/mobsf/static/jsTree/jstree.min.js +6 -0
- package/MobSF/mobsf/static/jsTree/themes/default/32px.png +0 -0
- package/MobSF/mobsf/static/jsTree/themes/default/40px.png +0 -0
- package/MobSF/mobsf/static/jsTree/themes/default/content_background.gif +0 -0
- package/MobSF/mobsf/static/jsTree/themes/default/dir.gif +0 -0
- package/MobSF/mobsf/static/jsTree/themes/default/file.png +0 -0
- package/MobSF/mobsf/static/jsTree/themes/default/style.min.css +1 -0
- package/MobSF/mobsf/static/jsTree/themes/default/throbber.gif +0 -0
- package/MobSF/mobsf/static/landing/css/home.css +310 -0
- package/MobSF/mobsf/static/others/css/devices.min.css +1 -0
- package/MobSF/mobsf/static/others/css/pdf_report.css +123 -0
- package/MobSF/mobsf/static/others/css/spinner.css +168 -0
- package/MobSF/mobsf/static/others/css/terminal.css +79 -0
- package/MobSF/mobsf/static/others/css/xcode.min.css +1 -0
- package/MobSF/mobsf/static/terminal/terminal.css +79 -0
- package/MobSF/mobsf/templates/base/base_layout.html +123 -0
- package/MobSF/mobsf/templates/dynamic_analysis/android/dynamic_analyzer.html +1064 -0
- package/MobSF/mobsf/templates/dynamic_analysis/android/dynamic_report.html +1017 -0
- package/MobSF/mobsf/templates/dynamic_analysis/android/frida_logs.html +48 -0
- package/MobSF/mobsf/templates/dynamic_analysis/android/live_api.html +103 -0
- package/MobSF/mobsf/templates/dynamic_analysis/android/logcat.html +56 -0
- package/MobSF/mobsf/templates/dynamic_analysis/dynamic_analysis.html +328 -0
- package/MobSF/mobsf/templates/general/about.html +30 -0
- package/MobSF/mobsf/templates/general/apidocs.html +2201 -0
- package/MobSF/mobsf/templates/general/error.html +23 -0
- package/MobSF/mobsf/templates/general/home.html +298 -0
- package/MobSF/mobsf/templates/general/not_found.html +22 -0
- package/MobSF/mobsf/templates/general/recent.html +254 -0
- package/MobSF/mobsf/templates/general/search.html +35 -0
- package/MobSF/mobsf/templates/general/view.html +124 -0
- package/MobSF/mobsf/templates/general/zip.html +31 -0
- package/MobSF/mobsf/templates/pdf/android_report.html +930 -0
- package/MobSF/mobsf/templates/pdf/ios_report.html +760 -0
- package/MobSF/mobsf/templates/pdf/windows_report.html +211 -0
- package/MobSF/mobsf/templates/static_analysis/android_binary_analysis.html +2006 -0
- package/MobSF/mobsf/templates/static_analysis/android_source_analysis.html +1502 -0
- package/MobSF/mobsf/templates/static_analysis/compare.html +917 -0
- package/MobSF/mobsf/templates/static_analysis/ios_binary_analysis.html +1299 -0
- package/MobSF/mobsf/templates/static_analysis/ios_source_analysis.html +1125 -0
- package/MobSF/mobsf/templates/static_analysis/source_tree.html +332 -0
- package/MobSF/mobsf/templates/static_analysis/treeview_file.html +1 -0
- package/MobSF/mobsf/templates/static_analysis/treeview_folder.html +5 -0
- package/MobSF/mobsf/templates/static_analysis/windows_binary_analysis.html +411 -0
- package/MobSF/requirements.txt +30 -0
- package/MobSF/run.bat +19 -0
- package/MobSF/run.sh +48 -0
- package/MobSF/scripts/__init__.py +0 -0
- package/MobSF/scripts/check_install.py +28 -0
- package/MobSF/scripts/clean.bat +31 -0
- package/MobSF/scripts/clean.sh +43 -0
- package/MobSF/scripts/entrypoint.sh +8 -0
- package/MobSF/scripts/install_java_wkhtmltopdf.sh +33 -0
- package/MobSF/scripts/mass_static_analysis.py +95 -0
- package/MobSF/scripts/postgres_support.sh +11 -0
- package/MobSF/scripts/stack/docker-compose.yml +15 -0
- package/MobSF/scripts/update_android_permissions.py +46 -0
- package/MobSF/setup.bat +81 -0
- package/MobSF/setup.py +61 -0
- package/MobSF/setup.sh +76 -0
- package/MobSF/tox.ini +94 -0
- package/Notes/AWS Security.pdf +0 -0
- package/Notes/Android Security.pdf +0 -0
- package/Notes/Web Security.pdf +0 -0
- package/Screenshot 2022-03-10 at 11.57.37 AM.png +0 -0
- package/Security Bug Demo.mov +0 -0
- package/Security Review.mov +0 -0
- package/Templates/CRLF.txt +61 -0
- package/Templates/cors.html +26 -0
- package/Templates/openredirect.txt +860 -0
- package/Templates/secrets.py +102 -0
- package/Templates/vhost.txt +174 -0
- package/Templates/wordlist.txt +6038 -0
- package/Templates/xss.txt +2691 -0
- package/cloneall.sh +26 -0
- package/index.js +46 -0
- package/meesecops/.dockerignore +6 -0
- package/meesecops/Dockerfile +15 -0
- package/meesecops/LICENSE +201 -0
- package/meesecops/README.md +2 -0
- package/meesecops/README_secops.md +206 -0
- package/meesecops/Workflows/1-factor.png +0 -0
- package/meesecops/Workflows/2-factor.png +0 -0
- package/meesecops/__init__.py +0 -0
- package/meesecops/application/__init__.py +23 -0
- package/meesecops/application/jira_functions.py +554 -0
- package/meesecops/application/static/css/close_style.css +151 -0
- package/meesecops/application/static/css/style.css +358 -0
- package/meesecops/application/static/external/1.16.0.popper.min.js +5 -0
- package/meesecops/application/static/external/bootstrap.min.css +5 -0
- package/meesecops/application/static/external/bootstrap.min.js +7 -0
- package/meesecops/application/static/external/css.css +48 -0
- package/meesecops/application/static/external/index.js +607 -0
- package/meesecops/application/static/external/jquery-1.12.4.js +11008 -0
- package/meesecops/application/static/fonts/glyphicons-halflings-regular.woff2 +0 -0
- package/meesecops/application/static/fonts/hacked.woff +0 -0
- package/meesecops/application/static/images/ajax-loader.gif +0 -0
- package/meesecops/application/static/images/favicon.png +0 -0
- package/meesecops/application/static/images/glogin.png +0 -0
- package/meesecops/application/static/images/logo3.png +0 -0
- package/meesecops/application/static/images/sort_asc.png +0 -0
- package/meesecops/application/static/images/sort_both.png +0 -0
- package/meesecops/application/static/images/sort_desc.png +0 -0
- package/meesecops/application/static/options.json +62 -0
- package/meesecops/application/static/request_options.json +721 -0
- package/meesecops/application/static/robots.txt +2 -0
- package/meesecops/application/templates/close_tickets.html +261 -0
- package/meesecops/application/templates/footer.html +15 -0
- package/meesecops/application/templates/index.html +337 -0
- package/meesecops/application/templates/login.html +50 -0
- package/meesecops/application/templates/nav.html +63 -0
- package/meesecops/application/templates/new_secreview.html +92 -0
- package/meesecops/application/templates/search_tickets.html +77 -0
- package/meesecops/application/templates/security_updates.html +82 -0
- package/meesecops/application/views.py +536 -0
- package/meesecops/config.py +206 -0
- package/meesecops/logs/README.txt +1 -0
- package/meesecops/logs/access_log +0 -0
- package/meesecops/requirements.txt +32 -0
- package/meesecops/run.py +100 -0
- package/meesecops/screenshot/1.png +0 -0
- package/meesecops/screenshot/2.png +0 -0
- package/meesecops/screenshot/3.png +0 -0
- package/meesecops/screenshot/4-1.png +0 -0
- package/meesecops/screenshot/4.png +0 -0
- package/meesecops/screenshot/5.png +0 -0
- package/meesecops/screenshot/6.png +0 -0
- package/meesecops/screenshot/7.png +0 -0
- package/meesecops/ssl/README.txt +1 -0
- package/package.json +11 -0
- package/prod.pem +27 -0
- package/test1.py +133 -0
@@ -0,0 +1,1653 @@
|
|
1
|
+
"""A growing set of tests designed to ensure isort doesn't have regressions in new versions"""
|
2
|
+
from io import StringIO
|
3
|
+
|
4
|
+
import isort
|
5
|
+
|
6
|
+
|
7
|
+
def test_isort_duplicating_comments_issue_1264():
|
8
|
+
"""Ensure isort doesn't duplicate comments when force_sort_within_sections is set to `True`
|
9
|
+
as was the case in issue #1264: https://github.com/pycqa/isort/issues/1264
|
10
|
+
"""
|
11
|
+
assert (
|
12
|
+
isort.code(
|
13
|
+
"""
|
14
|
+
from homeassistant.util.logging import catch_log_exception
|
15
|
+
|
16
|
+
# Loading the config flow...
|
17
|
+
from . import config_flow
|
18
|
+
""",
|
19
|
+
force_sort_within_sections=True,
|
20
|
+
).count("# Loading the config flow...")
|
21
|
+
== 1
|
22
|
+
)
|
23
|
+
|
24
|
+
|
25
|
+
def test_moving_comments_issue_726():
|
26
|
+
test_input = (
|
27
|
+
"from Blue import models as BlueModels\n"
|
28
|
+
"# comment for PlaidModel\n"
|
29
|
+
"from Plaid.models import PlaidModel\n"
|
30
|
+
)
|
31
|
+
assert isort.code(test_input, force_sort_within_sections=True) == test_input
|
32
|
+
|
33
|
+
test_input = (
|
34
|
+
"# comment for BlueModels\n"
|
35
|
+
"from Blue import models as BlueModels\n"
|
36
|
+
"# comment for PlaidModel\n"
|
37
|
+
"# another comment for PlaidModel\n"
|
38
|
+
"from Plaid.models import PlaidModel\n"
|
39
|
+
)
|
40
|
+
assert isort.code(test_input, force_sort_within_sections=True) == test_input
|
41
|
+
|
42
|
+
|
43
|
+
def test_blank_lined_removed_issue_1275():
|
44
|
+
"""Ensure isort doesn't accidentally remove blank lines after doc strings and before imports.
|
45
|
+
See: https://github.com/pycqa/isort/issues/1275
|
46
|
+
"""
|
47
|
+
assert (
|
48
|
+
isort.code(
|
49
|
+
'''"""
|
50
|
+
My docstring
|
51
|
+
"""
|
52
|
+
|
53
|
+
from b import thing
|
54
|
+
from a import other_thing
|
55
|
+
'''
|
56
|
+
)
|
57
|
+
== '''"""
|
58
|
+
My docstring
|
59
|
+
"""
|
60
|
+
|
61
|
+
from a import other_thing
|
62
|
+
from b import thing
|
63
|
+
'''
|
64
|
+
)
|
65
|
+
|
66
|
+
assert (
|
67
|
+
isort.code(
|
68
|
+
'''"""
|
69
|
+
My docstring
|
70
|
+
"""
|
71
|
+
|
72
|
+
from b import thing
|
73
|
+
from a import other_thing
|
74
|
+
''',
|
75
|
+
add_imports=["from b import thing"],
|
76
|
+
)
|
77
|
+
== '''"""
|
78
|
+
My docstring
|
79
|
+
"""
|
80
|
+
|
81
|
+
from a import other_thing
|
82
|
+
from b import thing
|
83
|
+
'''
|
84
|
+
)
|
85
|
+
|
86
|
+
|
87
|
+
def test_blank_lined_removed_issue_1283():
|
88
|
+
"""Ensure isort doesn't accidentally remove blank lines after __version__ identifiers.
|
89
|
+
See: https://github.com/pycqa/isort/issues/1283
|
90
|
+
"""
|
91
|
+
test_input = """__version__ = "0.58.1"
|
92
|
+
|
93
|
+
from starlette import status
|
94
|
+
"""
|
95
|
+
assert isort.code(test_input) == test_input
|
96
|
+
|
97
|
+
|
98
|
+
def test_extra_blank_line_added_nested_imports_issue_1290():
|
99
|
+
"""Ensure isort doesn't added unecessary blank lines above nested imports.
|
100
|
+
See: https://github.com/pycqa/isort/issues/1290
|
101
|
+
"""
|
102
|
+
test_input = '''from typing import TYPE_CHECKING
|
103
|
+
|
104
|
+
# Special imports
|
105
|
+
from special import thing
|
106
|
+
|
107
|
+
if TYPE_CHECKING:
|
108
|
+
# Special imports
|
109
|
+
from special import another_thing
|
110
|
+
|
111
|
+
|
112
|
+
def func():
|
113
|
+
"""Docstring"""
|
114
|
+
|
115
|
+
# Special imports
|
116
|
+
from special import something_else
|
117
|
+
return
|
118
|
+
'''
|
119
|
+
assert (
|
120
|
+
isort.code(
|
121
|
+
test_input,
|
122
|
+
import_heading_special="Special imports",
|
123
|
+
known_special=["special"],
|
124
|
+
sections=["FUTURE", "STDLIB", "THIRDPARTY", "SPECIAL", "FIRSTPARTY", "LOCALFOLDER"],
|
125
|
+
)
|
126
|
+
== test_input
|
127
|
+
)
|
128
|
+
|
129
|
+
|
130
|
+
def test_add_imports_shouldnt_make_isort_unusable_issue_1297():
|
131
|
+
"""Test to ensure add imports doesn't cause any unexpected behaviour when combined with check
|
132
|
+
See: https://github.com/pycqa/isort/issues/1297
|
133
|
+
"""
|
134
|
+
assert isort.check_code(
|
135
|
+
"""from __future__ import unicode_literals
|
136
|
+
|
137
|
+
from os import path
|
138
|
+
""",
|
139
|
+
add_imports={"from __future__ import unicode_literals"},
|
140
|
+
)
|
141
|
+
|
142
|
+
|
143
|
+
def test_no_extra_lines_for_imports_in_functions_issue_1277():
|
144
|
+
"""Test to ensure isort doesn't introduce extra blank lines for imports within function.
|
145
|
+
See: https://github.com/pycqa/isort/issues/1277
|
146
|
+
"""
|
147
|
+
test_input = """
|
148
|
+
def main():
|
149
|
+
import time
|
150
|
+
|
151
|
+
import sys
|
152
|
+
"""
|
153
|
+
expected_output = """
|
154
|
+
def main():
|
155
|
+
import sys
|
156
|
+
import time
|
157
|
+
"""
|
158
|
+
assert isort.code(isort.code(isort.code(test_input))) == expected_output
|
159
|
+
|
160
|
+
|
161
|
+
def test_no_extra_blank_lines_in_methods_issue_1293():
|
162
|
+
"""Test to ensure isort isn't introducing extra lines in methods that contain imports
|
163
|
+
See: https://github.com/pycqa/isort/issues/1293
|
164
|
+
"""
|
165
|
+
test_input = """
|
166
|
+
|
167
|
+
class Something(object):
|
168
|
+
def on_email_deleted(self, email):
|
169
|
+
from hyperkitty.tasks import rebuild_thread_cache_new_email
|
170
|
+
|
171
|
+
# update or cleanup thread # noqa: E303 (isort issue)
|
172
|
+
if self.emails.count() == 0:
|
173
|
+
...
|
174
|
+
"""
|
175
|
+
assert isort.code(test_input) == test_input
|
176
|
+
assert isort.code(test_input, lines_after_imports=2) == test_input
|
177
|
+
|
178
|
+
|
179
|
+
def test_force_single_line_shouldnt_remove_preceding_comment_lines_issue_1296():
|
180
|
+
"""Tests to ensure force_single_line setting doesn't result in lost comments.
|
181
|
+
See: https://github.com/pycqa/isort/issues/1296
|
182
|
+
"""
|
183
|
+
test_input = """
|
184
|
+
# A comment
|
185
|
+
# A comment
|
186
|
+
|
187
|
+
# Oh no, I'm gone
|
188
|
+
from moo import foo
|
189
|
+
"""
|
190
|
+
# assert isort.code(test_input) == test_input
|
191
|
+
assert isort.code(test_input, force_single_line=True) == test_input
|
192
|
+
|
193
|
+
|
194
|
+
def test_ensure_new_line_before_comments_mixed_with_ensure_newline_before_comments_1295():
|
195
|
+
"""Tests to ensure that the black profile can be used in conjunction with
|
196
|
+
force_sort_within_sections.
|
197
|
+
|
198
|
+
See: https://github.com/pycqa/isort/issues/1295
|
199
|
+
"""
|
200
|
+
test_input = """
|
201
|
+
from openzwave.group import ZWaveGroup
|
202
|
+
from openzwave.network import ZWaveNetwork
|
203
|
+
|
204
|
+
# pylint: disable=import-error
|
205
|
+
from openzwave.option import ZWaveOption
|
206
|
+
"""
|
207
|
+
assert isort.code(test_input, profile="black") == test_input
|
208
|
+
assert isort.code(test_input, profile="black", force_sort_within_sections=True) == test_input
|
209
|
+
|
210
|
+
|
211
|
+
def test_trailing_comma_doesnt_introduce_broken_code_with_comment_and_wrap_issue_1302():
|
212
|
+
"""Tests to assert the combination of include_trailing_comma and a wrapped line doesnt break.
|
213
|
+
See: https://github.com/pycqa/isort/issues/1302.
|
214
|
+
"""
|
215
|
+
assert (
|
216
|
+
isort.code(
|
217
|
+
"""
|
218
|
+
from somewhere import very_very_very_very_very_very_long_symbol # some comment
|
219
|
+
""",
|
220
|
+
line_length=50,
|
221
|
+
include_trailing_comma=True,
|
222
|
+
)
|
223
|
+
== """
|
224
|
+
from somewhere import \\
|
225
|
+
very_very_very_very_very_very_long_symbol # some comment
|
226
|
+
"""
|
227
|
+
)
|
228
|
+
|
229
|
+
|
230
|
+
def test_ensure_sre_parse_is_identified_as_stdlib_issue_1304():
|
231
|
+
"""Ensure sre_parse is idenified as STDLIB.
|
232
|
+
See: https://github.com/pycqa/isort/issues/1304.
|
233
|
+
"""
|
234
|
+
assert isort.place_module("sre_parse") == isort.place_module("sre") == isort.settings.STDLIB
|
235
|
+
|
236
|
+
|
237
|
+
def test_add_imports_shouldnt_move_lower_comments_issue_1300():
|
238
|
+
"""Ensure add_imports doesn't move comments immediately below imports.
|
239
|
+
See:: https://github.com/pycqa/isort/issues/1300.
|
240
|
+
"""
|
241
|
+
test_input = """from __future__ import unicode_literals
|
242
|
+
|
243
|
+
from os import path
|
244
|
+
|
245
|
+
# A comment for a constant
|
246
|
+
ANSWER = 42
|
247
|
+
"""
|
248
|
+
assert isort.code(test_input, add_imports=["from os import path"]) == test_input
|
249
|
+
|
250
|
+
|
251
|
+
def test_windows_newline_issue_1277():
|
252
|
+
"""Test to ensure windows new lines are correctly handled within indented scopes.
|
253
|
+
See: https://github.com/pycqa/isort/issues/1277
|
254
|
+
"""
|
255
|
+
assert (
|
256
|
+
isort.code("\ndef main():\r\n import time\r\n\n import sys\r\n")
|
257
|
+
== "\ndef main():\r\n import sys\r\n import time\r\n"
|
258
|
+
)
|
259
|
+
|
260
|
+
|
261
|
+
def test_windows_newline_issue_1278():
|
262
|
+
"""Test to ensure windows new lines are correctly handled within indented scopes.
|
263
|
+
See: https://github.com/pycqa/isort/issues/1278
|
264
|
+
"""
|
265
|
+
assert isort.check_code(
|
266
|
+
"\ntry:\r\n import datadog_agent\r\n\r\n "
|
267
|
+
"from ..log import CheckLoggingAdapter, init_logging\r\n\r\n init_logging()\r\n"
|
268
|
+
"except ImportError:\r\n pass\r\n"
|
269
|
+
)
|
270
|
+
|
271
|
+
|
272
|
+
def test_check_never_passes_with_indented_headings_issue_1301():
|
273
|
+
"""Test to ensure that test can pass even when there are indented headings.
|
274
|
+
See: https://github.com/pycqa/isort/issues/1301
|
275
|
+
"""
|
276
|
+
assert isort.check_code(
|
277
|
+
"""
|
278
|
+
try:
|
279
|
+
# stdlib
|
280
|
+
import logging
|
281
|
+
from os import abc, path
|
282
|
+
except ImportError:
|
283
|
+
pass
|
284
|
+
""",
|
285
|
+
import_heading_stdlib="stdlib",
|
286
|
+
)
|
287
|
+
|
288
|
+
|
289
|
+
def test_isort_shouldnt_fail_on_long_from_with_dot_issue_1190():
|
290
|
+
"""Test to ensure that isort will correctly handle formatting a long from import that contains
|
291
|
+
a dot.
|
292
|
+
See: https://github.com/pycqa/isort/issues/1190
|
293
|
+
"""
|
294
|
+
assert (
|
295
|
+
isort.code(
|
296
|
+
"""
|
297
|
+
from this_is_a_very_long_import_statement.that_will_occur_across_two_lines\\
|
298
|
+
.when_the_line_length.is_only_seventynine_chars import (
|
299
|
+
function1,
|
300
|
+
function2,
|
301
|
+
)
|
302
|
+
""",
|
303
|
+
line_length=79,
|
304
|
+
multi_line_output=3,
|
305
|
+
)
|
306
|
+
== """
|
307
|
+
from this_is_a_very_long_import_statement.that_will_occur_across_two_lines"""
|
308
|
+
""".when_the_line_length.is_only_seventynine_chars import (
|
309
|
+
function1,
|
310
|
+
function2
|
311
|
+
)
|
312
|
+
"""
|
313
|
+
)
|
314
|
+
|
315
|
+
|
316
|
+
def test_isort_shouldnt_add_extra_new_line_when_fass_and_n_issue_1315():
|
317
|
+
"""Test to ensure isort doesnt add a second extra new line when combining --fss and -n options.
|
318
|
+
See: https://github.com/pycqa/isort/issues/1315
|
319
|
+
"""
|
320
|
+
assert isort.check_code(
|
321
|
+
"""import sys
|
322
|
+
|
323
|
+
# Comment canary
|
324
|
+
from . import foo
|
325
|
+
""",
|
326
|
+
ensure_newline_before_comments=True, # -n
|
327
|
+
force_sort_within_sections=True, # -fss
|
328
|
+
show_diff=True, # for better debugging in the case the test case fails.
|
329
|
+
)
|
330
|
+
|
331
|
+
assert (
|
332
|
+
isort.code(
|
333
|
+
"""
|
334
|
+
from . import foo
|
335
|
+
# Comment canary
|
336
|
+
from .. import foo
|
337
|
+
""",
|
338
|
+
ensure_newline_before_comments=True,
|
339
|
+
force_sort_within_sections=True,
|
340
|
+
)
|
341
|
+
== """
|
342
|
+
from . import foo
|
343
|
+
|
344
|
+
# Comment canary
|
345
|
+
from .. import foo
|
346
|
+
"""
|
347
|
+
)
|
348
|
+
|
349
|
+
|
350
|
+
def test_isort_doesnt_rewrite_import_with_dot_to_from_import_issue_1280():
|
351
|
+
"""Test to ensure isort doesn't rewrite imports in the from of import y.x into from y import x.
|
352
|
+
This is because they are not technically fully equivalent to eachother and can introduce broken
|
353
|
+
behaviour.
|
354
|
+
See: https://github.com/pycqa/isort/issues/1280
|
355
|
+
"""
|
356
|
+
assert isort.check_code(
|
357
|
+
"""
|
358
|
+
import test.module
|
359
|
+
import test.module as m
|
360
|
+
from test import module
|
361
|
+
from test import module as m
|
362
|
+
""",
|
363
|
+
show_diff=True,
|
364
|
+
)
|
365
|
+
|
366
|
+
|
367
|
+
def test_isort_shouldnt_introduce_extra_lines_with_fass_issue_1322():
|
368
|
+
"""Tests to ensure isort doesn't introduce extra lines when used with fass option.
|
369
|
+
See: https://github.com/pycqa/isort/issues/1322
|
370
|
+
"""
|
371
|
+
assert (
|
372
|
+
isort.code(
|
373
|
+
"""
|
374
|
+
import logging
|
375
|
+
|
376
|
+
# Comment canary
|
377
|
+
from foo import bar
|
378
|
+
import quux
|
379
|
+
""",
|
380
|
+
force_sort_within_sections=True,
|
381
|
+
ensure_newline_before_comments=True,
|
382
|
+
)
|
383
|
+
== """
|
384
|
+
import logging
|
385
|
+
|
386
|
+
# Comment canary
|
387
|
+
from foo import bar
|
388
|
+
import quux
|
389
|
+
"""
|
390
|
+
)
|
391
|
+
|
392
|
+
|
393
|
+
def test_comments_should_cause_wrapping_on_long_lines_black_mode_issue_1219():
|
394
|
+
"""Tests to ensure if isort encounters a single import line which is made too long with a comment
|
395
|
+
it is wrapped when using black profile.
|
396
|
+
See: https://github.com/pycqa/isort/issues/1219
|
397
|
+
"""
|
398
|
+
assert isort.check_code(
|
399
|
+
"""
|
400
|
+
from many_stop_words import (
|
401
|
+
get_stop_words as get_base_stopwords, # extended list of stop words, also for en
|
402
|
+
)
|
403
|
+
""",
|
404
|
+
show_diff=True,
|
405
|
+
profile="black",
|
406
|
+
)
|
407
|
+
|
408
|
+
|
409
|
+
def test_comment_blocks_should_stay_associated_without_extra_lines_issue_1156():
|
410
|
+
"""Tests to ensure isort doesn't add an extra line when there are large import blocks
|
411
|
+
or otherwise warp the intent.
|
412
|
+
See: https://github.com/pycqa/isort/issues/1156
|
413
|
+
"""
|
414
|
+
assert (
|
415
|
+
isort.code(
|
416
|
+
"""from top_level_ignored import config # isort:skip
|
417
|
+
####################################
|
418
|
+
# COMMENT BLOCK SEPARATING THESE #
|
419
|
+
####################################
|
420
|
+
from ast import excepthandler
|
421
|
+
import logging
|
422
|
+
"""
|
423
|
+
)
|
424
|
+
== """from top_level_ignored import config # isort:skip
|
425
|
+
import logging
|
426
|
+
####################################
|
427
|
+
# COMMENT BLOCK SEPARATING THESE #
|
428
|
+
####################################
|
429
|
+
from ast import excepthandler
|
430
|
+
"""
|
431
|
+
)
|
432
|
+
|
433
|
+
|
434
|
+
def test_comment_shouldnt_be_duplicated_with_fass_enabled_issue_1329():
|
435
|
+
"""Tests to ensure isort doesn't duplicate comments when imports occur with comment on top,
|
436
|
+
immediately after large comment blocks.
|
437
|
+
See: https://github.com/pycqa/isort/pull/1329/files.
|
438
|
+
"""
|
439
|
+
assert isort.check_code(
|
440
|
+
"""'''
|
441
|
+
Multi-line docstring
|
442
|
+
'''
|
443
|
+
# Comment for A.
|
444
|
+
import a
|
445
|
+
# Comment for B - not A!
|
446
|
+
import b
|
447
|
+
""",
|
448
|
+
force_sort_within_sections=True,
|
449
|
+
show_diff=True,
|
450
|
+
)
|
451
|
+
|
452
|
+
|
453
|
+
def test_wrap_mode_equal_to_line_length_with_indendet_imports_issue_1333():
|
454
|
+
assert isort.check_code(
|
455
|
+
"""
|
456
|
+
import a
|
457
|
+
import b
|
458
|
+
|
459
|
+
|
460
|
+
def function():
|
461
|
+
import a as b
|
462
|
+
import c as d
|
463
|
+
""",
|
464
|
+
line_length=17,
|
465
|
+
wrap_length=17,
|
466
|
+
show_diff=True,
|
467
|
+
)
|
468
|
+
|
469
|
+
|
470
|
+
def test_isort_skipped_nested_imports_issue_1339():
|
471
|
+
"""Ensure `isort:skip are honored in nested imports.
|
472
|
+
See: https://github.com/pycqa/isort/issues/1339.
|
473
|
+
"""
|
474
|
+
assert isort.check_code(
|
475
|
+
"""
|
476
|
+
def import_test():
|
477
|
+
from os ( # isort:skip
|
478
|
+
import path
|
479
|
+
)
|
480
|
+
""",
|
481
|
+
show_diff=True,
|
482
|
+
)
|
483
|
+
|
484
|
+
|
485
|
+
def test_windows_diff_too_large_misrepresentative_issue_1348(test_path):
|
486
|
+
"""Ensure isort handles windows files correctly when it come to producing a diff with --diff.
|
487
|
+
See: https://github.com/pycqa/isort/issues/1348
|
488
|
+
"""
|
489
|
+
diff_output = StringIO()
|
490
|
+
isort.file(test_path / "example_crlf_file.py", show_diff=diff_output)
|
491
|
+
diff_output.seek(0)
|
492
|
+
assert diff_output.read().endswith(
|
493
|
+
"-1,5 +1,5 @@\n+import a\r\n import b\r\n" "-import a\r\n \r\n \r\n def func():\r\n"
|
494
|
+
)
|
495
|
+
|
496
|
+
|
497
|
+
def test_combine_as_does_not_lose_comments_issue_1321():
|
498
|
+
"""Test to ensure isort doesn't lose comments when --combine-as is used.
|
499
|
+
See: https://github.com/pycqa/isort/issues/1321
|
500
|
+
"""
|
501
|
+
test_input = """
|
502
|
+
from foo import * # noqa
|
503
|
+
from foo import bar as quux # other
|
504
|
+
from foo import x as a # noqa
|
505
|
+
|
506
|
+
import operator as op # op comment
|
507
|
+
import datetime as dtime # dtime comment
|
508
|
+
|
509
|
+
from datetime import date as d # dcomm
|
510
|
+
from datetime import datetime as dt # dtcomm
|
511
|
+
"""
|
512
|
+
|
513
|
+
expected_output = """
|
514
|
+
import datetime as dtime # dtime comment
|
515
|
+
import operator as op # op comment
|
516
|
+
from datetime import date as d, datetime as dt # dcomm; dtcomm
|
517
|
+
|
518
|
+
from foo import * # noqa
|
519
|
+
from foo import bar as quux, x as a # other; noqa
|
520
|
+
"""
|
521
|
+
|
522
|
+
assert isort.code(test_input, combine_as_imports=True) == expected_output
|
523
|
+
|
524
|
+
|
525
|
+
def test_combine_as_does_not_lose_comments_issue_1381():
|
526
|
+
"""Test to ensure isort doesn't lose comments when --combine-as is used.
|
527
|
+
See: https://github.com/pycqa/isort/issues/1381
|
528
|
+
"""
|
529
|
+
test_input = """
|
530
|
+
from smtplib import SMTPConnectError, SMTPNotSupportedError # important comment
|
531
|
+
"""
|
532
|
+
assert "# important comment" in isort.code(test_input, combine_as_imports=True)
|
533
|
+
|
534
|
+
test_input = """
|
535
|
+
from appsettings import AppSettings, ObjectSetting, StringSetting # type: ignore
|
536
|
+
"""
|
537
|
+
assert "# type: ignore" in isort.code(test_input, combine_as_imports=True)
|
538
|
+
|
539
|
+
|
540
|
+
def test_incorrect_grouping_when_comments_issue_1396():
|
541
|
+
"""Test to ensure isort groups import correct independent of the comments present.
|
542
|
+
See: https://github.com/pycqa/isort/issues/1396
|
543
|
+
"""
|
544
|
+
assert (
|
545
|
+
isort.code(
|
546
|
+
"""from django.shortcuts import render
|
547
|
+
from apps.profiler.models import Project
|
548
|
+
from django.contrib.auth.decorators import login_required
|
549
|
+
from django.views.generic import (
|
550
|
+
# ListView,
|
551
|
+
# DetailView,
|
552
|
+
TemplateView,
|
553
|
+
# CreateView,
|
554
|
+
# View
|
555
|
+
)
|
556
|
+
""",
|
557
|
+
line_length=88,
|
558
|
+
known_first_party=["apps"],
|
559
|
+
known_django=["django"],
|
560
|
+
sections=["FUTURE", "STDLIB", "DJANGO", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"],
|
561
|
+
)
|
562
|
+
== """from django.contrib.auth.decorators import login_required
|
563
|
+
from django.shortcuts import render
|
564
|
+
from django.views.generic import \\
|
565
|
+
TemplateView # ListView,; DetailView,; CreateView,; View
|
566
|
+
|
567
|
+
from apps.profiler.models import Project
|
568
|
+
"""
|
569
|
+
)
|
570
|
+
assert (
|
571
|
+
isort.code(
|
572
|
+
"""from django.contrib.auth.decorators import login_required
|
573
|
+
from django.shortcuts import render
|
574
|
+
|
575
|
+
from apps.profiler.models import Project
|
576
|
+
|
577
|
+
from django.views.generic import ( # ListView,; DetailView,; CreateView,; View
|
578
|
+
TemplateView,
|
579
|
+
)
|
580
|
+
""",
|
581
|
+
line_length=88,
|
582
|
+
known_first_party=["apps"],
|
583
|
+
known_django=["django"],
|
584
|
+
sections=["FUTURE", "STDLIB", "DJANGO", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"],
|
585
|
+
include_trailing_comma=True,
|
586
|
+
multi_line_output=3,
|
587
|
+
force_grid_wrap=0,
|
588
|
+
use_parentheses=True,
|
589
|
+
ensure_newline_before_comments=True,
|
590
|
+
)
|
591
|
+
== """from django.contrib.auth.decorators import login_required
|
592
|
+
from django.shortcuts import render
|
593
|
+
from django.views.generic import ( # ListView,; DetailView,; CreateView,; View
|
594
|
+
TemplateView,
|
595
|
+
)
|
596
|
+
|
597
|
+
from apps.profiler.models import Project
|
598
|
+
"""
|
599
|
+
)
|
600
|
+
|
601
|
+
|
602
|
+
def test_reverse_relative_combined_with_force_sort_within_sections_issue_1395():
|
603
|
+
"""Test to ensure reverse relative combines well with other common isort settings.
|
604
|
+
See: https://github.com/pycqa/isort/issues/1395.
|
605
|
+
"""
|
606
|
+
assert isort.check_code(
|
607
|
+
"""from .fileA import a_var
|
608
|
+
from ..fileB import b_var
|
609
|
+
""",
|
610
|
+
show_diff=True,
|
611
|
+
reverse_relative=True,
|
612
|
+
force_sort_within_sections=True,
|
613
|
+
order_by_type=False,
|
614
|
+
case_sensitive=False,
|
615
|
+
multi_line_output=5,
|
616
|
+
sections=["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "APPLICATION", "LOCALFOLDER"],
|
617
|
+
lines_after_imports=2,
|
618
|
+
no_lines_before="LOCALFOLDER",
|
619
|
+
)
|
620
|
+
|
621
|
+
|
622
|
+
def test_isort_should_be_able_to_add_independent_of_doc_string_placement_issue_1420():
|
623
|
+
"""isort should be able to know when an import requested to be added is sucesfully added,
|
624
|
+
independent of where the top doc string is located.
|
625
|
+
See: https://github.com/PyCQA/isort/issues/1420
|
626
|
+
"""
|
627
|
+
assert isort.check_code(
|
628
|
+
'''"""module docstring"""
|
629
|
+
|
630
|
+
import os
|
631
|
+
''',
|
632
|
+
show_diff=True,
|
633
|
+
add_imports=["os"],
|
634
|
+
)
|
635
|
+
|
636
|
+
|
637
|
+
def test_comments_should_never_be_moved_between_imports_issue_1427():
|
638
|
+
"""isort should never move comments to different import statement.
|
639
|
+
See: https://github.com/PyCQA/isort/issues/1427
|
640
|
+
"""
|
641
|
+
assert isort.check_code(
|
642
|
+
"""from package import CONSTANT
|
643
|
+
from package import * # noqa
|
644
|
+
""",
|
645
|
+
force_single_line=True,
|
646
|
+
show_diff=True,
|
647
|
+
)
|
648
|
+
|
649
|
+
|
650
|
+
def test_isort_doesnt_misplace_comments_issue_1431():
|
651
|
+
"""Test to ensure isort wont misplace comments.
|
652
|
+
See: https://github.com/PyCQA/isort/issues/1431
|
653
|
+
"""
|
654
|
+
input_text = """from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
|
655
|
+
MyLovelyCompanyTeamProjectComponent, # NOT DRY
|
656
|
+
)
|
657
|
+
from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
|
658
|
+
MyLovelyCompanyTeamProjectComponent as component, # DRY
|
659
|
+
)
|
660
|
+
"""
|
661
|
+
assert isort.code(input_text, profile="black") == input_text
|
662
|
+
|
663
|
+
|
664
|
+
def test_isort_doesnt_misplace_add_import_issue_1445():
|
665
|
+
"""Test to ensure isort won't misplace an added import depending on docstring position
|
666
|
+
See: https://github.com/PyCQA/isort/issues/1445
|
667
|
+
"""
|
668
|
+
assert (
|
669
|
+
isort.code(
|
670
|
+
'''#!/usr/bin/env python
|
671
|
+
|
672
|
+
"""module docstring"""
|
673
|
+
''',
|
674
|
+
add_imports=["import os"],
|
675
|
+
)
|
676
|
+
== '''#!/usr/bin/env python
|
677
|
+
|
678
|
+
"""module docstring"""
|
679
|
+
|
680
|
+
import os
|
681
|
+
'''
|
682
|
+
)
|
683
|
+
|
684
|
+
assert isort.check_code(
|
685
|
+
'''#!/usr/bin/env python
|
686
|
+
|
687
|
+
"""module docstring"""
|
688
|
+
|
689
|
+
import os
|
690
|
+
''',
|
691
|
+
add_imports=["import os"],
|
692
|
+
show_diff=True,
|
693
|
+
)
|
694
|
+
|
695
|
+
|
696
|
+
def test_isort_doesnt_mangle_code_when_adding_imports_issue_1444():
|
697
|
+
"""isort should NEVER mangle code. This particularly nasty and easy to reproduce bug,
|
698
|
+
caused isort to produce invalid code just by adding a single import statement depending
|
699
|
+
on comment placement.
|
700
|
+
See: https://github.com/PyCQA/isort/issues/1444
|
701
|
+
"""
|
702
|
+
assert (
|
703
|
+
isort.code(
|
704
|
+
'''
|
705
|
+
|
706
|
+
"""module docstring"""
|
707
|
+
''',
|
708
|
+
add_imports=["import os"],
|
709
|
+
)
|
710
|
+
== '''
|
711
|
+
|
712
|
+
"""module docstring"""
|
713
|
+
|
714
|
+
import os
|
715
|
+
'''
|
716
|
+
)
|
717
|
+
|
718
|
+
|
719
|
+
def test_isort_float_to_top_with_sort_on_off_tests():
|
720
|
+
"""Characterization test for current behaviour of float-to-top on isort: on/off sections.
|
721
|
+
- imports in isort:off sections stay where they are
|
722
|
+
- imports in isort:on sections float up, but to the top of the isort:on section (not the
|
723
|
+
top of the file)"""
|
724
|
+
assert (
|
725
|
+
isort.code(
|
726
|
+
"""
|
727
|
+
def foo():
|
728
|
+
pass
|
729
|
+
|
730
|
+
import a
|
731
|
+
|
732
|
+
# isort: off
|
733
|
+
import stays_in_section
|
734
|
+
|
735
|
+
x = 1
|
736
|
+
|
737
|
+
import stays_in_place
|
738
|
+
|
739
|
+
# isort: on
|
740
|
+
|
741
|
+
def bar():
|
742
|
+
pass
|
743
|
+
|
744
|
+
import floats_to_top_of_section
|
745
|
+
|
746
|
+
def baz():
|
747
|
+
pass
|
748
|
+
""",
|
749
|
+
float_to_top=True,
|
750
|
+
)
|
751
|
+
== """import a
|
752
|
+
|
753
|
+
|
754
|
+
def foo():
|
755
|
+
pass
|
756
|
+
|
757
|
+
# isort: off
|
758
|
+
import stays_in_section
|
759
|
+
|
760
|
+
x = 1
|
761
|
+
|
762
|
+
import stays_in_place
|
763
|
+
|
764
|
+
# isort: on
|
765
|
+
import floats_to_top_of_section
|
766
|
+
|
767
|
+
|
768
|
+
def bar():
|
769
|
+
pass
|
770
|
+
|
771
|
+
|
772
|
+
def baz():
|
773
|
+
pass
|
774
|
+
"""
|
775
|
+
)
|
776
|
+
|
777
|
+
to_sort = """# isort: off
|
778
|
+
|
779
|
+
def foo():
|
780
|
+
pass
|
781
|
+
|
782
|
+
import stays_in_place
|
783
|
+
import no_float_to_to_top
|
784
|
+
import no_ordering
|
785
|
+
|
786
|
+
def bar():
|
787
|
+
pass
|
788
|
+
"""
|
789
|
+
|
790
|
+
# No changes if isort is off
|
791
|
+
assert isort.code(to_sort, float_to_top=True) == to_sort
|
792
|
+
|
793
|
+
|
794
|
+
def test_isort_doesnt_float_to_top_correctly_when_imports_not_at_top_issue_1382():
|
795
|
+
"""isort should float existing imports to the top, if they are currently below the top.
|
796
|
+
See: https://github.com/PyCQA/isort/issues/1382
|
797
|
+
"""
|
798
|
+
assert (
|
799
|
+
isort.code(
|
800
|
+
"""
|
801
|
+
def foo():
|
802
|
+
pass
|
803
|
+
|
804
|
+
import a
|
805
|
+
|
806
|
+
def bar():
|
807
|
+
pass
|
808
|
+
""",
|
809
|
+
float_to_top=True,
|
810
|
+
)
|
811
|
+
== """import a
|
812
|
+
|
813
|
+
|
814
|
+
def foo():
|
815
|
+
pass
|
816
|
+
|
817
|
+
|
818
|
+
def bar():
|
819
|
+
pass
|
820
|
+
"""
|
821
|
+
)
|
822
|
+
|
823
|
+
assert (
|
824
|
+
isort.code(
|
825
|
+
"""
|
826
|
+
|
827
|
+
|
828
|
+
|
829
|
+
|
830
|
+
|
831
|
+
|
832
|
+
def foo():
|
833
|
+
pass
|
834
|
+
|
835
|
+
import a
|
836
|
+
|
837
|
+
def bar():
|
838
|
+
pass
|
839
|
+
""",
|
840
|
+
float_to_top=True,
|
841
|
+
)
|
842
|
+
== """import a
|
843
|
+
|
844
|
+
|
845
|
+
def foo():
|
846
|
+
pass
|
847
|
+
|
848
|
+
|
849
|
+
def bar():
|
850
|
+
pass
|
851
|
+
"""
|
852
|
+
)
|
853
|
+
|
854
|
+
assert (
|
855
|
+
isort.code(
|
856
|
+
'''"""My comment
|
857
|
+
|
858
|
+
|
859
|
+
"""
|
860
|
+
def foo():
|
861
|
+
pass
|
862
|
+
|
863
|
+
import a
|
864
|
+
|
865
|
+
def bar():
|
866
|
+
pass
|
867
|
+
''',
|
868
|
+
float_to_top=True,
|
869
|
+
)
|
870
|
+
== '''"""My comment
|
871
|
+
|
872
|
+
|
873
|
+
"""
|
874
|
+
import a
|
875
|
+
|
876
|
+
|
877
|
+
def foo():
|
878
|
+
pass
|
879
|
+
|
880
|
+
|
881
|
+
def bar():
|
882
|
+
pass
|
883
|
+
'''
|
884
|
+
)
|
885
|
+
|
886
|
+
assert (
|
887
|
+
isort.code(
|
888
|
+
'''
|
889
|
+
"""My comment
|
890
|
+
|
891
|
+
|
892
|
+
"""
|
893
|
+
def foo():
|
894
|
+
pass
|
895
|
+
|
896
|
+
import a
|
897
|
+
|
898
|
+
def bar():
|
899
|
+
pass
|
900
|
+
''',
|
901
|
+
float_to_top=True,
|
902
|
+
)
|
903
|
+
== '''
|
904
|
+
"""My comment
|
905
|
+
|
906
|
+
|
907
|
+
"""
|
908
|
+
import a
|
909
|
+
|
910
|
+
|
911
|
+
def foo():
|
912
|
+
pass
|
913
|
+
|
914
|
+
|
915
|
+
def bar():
|
916
|
+
pass
|
917
|
+
'''
|
918
|
+
)
|
919
|
+
|
920
|
+
assert (
|
921
|
+
isort.code(
|
922
|
+
'''#!/bin/bash
|
923
|
+
"""My comment
|
924
|
+
|
925
|
+
|
926
|
+
"""
|
927
|
+
def foo():
|
928
|
+
pass
|
929
|
+
|
930
|
+
import a
|
931
|
+
|
932
|
+
def bar():
|
933
|
+
pass
|
934
|
+
''',
|
935
|
+
float_to_top=True,
|
936
|
+
)
|
937
|
+
== '''#!/bin/bash
|
938
|
+
"""My comment
|
939
|
+
|
940
|
+
|
941
|
+
"""
|
942
|
+
import a
|
943
|
+
|
944
|
+
|
945
|
+
def foo():
|
946
|
+
pass
|
947
|
+
|
948
|
+
|
949
|
+
def bar():
|
950
|
+
pass
|
951
|
+
'''
|
952
|
+
)
|
953
|
+
|
954
|
+
assert (
|
955
|
+
isort.code(
|
956
|
+
'''#!/bin/bash
|
957
|
+
|
958
|
+
"""My comment
|
959
|
+
|
960
|
+
|
961
|
+
"""
|
962
|
+
def foo():
|
963
|
+
pass
|
964
|
+
|
965
|
+
import a
|
966
|
+
|
967
|
+
def bar():
|
968
|
+
pass
|
969
|
+
''',
|
970
|
+
float_to_top=True,
|
971
|
+
)
|
972
|
+
== '''#!/bin/bash
|
973
|
+
|
974
|
+
"""My comment
|
975
|
+
|
976
|
+
|
977
|
+
"""
|
978
|
+
import a
|
979
|
+
|
980
|
+
|
981
|
+
def foo():
|
982
|
+
pass
|
983
|
+
|
984
|
+
|
985
|
+
def bar():
|
986
|
+
pass
|
987
|
+
'''
|
988
|
+
)
|
989
|
+
|
990
|
+
|
991
|
+
def test_empty_float_to_top_shouldnt_error_issue_1453():
|
992
|
+
"""isort shouldn't error when float to top is set with a mostly empty file"""
|
993
|
+
assert isort.check_code(
|
994
|
+
"""
|
995
|
+
""",
|
996
|
+
show_diff=True,
|
997
|
+
float_to_top=True,
|
998
|
+
)
|
999
|
+
assert isort.check_code(
|
1000
|
+
"""
|
1001
|
+
""",
|
1002
|
+
show_diff=True,
|
1003
|
+
)
|
1004
|
+
|
1005
|
+
|
1006
|
+
def test_import_sorting_shouldnt_be_endless_with_headers_issue_1454():
|
1007
|
+
"""isort should never enter an endless sorting loop.
|
1008
|
+
See: https://github.com/PyCQA/isort/issues/1454
|
1009
|
+
"""
|
1010
|
+
assert isort.check_code(
|
1011
|
+
"""
|
1012
|
+
|
1013
|
+
# standard library imports
|
1014
|
+
import sys
|
1015
|
+
|
1016
|
+
try:
|
1017
|
+
# Comment about local lib
|
1018
|
+
# related third party imports
|
1019
|
+
from local_lib import stuff
|
1020
|
+
except ImportError as e:
|
1021
|
+
pass
|
1022
|
+
""",
|
1023
|
+
known_third_party=["local_lib"],
|
1024
|
+
import_heading_thirdparty="related third party imports",
|
1025
|
+
show_diff=True,
|
1026
|
+
)
|
1027
|
+
|
1028
|
+
|
1029
|
+
def test_isort_should_leave_non_import_from_lines_alone_issue_1488():
|
1030
|
+
"""isort should never mangle non-import from statements.
|
1031
|
+
See: https://github.com/PyCQA/isort/issues/1488
|
1032
|
+
"""
|
1033
|
+
raise_from_should_be_ignored = """
|
1034
|
+
raise SomeException("Blah") \\
|
1035
|
+
from exceptionsInfo.popitem()[1]
|
1036
|
+
"""
|
1037
|
+
assert isort.check_code(raise_from_should_be_ignored, show_diff=True)
|
1038
|
+
|
1039
|
+
yield_from_should_be_ignored = """
|
1040
|
+
def generator_function():
|
1041
|
+
yield \\
|
1042
|
+
from other_function()[1]
|
1043
|
+
"""
|
1044
|
+
assert isort.check_code(yield_from_should_be_ignored, show_diff=True)
|
1045
|
+
|
1046
|
+
wont_ignore_comment_contiuation = """
|
1047
|
+
# one
|
1048
|
+
|
1049
|
+
# two
|
1050
|
+
|
1051
|
+
|
1052
|
+
def function():
|
1053
|
+
# three \\
|
1054
|
+
import b
|
1055
|
+
import a
|
1056
|
+
"""
|
1057
|
+
assert (
|
1058
|
+
isort.code(wont_ignore_comment_contiuation)
|
1059
|
+
== """
|
1060
|
+
# one
|
1061
|
+
|
1062
|
+
# two
|
1063
|
+
|
1064
|
+
|
1065
|
+
def function():
|
1066
|
+
# three \\
|
1067
|
+
import a
|
1068
|
+
import b
|
1069
|
+
"""
|
1070
|
+
)
|
1071
|
+
|
1072
|
+
will_ignore_if_non_comment_continuation = """
|
1073
|
+
# one
|
1074
|
+
|
1075
|
+
# two
|
1076
|
+
|
1077
|
+
|
1078
|
+
def function():
|
1079
|
+
raise \\
|
1080
|
+
import b
|
1081
|
+
import a
|
1082
|
+
"""
|
1083
|
+
assert isort.check_code(will_ignore_if_non_comment_continuation, show_diff=True)
|
1084
|
+
|
1085
|
+
yield_from_parens_should_be_ignored = """
|
1086
|
+
def generator_function():
|
1087
|
+
(
|
1088
|
+
yield
|
1089
|
+
from other_function()[1]
|
1090
|
+
)
|
1091
|
+
"""
|
1092
|
+
assert isort.check_code(yield_from_parens_should_be_ignored, show_diff=True)
|
1093
|
+
|
1094
|
+
yield_from_lots_of_parens_and_space_should_be_ignored = """
|
1095
|
+
def generator_function():
|
1096
|
+
(
|
1097
|
+
(
|
1098
|
+
((((
|
1099
|
+
(((((
|
1100
|
+
((
|
1101
|
+
(((
|
1102
|
+
yield
|
1103
|
+
|
1104
|
+
|
1105
|
+
|
1106
|
+
from other_function()[1]
|
1107
|
+
)))))))))))))
|
1108
|
+
)))
|
1109
|
+
"""
|
1110
|
+
assert isort.check_code(yield_from_lots_of_parens_and_space_should_be_ignored, show_diff=True)
|
1111
|
+
|
1112
|
+
yield_from_should_be_ignored_when_following_import_statement = """
|
1113
|
+
def generator_function():
|
1114
|
+
import os
|
1115
|
+
|
1116
|
+
yield \\
|
1117
|
+
from other_function()[1]
|
1118
|
+
"""
|
1119
|
+
assert isort.check_code(
|
1120
|
+
yield_from_should_be_ignored_when_following_import_statement, show_diff=True
|
1121
|
+
)
|
1122
|
+
|
1123
|
+
yield_at_file_end_ignored = """
|
1124
|
+
def generator_function():
|
1125
|
+
(
|
1126
|
+
(
|
1127
|
+
((((
|
1128
|
+
(((((
|
1129
|
+
((
|
1130
|
+
(((
|
1131
|
+
yield
|
1132
|
+
"""
|
1133
|
+
assert isort.check_code(yield_at_file_end_ignored, show_diff=True)
|
1134
|
+
|
1135
|
+
raise_at_file_end_ignored = """
|
1136
|
+
def generator_function():
|
1137
|
+
(
|
1138
|
+
(
|
1139
|
+
((((
|
1140
|
+
(((((
|
1141
|
+
((
|
1142
|
+
(((
|
1143
|
+
raise (
|
1144
|
+
"""
|
1145
|
+
assert isort.check_code(raise_at_file_end_ignored, show_diff=True)
|
1146
|
+
|
1147
|
+
raise_from_at_file_end_ignored = """
|
1148
|
+
def generator_function():
|
1149
|
+
(
|
1150
|
+
(
|
1151
|
+
((((
|
1152
|
+
(((((
|
1153
|
+
((
|
1154
|
+
(((
|
1155
|
+
raise \\
|
1156
|
+
from \\
|
1157
|
+
"""
|
1158
|
+
assert isort.check_code(raise_from_at_file_end_ignored, show_diff=True)
|
1159
|
+
|
1160
|
+
|
1161
|
+
def test_isort_float_to_top_correctly_identifies_single_line_comments_1499():
|
1162
|
+
"""Test to ensure isort correctly handles the case where float to top is used
|
1163
|
+
to push imports to the top and the top comment is a multiline type but only
|
1164
|
+
one line.
|
1165
|
+
See: https://github.com/PyCQA/isort/issues/1499
|
1166
|
+
"""
|
1167
|
+
assert (
|
1168
|
+
isort.code(
|
1169
|
+
'''#!/bin/bash
|
1170
|
+
"""My comment"""
|
1171
|
+
def foo():
|
1172
|
+
pass
|
1173
|
+
|
1174
|
+
import a
|
1175
|
+
|
1176
|
+
def bar():
|
1177
|
+
pass
|
1178
|
+
''',
|
1179
|
+
float_to_top=True,
|
1180
|
+
)
|
1181
|
+
== (
|
1182
|
+
'''#!/bin/bash
|
1183
|
+
"""My comment"""
|
1184
|
+
import a
|
1185
|
+
|
1186
|
+
|
1187
|
+
def foo():
|
1188
|
+
pass
|
1189
|
+
|
1190
|
+
|
1191
|
+
def bar():
|
1192
|
+
pass
|
1193
|
+
'''
|
1194
|
+
)
|
1195
|
+
)
|
1196
|
+
assert (
|
1197
|
+
isort.code(
|
1198
|
+
"""#!/bin/bash
|
1199
|
+
'''My comment'''
|
1200
|
+
def foo():
|
1201
|
+
pass
|
1202
|
+
|
1203
|
+
import a
|
1204
|
+
|
1205
|
+
def bar():
|
1206
|
+
pass
|
1207
|
+
""",
|
1208
|
+
float_to_top=True,
|
1209
|
+
)
|
1210
|
+
== (
|
1211
|
+
"""#!/bin/bash
|
1212
|
+
'''My comment'''
|
1213
|
+
import a
|
1214
|
+
|
1215
|
+
|
1216
|
+
def foo():
|
1217
|
+
pass
|
1218
|
+
|
1219
|
+
|
1220
|
+
def bar():
|
1221
|
+
pass
|
1222
|
+
"""
|
1223
|
+
)
|
1224
|
+
)
|
1225
|
+
|
1226
|
+
assert isort.check_code(
|
1227
|
+
"""#!/bin/bash
|
1228
|
+
'''My comment'''
|
1229
|
+
import a
|
1230
|
+
|
1231
|
+
x = 1
|
1232
|
+
""",
|
1233
|
+
float_to_top=True,
|
1234
|
+
show_diff=True,
|
1235
|
+
)
|
1236
|
+
|
1237
|
+
|
1238
|
+
def test_isort_shouldnt_mangle_from_multi_line_string_issue_1507():
|
1239
|
+
"""isort was seen mangling lines that happened to contain the word from after
|
1240
|
+
a yield happened to be in a file. Clearly this shouldn't happen.
|
1241
|
+
See: https://github.com/PyCQA/isort/issues/1507.
|
1242
|
+
"""
|
1243
|
+
assert isort.check_code(
|
1244
|
+
'''
|
1245
|
+
def a():
|
1246
|
+
yield f(
|
1247
|
+
"""
|
1248
|
+
select %s from (values %%s) as t(%s)
|
1249
|
+
"""
|
1250
|
+
)
|
1251
|
+
|
1252
|
+
def b():
|
1253
|
+
return (
|
1254
|
+
"""
|
1255
|
+
select name
|
1256
|
+
from foo
|
1257
|
+
"""
|
1258
|
+
% main_table
|
1259
|
+
)
|
1260
|
+
|
1261
|
+
def c():
|
1262
|
+
query = (
|
1263
|
+
"""
|
1264
|
+
select {keys}
|
1265
|
+
from (values %s) as t(id)
|
1266
|
+
"""
|
1267
|
+
)
|
1268
|
+
|
1269
|
+
def d():
|
1270
|
+
query = f"""select t.id
|
1271
|
+
from {table} t
|
1272
|
+
{extra}"""
|
1273
|
+
''',
|
1274
|
+
show_diff=True,
|
1275
|
+
)
|
1276
|
+
|
1277
|
+
|
1278
|
+
def test_isort_should_keep_all_as_and_non_as_imports_issue_1523():
|
1279
|
+
"""isort should keep as and non-as imports of the same path that happen to exist within the
|
1280
|
+
same statement.
|
1281
|
+
See: https://github.com/PyCQA/isort/issues/1523.
|
1282
|
+
"""
|
1283
|
+
assert isort.check_code(
|
1284
|
+
"""
|
1285
|
+
from selenium.webdriver import Remote, Remote as Driver
|
1286
|
+
""",
|
1287
|
+
show_diff=True,
|
1288
|
+
combine_as_imports=True,
|
1289
|
+
)
|
1290
|
+
|
1291
|
+
|
1292
|
+
def test_isort_shouldnt_introduce_syntax_error_issue_1539():
|
1293
|
+
"""isort should NEVER introduce syntax errors.
|
1294
|
+
In 5.5.4 some strings that contained a line starting with from could lead to no empty paren.
|
1295
|
+
See: https://github.com/PyCQA/isort/issues/1539.
|
1296
|
+
"""
|
1297
|
+
assert isort.check_code(
|
1298
|
+
'''"""Foobar
|
1299
|
+
from {}""".format(
|
1300
|
+
"bar",
|
1301
|
+
)
|
1302
|
+
''',
|
1303
|
+
show_diff=True,
|
1304
|
+
)
|
1305
|
+
assert isort.check_code(
|
1306
|
+
'''"""Foobar
|
1307
|
+
import {}""".format(
|
1308
|
+
"bar",
|
1309
|
+
)
|
1310
|
+
''',
|
1311
|
+
show_diff=True,
|
1312
|
+
)
|
1313
|
+
assert (
|
1314
|
+
isort.code(
|
1315
|
+
'''"""Foobar
|
1316
|
+
from {}"""
|
1317
|
+
from a import b, a
|
1318
|
+
''',
|
1319
|
+
)
|
1320
|
+
== '''"""Foobar
|
1321
|
+
from {}"""
|
1322
|
+
from a import a, b
|
1323
|
+
'''
|
1324
|
+
)
|
1325
|
+
assert (
|
1326
|
+
isort.code(
|
1327
|
+
'''"""Foobar
|
1328
|
+
from {}"""
|
1329
|
+
import b
|
1330
|
+
import a
|
1331
|
+
''',
|
1332
|
+
)
|
1333
|
+
== '''"""Foobar
|
1334
|
+
from {}"""
|
1335
|
+
import a
|
1336
|
+
import b
|
1337
|
+
'''
|
1338
|
+
)
|
1339
|
+
|
1340
|
+
|
1341
|
+
def test_isort_shouldnt_split_skip_issue_1548():
|
1342
|
+
"""Ensure isort doesn't add a spurious new line if isort: skip is combined with float to top.
|
1343
|
+
See: https://github.com/PyCQA/isort/issues/1548.
|
1344
|
+
"""
|
1345
|
+
assert isort.check_code(
|
1346
|
+
"""from tools.dependency_pruning.prune_dependencies import ( # isort:skip
|
1347
|
+
prune_dependencies,
|
1348
|
+
)
|
1349
|
+
""",
|
1350
|
+
show_diff=True,
|
1351
|
+
profile="black",
|
1352
|
+
float_to_top=True,
|
1353
|
+
)
|
1354
|
+
assert isort.check_code(
|
1355
|
+
"""from tools.dependency_pruning.prune_dependencies import ( # isort:skip
|
1356
|
+
prune_dependencies,
|
1357
|
+
)
|
1358
|
+
import a
|
1359
|
+
import b
|
1360
|
+
""",
|
1361
|
+
show_diff=True,
|
1362
|
+
profile="black",
|
1363
|
+
float_to_top=True,
|
1364
|
+
)
|
1365
|
+
assert isort.check_code(
|
1366
|
+
"""from tools.dependency_pruning.prune_dependencies import # isort:skip
|
1367
|
+
import a
|
1368
|
+
import b
|
1369
|
+
""",
|
1370
|
+
show_diff=True,
|
1371
|
+
float_to_top=True,
|
1372
|
+
)
|
1373
|
+
assert isort.check_code(
|
1374
|
+
"""from tools.dependency_pruning.prune_dependencies import ( # isort:skip
|
1375
|
+
a
|
1376
|
+
)
|
1377
|
+
import b
|
1378
|
+
""",
|
1379
|
+
show_diff=True,
|
1380
|
+
profile="black",
|
1381
|
+
float_to_top=True,
|
1382
|
+
)
|
1383
|
+
assert isort.check_code(
|
1384
|
+
"""from tools.dependency_pruning.prune_dependencies import ( # isort:skip
|
1385
|
+
)
|
1386
|
+
""",
|
1387
|
+
show_diff=True,
|
1388
|
+
profile="black",
|
1389
|
+
float_to_top=True,
|
1390
|
+
)
|
1391
|
+
assert isort.check_code(
|
1392
|
+
"""from tools.dependency_pruning.prune_dependencies import ( # isort:skip
|
1393
|
+
)""",
|
1394
|
+
show_diff=True,
|
1395
|
+
profile="black",
|
1396
|
+
float_to_top=True,
|
1397
|
+
)
|
1398
|
+
assert (
|
1399
|
+
isort.code(
|
1400
|
+
"""from tools.dependency_pruning.prune_dependencies import ( # isort:skip
|
1401
|
+
)
|
1402
|
+
""",
|
1403
|
+
profile="black",
|
1404
|
+
float_to_top=True,
|
1405
|
+
add_imports=["import os"],
|
1406
|
+
)
|
1407
|
+
== """from tools.dependency_pruning.prune_dependencies import ( # isort:skip
|
1408
|
+
)
|
1409
|
+
import os
|
1410
|
+
"""
|
1411
|
+
)
|
1412
|
+
assert (
|
1413
|
+
isort.code(
|
1414
|
+
"""from tools.dependency_pruning.prune_dependencies import ( # isort:skip
|
1415
|
+
)""",
|
1416
|
+
profile="black",
|
1417
|
+
float_to_top=True,
|
1418
|
+
add_imports=["import os"],
|
1419
|
+
)
|
1420
|
+
== """from tools.dependency_pruning.prune_dependencies import ( # isort:skip
|
1421
|
+
)
|
1422
|
+
import os
|
1423
|
+
"""
|
1424
|
+
)
|
1425
|
+
|
1426
|
+
|
1427
|
+
def test_isort_shouldnt_split_skip_issue_1556():
|
1428
|
+
assert isort.check_code(
|
1429
|
+
"""
|
1430
|
+
from tools.dependency_pruning.prune_dependencies import ( # isort:skip
|
1431
|
+
prune_dependencies,
|
1432
|
+
)
|
1433
|
+
from tools.developer_pruning.prune_developers import ( # isort:skip
|
1434
|
+
prune_developers,
|
1435
|
+
)
|
1436
|
+
""",
|
1437
|
+
show_diff=True,
|
1438
|
+
profile="black",
|
1439
|
+
float_to_top=True,
|
1440
|
+
)
|
1441
|
+
assert isort.check_code(
|
1442
|
+
"""
|
1443
|
+
from tools.dependency_pruning.prune_dependencies import ( # isort:skip
|
1444
|
+
prune_dependencies,
|
1445
|
+
)
|
1446
|
+
from tools.developer_pruning.prune_developers import x # isort:skip
|
1447
|
+
""",
|
1448
|
+
show_diff=True,
|
1449
|
+
profile="black",
|
1450
|
+
float_to_top=True,
|
1451
|
+
)
|
1452
|
+
|
1453
|
+
|
1454
|
+
def test_isort_losing_imports_vertical_prefix_from_module_import_wrap_mode_issue_1542():
|
1455
|
+
"""Ensure isort doesnt lose imports when a comment is combined with an import and
|
1456
|
+
wrap mode VERTICAL_PREFIX_FROM_MODULE_IMPORT is used.
|
1457
|
+
See: https://github.com/PyCQA/isort/issues/1542.
|
1458
|
+
"""
|
1459
|
+
assert (
|
1460
|
+
isort.code(
|
1461
|
+
"""
|
1462
|
+
from xxxxxxxxxxxxxxxx import AAAAAAAAAA, BBBBBBBBBB
|
1463
|
+
from xxxxxxxxxxxxxxxx import CCCCCCCCC, DDDDDDDDD # xxxxxxxxxxxxxxxxxx
|
1464
|
+
|
1465
|
+
print(CCCCCCCCC)
|
1466
|
+
""",
|
1467
|
+
multi_line_output=9,
|
1468
|
+
)
|
1469
|
+
== """
|
1470
|
+
from xxxxxxxxxxxxxxxx import AAAAAAAAAA, BBBBBBBBBB # xxxxxxxxxxxxxxxxxx
|
1471
|
+
from xxxxxxxxxxxxxxxx import CCCCCCCCC, DDDDDDDDD
|
1472
|
+
|
1473
|
+
print(CCCCCCCCC)
|
1474
|
+
"""
|
1475
|
+
)
|
1476
|
+
|
1477
|
+
assert isort.check_code(
|
1478
|
+
"""
|
1479
|
+
from xxxxxxxxxxxxxxxx import AAAAAAAAAA, BBBBBBBBBB
|
1480
|
+
|
1481
|
+
from xxxxxxxxxxxxxxxx import CCCCCCCCC, DDDDDDDDD # xxxxxxxxxxxxxxxxxx isort: skip
|
1482
|
+
|
1483
|
+
print(CCCCCCCCC)
|
1484
|
+
""",
|
1485
|
+
show_diff=True,
|
1486
|
+
multi_line_output=9,
|
1487
|
+
)
|
1488
|
+
|
1489
|
+
|
1490
|
+
def test_isort_adding_second_comma_issue_1621():
|
1491
|
+
"""Ensure isort doesnt add a second comma when very long comment is present
|
1492
|
+
See: https://github.com/PyCQA/isort/issues/1621.
|
1493
|
+
"""
|
1494
|
+
assert isort.check_code(
|
1495
|
+
"""from .test import (
|
1496
|
+
TestTestTestTestTestTest2 as TestTestTestTestTestTest1, """
|
1497
|
+
"""# Some really long comment bla bla bla bla bla
|
1498
|
+
)
|
1499
|
+
""",
|
1500
|
+
profile="black",
|
1501
|
+
show_diff=True,
|
1502
|
+
)
|
1503
|
+
assert (
|
1504
|
+
isort.code(
|
1505
|
+
"""from .test import (
|
1506
|
+
TestTestTestTestTestTest2 as TestTestTestTestTestTest1 """
|
1507
|
+
"""# Some really long comment bla bla bla bla bla
|
1508
|
+
)
|
1509
|
+
""",
|
1510
|
+
profile="black",
|
1511
|
+
)
|
1512
|
+
== """from .test import (
|
1513
|
+
TestTestTestTestTestTest2 as TestTestTestTestTestTest1, """
|
1514
|
+
"""# Some really long comment bla bla bla bla bla
|
1515
|
+
)
|
1516
|
+
"""
|
1517
|
+
)
|
1518
|
+
|
1519
|
+
|
1520
|
+
def test_isort_shouldnt_duplicate_comments_issue_1631():
|
1521
|
+
assert isort.check_code(
|
1522
|
+
"""
|
1523
|
+
import a # a comment
|
1524
|
+
import a as b # b comment
|
1525
|
+
""",
|
1526
|
+
show_diff=True,
|
1527
|
+
)
|
1528
|
+
assert (
|
1529
|
+
isort.code(
|
1530
|
+
"""
|
1531
|
+
import a # a comment
|
1532
|
+
import a as a # b comment
|
1533
|
+
""",
|
1534
|
+
remove_redundant_aliases=True,
|
1535
|
+
)
|
1536
|
+
== """
|
1537
|
+
import a # a comment; b comment
|
1538
|
+
"""
|
1539
|
+
)
|
1540
|
+
|
1541
|
+
|
1542
|
+
def test_isort_shouldnt_add_extra_new_lines_with_import_heading_issue_1670():
|
1543
|
+
snippet = """#!/usr/bin/python3 -ttu
|
1544
|
+
# Standard Library
|
1545
|
+
import argparse
|
1546
|
+
import datetime
|
1547
|
+
|
1548
|
+
import attr
|
1549
|
+
import requests
|
1550
|
+
|
1551
|
+
|
1552
|
+
def foo() -> int:
|
1553
|
+
print("Hello world")
|
1554
|
+
return 0
|
1555
|
+
|
1556
|
+
|
1557
|
+
def spam():
|
1558
|
+
|
1559
|
+
|
1560
|
+
# Standard Library
|
1561
|
+
import collections
|
1562
|
+
import logging
|
1563
|
+
"""
|
1564
|
+
assert (
|
1565
|
+
isort.code(
|
1566
|
+
snippet,
|
1567
|
+
import_heading_stdlib="Standard Library",
|
1568
|
+
)
|
1569
|
+
== snippet
|
1570
|
+
)
|
1571
|
+
|
1572
|
+
|
1573
|
+
def test_isort_shouldnt_add_extra_line_float_to_top_issue_1667():
|
1574
|
+
assert isort.check_code(
|
1575
|
+
"""
|
1576
|
+
import sys
|
1577
|
+
|
1578
|
+
sys.path.insert(1, 'path/containing/something_else/..')
|
1579
|
+
|
1580
|
+
import something_else # isort:skip
|
1581
|
+
|
1582
|
+
# Some constant
|
1583
|
+
SOME_CONSTANT = 4
|
1584
|
+
""",
|
1585
|
+
show_diff=True,
|
1586
|
+
float_to_top=True,
|
1587
|
+
)
|
1588
|
+
|
1589
|
+
|
1590
|
+
def test_isort_shouldnt_move_noqa_comment_issue_1594():
|
1591
|
+
assert (
|
1592
|
+
isort.code(
|
1593
|
+
"""
|
1594
|
+
from .test import TestTestTestTestTestTest1 # noqa: F401
|
1595
|
+
from .test import TestTestTestTestTestTest2, TestTestTestTestTestTest3, """
|
1596
|
+
"""TestTestTestTestTestTest4, TestTestTestTestTestTest5 # noqa: F401
|
1597
|
+
""",
|
1598
|
+
profile="black",
|
1599
|
+
)
|
1600
|
+
== """
|
1601
|
+
from .test import TestTestTestTestTestTest1 # noqa: F401
|
1602
|
+
from .test import ( # noqa: F401
|
1603
|
+
TestTestTestTestTestTest2,
|
1604
|
+
TestTestTestTestTestTest3,
|
1605
|
+
TestTestTestTestTestTest4,
|
1606
|
+
TestTestTestTestTestTest5,
|
1607
|
+
)
|
1608
|
+
"""
|
1609
|
+
)
|
1610
|
+
|
1611
|
+
|
1612
|
+
def test_isort_correctly_handles_unix_vs_linux_newlines_issue_1566():
|
1613
|
+
import_statement = (
|
1614
|
+
"from impacket.smb3structs import (\n"
|
1615
|
+
"SMB2_CREATE, SMB2_FLAGS_DFS_OPERATIONS, SMB2_IL_IMPERSONATION, "
|
1616
|
+
"SMB2_OPLOCK_LEVEL_NONE, SMB2Create,"
|
1617
|
+
"\nSMB2Create_Response, SMB2Packet)\n"
|
1618
|
+
)
|
1619
|
+
assert isort.code(import_statement, line_length=120) == isort.code(
|
1620
|
+
import_statement.replace("\n", "\r\n"), line_length=120
|
1621
|
+
).replace("\r\n", "\n")
|
1622
|
+
|
1623
|
+
|
1624
|
+
def test_isort_treats_src_paths_same_as_from_config_as_cli_issue_1711(tmpdir):
|
1625
|
+
assert isort.check_code(
|
1626
|
+
"""
|
1627
|
+
import mymodule
|
1628
|
+
import sqlalchemy
|
1629
|
+
""",
|
1630
|
+
show_diff=True,
|
1631
|
+
)
|
1632
|
+
|
1633
|
+
config_file = tmpdir.join(".isort.cfg")
|
1634
|
+
config_file.write(
|
1635
|
+
"""
|
1636
|
+
[settings]
|
1637
|
+
src_paths=
|
1638
|
+
api
|
1639
|
+
"""
|
1640
|
+
)
|
1641
|
+
api_dir = tmpdir.mkdir("api")
|
1642
|
+
api_dir.join("mymodule.py").write("# comment")
|
1643
|
+
|
1644
|
+
config = isort.settings.Config(str(config_file))
|
1645
|
+
assert isort.check_code(
|
1646
|
+
"""
|
1647
|
+
import sqlalchemy
|
1648
|
+
|
1649
|
+
import mymodule
|
1650
|
+
""",
|
1651
|
+
show_diff=True,
|
1652
|
+
config=config,
|
1653
|
+
)
|