Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PyCQA/isort
/ functions
Functions
820 in github.com/PyCQA/isort
⨍
Functions
820
◇
Types & classes
59
↳
Endpoints
8
Function
examples_path
()
tests/unit/conftest.py:33
Method
extension
(self)
isort/io.py:33
Function
file_contents
Parses a python file taking out and categorizing imports.
isort/parse.py:77
Function
find
Finds and provides an iterator for all Python source files defined in paths.
isort/files.py:8
Function
find_imports_in_code
Finds and returns all imports within the provided code string. - **code**: The string of code with imports that need to be sorted. - **config
isort/api.py:500
Function
find_imports_in_paths
Finds and returns all imports within the provided source paths. - **paths**: A collection of paths to recursively look for imports within. -
isort/api.py:601
Function
from_string
(value: object)
isort/wrap_modes.py:12
Function
func
()
tests/unit/example_crlf_file.py:5
Function
git_hook
Git pre-commit hook to check staged files for isort errors :param bool strict - if True, return number of errors on exit, causing the hoo
isort/hooks.py:34
Function
grid
(**interface: Any)
isort/wrap_modes.py:44
Function
hanging_indent_with_parentheses
(**interface: Any)
isort/wrap_modes.py:308
Function
identify_imports_main
( argv: Sequence[str] | None = None, stdin: TextIOWrapper | None = None )
isort/main.py:912
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:52
Function
key_callback
(text: str)
isort/sorting.py:117
Method
known_patterns
(self)
isort/settings.py:617
Function
line
Returns a line wrapped to the specified line-length, if possible.
isort/wrap.py:71
Function
load
Parse TOML from a binary file object.
isort/_vendored/tomli/_parser.py:145
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:11
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:109
Function
noqa
(**interface: Any)
isort/wrap_modes.py:240
Function
parse_basic_str_escape_multiline
(src: str, pos: Pos)
isort/_vendored/tomli/_parser.py:589
Method
posix_skips
Returns a frozenset of absolute paths to skip, normalized to POSIX-style paths.
isort/settings.py:665
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:43
Method
raise_arbitrary_exception
(*args, **kwargs)
tests/unit/test_io.py:34
Function
register_type
Registers a new literal sort type.
isort/literal.py:65
Function
safe_parse_float
(float_str: str)
isort/_vendored/tomli/_parser.py:764
Method
section_comments
(self)
isort/settings.py:641
Method
section_comments_end
(self)
isort/settings.py:649
Function
section_key
(line: str, config: Config)
isort/sorting.py:55
Method
seekable
(self)
tests/unit/test_isort.py:5454
Function
setup
Register build hooks.
docs/conf.py:57
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:676
Method
skips
(self)
isort/settings.py:657
Function
sort
( config: Config, to_sort: Iterable[str], key: Callable[[str], Any] | None = None, reverse: bo
isort/sorting.py:100
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:66
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:393
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:18
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:135
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:253
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:3092
Function
test_aliases
()
tests/unit/test_identify.py:268
Function
test_all_imports_from_single_module
()
tests/unit/test_isort.py:3936
Function
test_alphabetic_sorting
Test to ensure isort correctly handles single line imports
tests/unit/test_isort.py:2564
Function
test_alphabetic_sorting_multi_line
Test to ensure isort correctly handles multiline import see: issue 364
tests/unit/test_isort.py:2589
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:2706
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:3709
Function
test_as_bool
()
tests/unit/test_settings.py:219
Function
test_as_imports_mixed
Test to ensure as imports can be mixed with non as. See issue #908
tests/unit/test_isort.py:5212
Function
test_as_imports_with_line_length
Test to ensure it's possible to combine from and as imports.
tests/unit/test_isort.py:1798
Function
test_as_list
()
tests/unit/test_settings.py:109
Function
test_ascii_art
(capsys)
tests/unit/test_main.py:92
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:28
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:2084
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:16
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:65
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:2629
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_quote_escapes_double_when_value_has_both_quotes
()
tests/unit/test_literal.py:77
Function
test_black_quote_falls_back_to_repr_for_control_chars
()
tests/unit/test_literal.py:81
Function
test_black_quote_prefers_double_quotes
()
tests/unit/test_literal.py:69
Function
test_black_quote_uses_single_when_value_has_double_quote_only
()
tests/unit/test_literal.py:73
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:48
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:92
← previous
next →
201–300 of 820, ranked by callers