Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PyCQA/isort
/ functions
Functions
739 in github.com/PyCQA/isort
⨍
Functions
739
◇
Types & classes
57
↳
Endpoints
8
Function
imperfect
(tmpdir)
tests/benchmark/test_api.py:12
Function
imperfect
(tmpdir)
tests/unit/test_api.py:18
Function
import_statement
Returns a multi-line wrapped form of the provided from import statement.
isort/wrap.py:10
Function
imports
Parses a python file taking out and categorizing imports.
isort/identify.py:44
Function
isort_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
Function
key_callback
(text: str)
isort/sorting.py:120
Method
known_patterns
(self)
isort/settings.py:637
Function
line
Returns a line wrapped to the specified line-length, if possible.
isort/wrap.py:71
Function
load
Parse TOML from a file object.
isort/_vendored/tomli/_parser.py:55
Function
main
()
scripts/check_acknowledgments.py:35
Function
module
Returns the section placement for the given module name.
isort/place.py:16
Function
module_key
( module_name: str, config: Config, sub_imports: bool = False, ignore_case: bool = False,
isort/sorting.py:14
Function
natural_plus
An even more natural sorting order for isort using natsort.
example_isort_sorting_plugin/example_isort_sorting_plugin.py:4
Function
naturally
Returns a naturally sorted list
isort/sorting.py:112
Function
noqa
(**interface: Any)
isort/wrap_modes.py:244
Function
parse_basic_str_escape_multiline
(src: str, pos: Pos)
isort/_vendored/tomli/_parser.py:483
Function
process
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
Method
raise_arbitrary_exception
(*args, **kwargs)
tests/unit/test_io.py:34
Function
register_type
Registers a new literal sort type.
isort/literal.py:74
Method
section_comments
(self)
isort/settings.py:661
Method
section_comments_end
(self)
isort/settings.py:669
Function
section_key
(line: str, config: Config)
isort/sorting.py:58
Method
seekable
(self)
tests/unit/test_isort.py:5442
Method
setup_class
(self)
tests/unit/test_exceptions.py:7
Method
setup_class
(self)
tests/unit/test_exceptions.py:18
Method
setup_class
(self)
tests/unit/test_exceptions.py:28
Method
setup_class
(self)
tests/unit/test_exceptions.py:38
Method
setup_class
(self)
tests/unit/test_exceptions.py:47
Method
setup_class
(self)
tests/unit/test_exceptions.py:55
Method
setup_class
(self)
tests/unit/test_exceptions.py:63
Method
setup_class
(self)
tests/unit/test_exceptions.py:71
Method
setup_class
(self)
tests/unit/test_exceptions.py:82
Method
setup_class
(self)
tests/unit/test_exceptions.py:93
Method
setup_class
(self)
tests/unit/test_exceptions.py:104
Method
setup_class
(self)
tests/unit/test_exceptions.py:114
Method
setup_class
(self)
tests/unit/test_exceptions.py:124
Method
skip_globs
(self)
isort/settings.py:685
Method
skips
(self)
isort/settings.py:677
Function
sort
( config: Config, to_sort: Iterable[str], key: Callable[[str], Any] | None = None, reverse: bo
isort/sorting.py:103
Function
sort_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
Function
sort_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
Function
sort_file
()
tests/benchmark/test_api.py:19
Function
sorted_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
Function
src_dir
()
tests/unit/conftest.py:18
Function
src_path
()
tests/unit/conftest.py:28
Function
test_add_imports
Ensures adding imports works as expected.
tests/unit/test_isort.py:849
Function
test_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
Function
test_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
Function
test_add_to_line
()
tests/unit/test_comments.py:7
Function
test_alias_using_paren_issue_466
Test to ensure issue #466: Alias causes slash incorrectly is resolved
tests/unit/test_isort.py:3068
Function
test_aliases
()
tests/unit/test_identify.py:252
Function
test_all_imports_from_single_module
()
tests/unit/test_isort.py:3912
Function
test_alphabetic_sorting
Test to ensure isort correctly handles single line imports
tests/unit/test_isort.py:2540
Function
test_alphabetic_sorting_multi_line
Test to ensure isort correctly handles multiline import see: issue 364
tests/unit/test_isort.py:2565
Function
test_alphabetic_sorting_no_newlines
Test to ensure that alphabetical sort does not erroneously introduce new lines (issue #328)
tests/unit/test_isort.py:2682
Function
test_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
Function
test_argument_parsing
()
tests/unit/test_isort.py:3685
Function
test_as_bool
()
tests/unit/test_settings.py:217
Function
test_as_imports_mixed
Test to ensure as imports can be mixed with non as. See issue #908
tests/unit/test_isort.py:5188
Function
test_as_imports_with_line_length
Test to ensure it's possible to combine from and as imports.
tests/unit/test_isort.py:1774
Function
test_as_list
()
tests/unit/test_settings.py:109
Function
test_ascii_art
(capsys)
tests/unit/test_main.py:91
Function
test_ask_whether_to_apply_changes_to_file
()
tests/unit/test_format.py:13
Function
test_assignments_invalid_section
()
tests/unit/test_literal.py:26
Function
test_atomic_mode
With atomic mode isort should be able to automatically detect and stop syntax errors
tests/unit/test_isort.py:1615
Function
test_attrs_code_snippet_one
()
tests/unit/profiles/test_attrs.py:8
Function
test_attrs_code_snippet_three
()
tests/unit/profiles/test_attrs.py:75
Function
test_attrs_code_snippet_two
()
tests/unit/profiles/test_attrs.py:38
Function
test_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
Function
test_auto_saved
hypothesis_auto tests cases that have been saved to ensure they run each test cycle
tests/unit/test_wrap_modes.py:15
Function
test_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
Function
test_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
Function
test_balanced_wrapping
Tests balanced wrapping mode, where the length of individual lines maintain width.
tests/unit/test_isort.py:1562
Function
test_basic_comment
Test to ensure a basic comment won't crash isort
tests/unit/test_isort.py:2605
Function
test_basic_printer
(capsys)
tests/unit/test_format.py:23
Function
test_basic_printer_diff
(capsys)
tests/unit/test_format.py:45
Function
test_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
Function
test_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
Function
test_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
Function
test_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
Function
test_black_trailing_comma
()
tests/unit/profiles/test_black.py:448
Function
test_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
Function
test_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
Function
test_broken
(tmpdir)
tests/unit/test_isort.py:3799
Function
test_cdef_support
()
tests/unit/test_isort.py:4973
Function
test_check_file_no_changes
(capsys, tmpdir)
tests/unit/test_api.py:62
Function
test_check_file_with_changes
(capsys, imperfect)
tests/unit/test_api.py:70
Function
test_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
Function
test_check_newline_in_imports
Ensure tests works correctly when new lines are in imports.
tests/unit/test_isort.py:991
Function
test_cimport_support
Test to ensure cimports (Cython style imports) work
tests/unit/test_isort.py:4615
Function
test_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
Function
test_code_snippet_three
()
tests/unit/profiles/test_google.py:319
Function
test_colorama_not_available_handled_gracefully
(capsys)
tests/unit/test_format.py:105
Function
test_colored_printer_diff
(capsys)
tests/unit/test_format.py:72
Function
test_colored_printer_diff_output
(capsys)
tests/unit/test_format.py:92
Function
test_colored_printer_error
(capsys)
tests/unit/test_format.py:63
Function
test_colored_printer_success
(capsys)
tests/unit/test_format.py:54
Function
test_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
Function
test_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
Function
test_combine_star_comments_above
()
tests/unit/test_isort.py:5308
← previous
next →
201–300 of 739, ranked by callers