MCPcopy Create free account

hub / github.com/PyCQA/isort / functions

Functions739 in github.com/PyCQA/isort

Functionimperfect
(tmpdir)
tests/benchmark/test_api.py:12
Functionimperfect
(tmpdir)
tests/unit/test_api.py:18
Functionimport_statement
Returns a multi-line wrapped form of the provided from import statement.
isort/wrap.py:10
Functionimports
Parses a python file taking out and categorizing imports.
isort/identify.py:44
Functionisort_test
Runs isort against the given code snippet and ensures that it gives consistent output across multiple runs, and if an expected_output is given
tests/unit/utils.py:20
Functionkey_callback
(text: str)
isort/sorting.py:120
Methodknown_patterns
(self)
isort/settings.py:637
Functionline
Returns a line wrapped to the specified line-length, if possible.
isort/wrap.py:71
Functionload
Parse TOML from a file object.
isort/_vendored/tomli/_parser.py:55
Functionmain
()
scripts/check_acknowledgments.py:35
Functionmodule
Returns the section placement for the given module name.
isort/place.py:16
Functionmodule_key
( module_name: str, config: Config, sub_imports: bool = False, ignore_case: bool = False,
isort/sorting.py:14
Functionnatural_plus
An even more natural sorting order for isort using natsort.
example_isort_sorting_plugin/example_isort_sorting_plugin.py:4
Functionnaturally
Returns a naturally sorted list
isort/sorting.py:112
Functionnoqa
(**interface: Any)
isort/wrap_modes.py:244
Functionparse_basic_str_escape_multiline
(src: str, pos: Pos)
isort/_vendored/tomli/_parser.py:483
Functionprocess
Parses stream identifying sections of contiguous imports and sorting them Code with unsorted imports is read from the provided `input_stream`, so
isort/core.py:32
Methodraise_arbitrary_exception
(*args, **kwargs)
tests/unit/test_io.py:34
Functionregister_type
Registers a new literal sort type.
isort/literal.py:74
Methodsection_comments
(self)
isort/settings.py:661
Methodsection_comments_end
(self)
isort/settings.py:669
Functionsection_key
(line: str, config: Config)
isort/sorting.py:58
Methodseekable
(self)
tests/unit/test_isort.py:5442
Methodsetup_class
(self)
tests/unit/test_exceptions.py:7
Methodsetup_class
(self)
tests/unit/test_exceptions.py:18
Methodsetup_class
(self)
tests/unit/test_exceptions.py:28
Methodsetup_class
(self)
tests/unit/test_exceptions.py:38
Methodsetup_class
(self)
tests/unit/test_exceptions.py:47
Methodsetup_class
(self)
tests/unit/test_exceptions.py:55
Methodsetup_class
(self)
tests/unit/test_exceptions.py:63
Methodsetup_class
(self)
tests/unit/test_exceptions.py:71
Methodsetup_class
(self)
tests/unit/test_exceptions.py:82
Methodsetup_class
(self)
tests/unit/test_exceptions.py:93
Methodsetup_class
(self)
tests/unit/test_exceptions.py:104
Methodsetup_class
(self)
tests/unit/test_exceptions.py:114
Methodsetup_class
(self)
tests/unit/test_exceptions.py:124
Methodskip_globs
(self)
isort/settings.py:685
Methodskips
(self)
isort/settings.py:677
Functionsort
( config: Config, to_sort: Iterable[str], key: Callable[[str], Any] | None = None, reverse: bo
isort/sorting.py:103
Functionsort_code_string
Sorts any imports within the provided code string, returning a new string with them sorted. - **code**: The string of code with imports that need
isort/api.py:70
Functionsort_file
Sorts and formats any groups of imports within the provided file or Path. Returns `True` if the file has been changed, otherwise `False`. -
isort/api.py:372
Functionsort_file
()
tests/benchmark/test_api.py:19
Functionsorted_imports
Adds the imports back to the file. (at the index of the first import) sorted alphabetically and split between groups
isort/output.py:17
Functionsrc_dir
()
tests/unit/conftest.py:18
Functionsrc_path
()
tests/unit/conftest.py:28
Functiontest_add_imports
Ensures adding imports works as expected.
tests/unit/test_isort.py:849
Functiontest_add_imports_shouldnt_make_isort_unusable_issue_1297
Test to ensure add imports doesn't cause any unexpected behaviour when combined with check See: https://github.com/pycqa/isort/issues/1297
tests/unit/test_regressions.py:133
Functiontest_add_imports_shouldnt_move_lower_comments_issue_1300
Ensure add_imports doesn't move comments immediately below imports. See:: https://github.com/pycqa/isort/issues/1300.
tests/unit/test_regressions.py:242
Functiontest_add_to_line
()
tests/unit/test_comments.py:7
Functiontest_alias_using_paren_issue_466
Test to ensure issue #466: Alias causes slash incorrectly is resolved
tests/unit/test_isort.py:3068
Functiontest_aliases
()
tests/unit/test_identify.py:252
Functiontest_all_imports_from_single_module
()
tests/unit/test_isort.py:3912
Functiontest_alphabetic_sorting
Test to ensure isort correctly handles single line imports
tests/unit/test_isort.py:2540
Functiontest_alphabetic_sorting_multi_line
Test to ensure isort correctly handles multiline import see: issue 364
tests/unit/test_isort.py:2565
Functiontest_alphabetic_sorting_no_newlines
Test to ensure that alphabetical sort does not erroneously introduce new lines (issue #328)
tests/unit/test_isort.py:2682
Functiontest_api_to_allow_custom_diff_and_output_stream_1583
isort should provide a way from the Python API to process an existing file and output to a stream the new version of that file, as well as a diff
tests/unit/test_ticketed_features.py:725
Functiontest_argument_parsing
()
tests/unit/test_isort.py:3685
Functiontest_as_bool
()
tests/unit/test_settings.py:217
Functiontest_as_imports_mixed
Test to ensure as imports can be mixed with non as. See issue #908
tests/unit/test_isort.py:5188
Functiontest_as_imports_with_line_length
Test to ensure it's possible to combine from and as imports.
tests/unit/test_isort.py:1774
Functiontest_as_list
()
tests/unit/test_settings.py:109
Functiontest_ascii_art
(capsys)
tests/unit/test_main.py:91
Functiontest_ask_whether_to_apply_changes_to_file
()
tests/unit/test_format.py:13
Functiontest_assignments_invalid_section
()
tests/unit/test_literal.py:26
Functiontest_atomic_mode
With atomic mode isort should be able to automatically detect and stop syntax errors
tests/unit/test_isort.py:1615
Functiontest_attrs_code_snippet_one
()
tests/unit/profiles/test_attrs.py:8
Functiontest_attrs_code_snippet_three
()
tests/unit/profiles/test_attrs.py:75
Functiontest_attrs_code_snippet_two
()
tests/unit/profiles/test_attrs.py:38
Functiontest_auto_detection
Initial test to ensure isort auto-detection works correctly - will grow over time as new issues are raised.
tests/unit/test_isort.py:2060
Functiontest_auto_saved
hypothesis_auto tests cases that have been saved to ensure they run each test cycle
tests/unit/test_wrap_modes.py:15
Functiontest_autofix_mixed_indent_imports_1575
isort should automatically fix import statements that are sent in with incorrect mixed indentation. See: https://github.com/PyCQA/isort/issues
tests/unit/test_ticketed_features.py:767
Functiontest_backslash_grid
Tests the backslash_grid grid wrap mode, ensuring it matches formatting expectations. See: https://github.com/PyCQA/isort/issues/1434
tests/unit/test_wrap_modes.py:64
Functiontest_balanced_wrapping
Tests balanced wrapping mode, where the length of individual lines maintain width.
tests/unit/test_isort.py:1562
Functiontest_basic_comment
Test to ensure a basic comment won't crash isort
tests/unit/test_isort.py:2605
Functiontest_basic_printer
(capsys)
tests/unit/test_format.py:23
Functiontest_basic_printer_diff
(capsys)
tests/unit/test_format.py:45
Functiontest_black_pyi_file
Test consistent code formatting between isort and black for `.pyi` files. black only allows no more than two consecutive blank lines in a `.pyi`
tests/unit/profiles/test_black.py:379
Functiontest_black_snippet_one
Test consistent code formatting between isort and black for code snippet from black repository. See: https://github.com/psf/black/blob/master/test
tests/unit/profiles/test_black.py:47
Functiontest_black_snippet_three
Test consistent code formatting between isort and black for code snippet from black repository. See: https://github.com/psf/black/blob/master/src/
tests/unit/profiles/test_black.py:236
Functiontest_black_snippet_two
Test consistent code formatting between isort and black for code snippet from black repository. See: https://github.com/psf/black/blob/master/test
tests/unit/profiles/test_black.py:161
Functiontest_black_trailing_comma
()
tests/unit/profiles/test_black.py:448
Functiontest_blank_lined_removed_issue_1275
Ensure isort doesn't accidentally remove blank lines after doc strings and before imports. See: https://github.com/pycqa/isort/issues/1275
tests/unit/test_regressions.py:46
Functiontest_blank_lined_removed_issue_1283
Ensure isort doesn't accidentally remove blank lines after __version__ identifiers. See: https://github.com/pycqa/isort/issues/1283
tests/unit/test_regressions.py:90
Functiontest_broken
(tmpdir)
tests/unit/test_isort.py:3799
Functiontest_cdef_support
()
tests/unit/test_isort.py:4973
Functiontest_check_file_no_changes
(capsys, tmpdir)
tests/unit/test_api.py:62
Functiontest_check_file_with_changes
(capsys, imperfect)
tests/unit/test_api.py:70
Functiontest_check_never_passes_with_indented_headings_issue_1301
Test to ensure that test can pass even when there are indented headings. See: https://github.com/pycqa/isort/issues/1301
tests/unit/test_regressions.py:277
Functiontest_check_newline_in_imports
Ensure tests works correctly when new lines are in imports.
tests/unit/test_isort.py:991
Functiontest_cimport_support
Test to ensure cimports (Cython style imports) work
tests/unit/test_isort.py:4615
Functiontest_code_intermixed
Defines what should happen when isort encounters imports intermixed with code. (it should pull them all to the top)
tests/unit/test_isort.py:83
Functiontest_code_snippet_three
()
tests/unit/profiles/test_google.py:319
Functiontest_colorama_not_available_handled_gracefully
(capsys)
tests/unit/test_format.py:105
Functiontest_colored_printer_diff
(capsys)
tests/unit/test_format.py:72
Functiontest_colored_printer_diff_output
(capsys)
tests/unit/test_format.py:92
Functiontest_colored_printer_error
(capsys)
tests/unit/test_format.py:63
Functiontest_colored_printer_success
(capsys)
tests/unit/test_format.py:54
Functiontest_combine_as_does_not_lose_comments_issue_1321
Test to ensure isort doesn't lose comments when --combine-as is used. See: https://github.com/pycqa/isort/issues/1321
tests/unit/test_regressions.py:502
Functiontest_combine_as_does_not_lose_comments_issue_1381
Test to ensure isort doesn't lose comments when --combine-as is used. See: https://github.com/pycqa/isort/issues/1381
tests/unit/test_regressions.py:530
Functiontest_combine_star_comments_above
()
tests/unit/test_isort.py:5308
← previousnext →201–300 of 739, ranked by callers