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
↓ 41 callers
Method
write
(self, *args: Any, **kwargs: Any)
isort/io.py:69
↓ 27 callers
Method
read
(filename: str | Path)
isort/io.py:57
↓ 14 callers
Method
__init__
(self, message: str, file_path: str)
isort/exceptions.py:53
↓ 13 callers
Function
suffixed_err
Return a `TOMLDecodeError` where error message is suffixed with coordinates in source.
isort/_vendored/tomli/_parser.py:632
↓ 12 callers
Method
seek
(self, *args, **kwargs)
tests/unit/utils.py:7
↓ 10 callers
Function
git_clone
Clones the given repository into the given directory path
tests/integration/test_projects_using_isort.py:21
↓ 10 callers
Function
run_isort
Runs isort in diff and check mode with the given arguments
tests/integration/test_projects_using_isort.py:26
↓ 9 callers
Function
skip_chars
(src: str, pos: Pos, chars: Iterable[str])
isort/_vendored/tomli/_parser.py:232
↓ 8 callers
Method
is_supported_filetype
(self, file_name: str)
isort/settings.py:517
↓ 7 callers
Function
_config
( path: Path | None = None, config: Config = DEFAULT_CONFIG, **config_kwargs: Any )
isort/api.py:641
↓ 6 callers
Function
imports_in_code
(code: str, **kwargs)
tests/unit/test_identify.py:7
↓ 5 callers
Function
as_stream
(text: str)
tests/unit/utils.py:16
↓ 5 callers
Function
black_test
Tests that the given code: - Behaves the same when formatted multiple times with isort. - Agrees with black formatting. - Matches the desi
tests/unit/profiles/test_black.py:22
↓ 5 callers
Method
error
(self, message: str)
isort/format.py:107
↓ 5 callers
Function
exists_case_sensitive
Returns if the given path exists and also matches the case on Windows. When finding files that can be imported, it is important for the cases to
isort/utils.py:63
↓ 5 callers
Function
main
(argv: Sequence[str] | None = None, stdin: TextIOWrapper | None = None)
isort/main.py:1058
↓ 5 callers
Method
search
Returns the closest config relative to filename by doing a depth first search on the prefix tree.
isort/utils.py:39
↓ 4 callers
Function
create_terminal_printer
( color: bool, output: TextIO | None = None, error: str = "", success: str = "" )
isort/format.py:140
↓ 4 callers
Method
diff_line
(self, line: str)
isort/format.py:110
↓ 4 callers
Method
get_or_create_nest
( self, key: Key, *, access_lists: bool = True, )
isort/_vendored/tomli/_parser.py:198
↓ 4 callers
Method
insert
(self, config_file: str, config_data: dict[str, Any])
isort/utils.py:26
↓ 4 callers
Method
is_
(self, key: Key, flag: int)
isort/_vendored/tomli/_parser.py:175
↓ 4 callers
Method
is_skipped
Returns True if the file and/or folder should be skipped based on current settings.
isort/settings.py:579
↓ 4 callers
Method
set
(self, key: Key, flag: int, *, recursive: bool)
isort/_vendored/tomli/_parser.py:164
↓ 3 callers
Function
_get_config_data
(file_path: str, sections: tuple[str, ...])
isort/settings.py:819
↓ 3 callers
Function
parse_args
(argv: Sequence[str] | None = None)
isort/main.py:922
↓ 3 callers
Function
parse_key
(src: str, pos: Pos)
isort/_vendored/tomli/_parser.py:357
↓ 3 callers
Function
show_unified_diff
Shows a unified_diff for the provided input and output against the provided file path. - **file_input**: A string that represents the contents of
isort/format.py:43
↓ 3 callers
Function
skip_until
( src: str, pos: Pos, expect: str, *, error_on: FrozenSet[str], error_on_eof: bool, )
isort/_vendored/tomli/_parser.py:241
↓ 3 callers
Function
sort_stream
Sorts any imports within the provided code stream, outputs to the provided output stream. Returns `True` if anything is modified from the origina
isort/api.py:138
↓ 3 callers
Method
success
(self, message: str)
isort/format.py:104
↓ 2 callers
Function
_build_arg_parser
()
isort/main.py:136
↓ 2 callers
Function
_is_package
(path: Path)
isort/place.py:110
↓ 2 callers
Method
_open
Open a file in read only mode using the encoding detected by detect_encoding().
isort/io.py:40
↓ 2 callers
Function
_tmp_file
(source_file: File)
isort/api.py:352
↓ 2 callers
Function
_vertical_grid_common
(need_trailing_char: bool, **interface: Any)
isort/wrap_modes.py:186
↓ 2 callers
Function
_write_simple_settings
(tmp_file)
tests/unit/test_settings.py:114
↓ 2 callers
Function
check_stream
Checks any imports within the provided code stream, returning `False` if any unsorted or incorrectly imports are found or `True` if no problems ar
isort/api.py:241
↓ 2 callers
Method
detect_encoding
(filename: str | Path, readline: Callable[[], bytes])
isort/io.py:24
↓ 2 callers
Function
entry_points
Call entry_point after lazy loading it. TODO: The reason for lazy loading here are unknown.
isort/settings.py:922
↓ 2 callers
Function
find_imports_in_stream
Finds and returns all imports within the provided code stream. - **input_stream**: The stream of code with imports that need to be sorted. -
isort/api.py:537
↓ 2 callers
Function
get_output
Run a command and return raw output :param str command: the command to run :returns: the stdout output of the command
isort/hooks.py:14
↓ 2 callers
Function
normalize_line
Normalizes import related statements in the provided line. Returns (normalized_line: str, raw_line: str)
isort/parse.py:39
↓ 2 callers
Function
parse_basic_str
(src: str, pos: Pos, *, multiline: bool)
isort/_vendored/tomli/_parser.py:536
↓ 2 callers
Function
parse_key_value_pair
(src: str, pos: Pos, parse_float: ParseFloat)
isort/_vendored/tomli/_parser.py:343
↓ 2 callers
Function
parse_literal_str
(src: str, pos: Pos)
isort/_vendored/tomli/_parser.py:498
↓ 2 callers
Function
parse_one_line_basic_str
(src: str, pos: Pos)
isort/_vendored/tomli/_parser.py:391
↓ 2 callers
Function
parse_value
(src: str, pos: Pos, parse_float: ParseFloat)
isort/_vendored/tomli/_parser.py:568
↓ 2 callers
Function
skip_comment
(src: str, pos: Pos)
isort/_vendored/tomli/_parser.py:263
↓ 2 callers
Function
skip_line
Determine if a given line should be skipped. Returns back a tuple containing: (skip_line: bool, in_quote: str,)
isort/parse.py:81
↓ 2 callers
Method
statement
(self)
isort/identify.py:27
↓ 2 callers
Function
strip_syntax
(import_string: str)
isort/parse.py:66
↓ 2 callers
Method
style_text
(text: str, style: str | None = None)
isort/format.py:126
↓ 1 callers
Method
__init__
(self, error: str, success: str, output: TextIO | None = None)
isort/format.py:99
↓ 1 callers
Function
_abspaths
(cwd: str, values: Iterable[str])
isort/settings.py:741
↓ 1 callers
Function
_as_bool
Given a string value that represents True or False, returns the Boolean equivalent. Heavily inspired from distutils strtobool.
isort/settings.py:912
↓ 1 callers
Function
_as_list
(value: str)
isort/settings.py:734
↓ 1 callers
Function
_atoi
(text: str)
isort/sorting.py:126
↓ 1 callers
Method
_check_folder_git_ls_files
(self, folder: str)
isort/settings.py:542
↓ 1 callers
Function
_ensure_newline_before_comment
(output: list[str])
isort/output.py:672
↓ 1 callers
Function
_file_output_stream_context
(filename: str | Path, source_file: File)
isort/api.py:362
↓ 1 callers
Function
_find_config
(path: str)
isort/settings.py:753
↓ 1 callers
Function
_forced_separate
(name: str, config: Config)
isort/place.py:33
↓ 1 callers
Method
_format_option
(name: str, value: Any, source: str)
isort/exceptions.py:163
↓ 1 callers
Function
_get_str_to_type_converter
(setting_name: str)
isort/settings.py:727
↓ 1 callers
Function
_hanging_indent_end_line
(line: str)
isort/wrap_modes.py:111
↓ 1 callers
Function
_has_changed
(before: str, after: str, line_separator: str, ignore_whitespace: bool)
isort/core.py:510
↓ 1 callers
Function
_in_memory_output_stream_context
()
isort/api.py:357
↓ 1 callers
Function
_indented_config
(config: Config, indent: str)
isort/core.py:496
↓ 1 callers
Function
_infer_line_separator
(contents: str)
isort/parse.py:31
↓ 1 callers
Function
_is_module
(path: Path)
isort/place.py:99
↓ 1 callers
Function
_is_namespace_package
(path: Path, src_extensions: frozenset[str])
isort/place.py:114
↓ 1 callers
Function
_known_pattern
(name: str, config: Config)
isort/place.py:53
↓ 1 callers
Function
_local
(name: str, config: Config)
isort/place.py:46
↓ 1 callers
Function
_natural_keys
(text: str)
isort/sorting.py:130
↓ 1 callers
Function
_normalize_empty_lines
(lines: list[str])
isort/output.py:653
↓ 1 callers
Function
_output_as_string
(lines: list[str], line_separator: str)
isort/output.py:649
↓ 1 callers
Method
_parse_known_pattern
Expand pattern if identified as a directory and return found sub packages
isort/settings.py:713
↓ 1 callers
Function
_print_hard_fail
Fail on unrecoverable exception with custom message.
isort/main.py:121
↓ 1 callers
Function
_record_targets
(code: str, prefix: str = "")
tests/integration/test_hypothesmith.py:22
↓ 1 callers
Function
_src_path
( name: str, config: Config, src_paths: Iterable[Path] | None = None, prefix: tuple[str, ...]
isort/place.py:64
↓ 1 callers
Function
_src_path_is_module
(src_path: Path, module_name: str)
isort/place.py:143
↓ 1 callers
Function
_user_info
(user: dict[str, str], verbose=False)
scripts/check_acknowledgments.py:23
↓ 1 callers
Function
_with_from_imports
( parsed: parse.ParsedContent, config: Config, from_modules: Iterable[str], section: str,
isort/output.py:250
↓ 1 callers
Function
_with_star_comments
(parsed: parse.ParsedContent, module: str, comments: list[str])
isort/output.py:685
↓ 1 callers
Function
_with_straight_imports
( parsed: parse.ParsedContent, config: Config, straight_modules: Iterable[str], section: str,
isort/output.py:575
↓ 1 callers
Method
append_nest_to_list
(self, key: Key)
isort/_vendored/tomli/_parser.py:215
↓ 1 callers
Function
ask_whether_to_apply_changes_to_file
(file_path: str)
isort/format.py:76
↓ 1 callers
Function
assignments
(code: str)
isort/literal.py:24
↓ 1 callers
Function
black_format
Formats the provided code snippet using black
tests/unit/profiles/test_black.py:7
↓ 1 callers
Function
build_input_content
()
tests/unit/test_main.py:375
↓ 1 callers
Function
cached_tz
(hour_str: str, minute_str: str, sign_str: str)
isort/_vendored/tomli/_re.py:81
↓ 1 callers
Function
config_default
(default: Any)
scripts/build_config_option_docs.py:347
↓ 1 callers
Function
config_options
()
scripts/build_config_option_docs.py:368
↓ 1 callers
Function
configs
Generate arbitrary Config objects.
tests/integration/test_hypothesmith.py:36
↓ 1 callers
Function
configs
Generate arbitrary Config objects.
tests/integration/test_setting_combinations.py:20
↓ 1 callers
Function
coord_repr
(src: str, pos: Pos)
isort/_vendored/tomli/_parser.py:636
↓ 1 callers
Function
create_dict_rule
(src: str, pos: Pos, out: Output)
isort/_vendored/tomli/_parser.py:282
↓ 1 callers
Function
create_list_rule
(src: str, pos: Pos, out: Output)
isort/_vendored/tomli/_parser.py:300
↓ 1 callers
Function
document_text
()
scripts/build_profile_docs.py:32
next →
1–100 of 739, ranked by callers