MCPcopy Create free account

hub / github.com/PyCQA/isort / functions

Functions739 in github.com/PyCQA/isort

↓ 41 callersMethodwrite
(self, *args: Any, **kwargs: Any)
isort/io.py:69
↓ 27 callersMethodread
(filename: str | Path)
isort/io.py:57
↓ 14 callersMethod__init__
(self, message: str, file_path: str)
isort/exceptions.py:53
↓ 13 callersFunctionsuffixed_err
Return a `TOMLDecodeError` where error message is suffixed with coordinates in source.
isort/_vendored/tomli/_parser.py:632
↓ 12 callersMethodseek
(self, *args, **kwargs)
tests/unit/utils.py:7
↓ 10 callersFunctiongit_clone
Clones the given repository into the given directory path
tests/integration/test_projects_using_isort.py:21
↓ 10 callersFunctionrun_isort
Runs isort in diff and check mode with the given arguments
tests/integration/test_projects_using_isort.py:26
↓ 9 callersFunctionskip_chars
(src: str, pos: Pos, chars: Iterable[str])
isort/_vendored/tomli/_parser.py:232
↓ 8 callersMethodis_supported_filetype
(self, file_name: str)
isort/settings.py:517
↓ 7 callersFunction_config
( path: Path | None = None, config: Config = DEFAULT_CONFIG, **config_kwargs: Any )
isort/api.py:641
↓ 6 callersFunctionimports_in_code
(code: str, **kwargs)
tests/unit/test_identify.py:7
↓ 5 callersFunctionas_stream
(text: str)
tests/unit/utils.py:16
↓ 5 callersFunctionblack_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 callersMethoderror
(self, message: str)
isort/format.py:107
↓ 5 callersFunctionexists_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 callersFunctionmain
(argv: Sequence[str] | None = None, stdin: TextIOWrapper | None = None)
isort/main.py:1058
↓ 5 callersMethodsearch
Returns the closest config relative to filename by doing a depth first search on the prefix tree.
isort/utils.py:39
↓ 4 callersFunctioncreate_terminal_printer
( color: bool, output: TextIO | None = None, error: str = "", success: str = "" )
isort/format.py:140
↓ 4 callersMethoddiff_line
(self, line: str)
isort/format.py:110
↓ 4 callersMethodget_or_create_nest
( self, key: Key, *, access_lists: bool = True, )
isort/_vendored/tomli/_parser.py:198
↓ 4 callersMethodinsert
(self, config_file: str, config_data: dict[str, Any])
isort/utils.py:26
↓ 4 callersMethodis_
(self, key: Key, flag: int)
isort/_vendored/tomli/_parser.py:175
↓ 4 callersMethodis_skipped
Returns True if the file and/or folder should be skipped based on current settings.
isort/settings.py:579
↓ 4 callersMethodset
(self, key: Key, flag: int, *, recursive: bool)
isort/_vendored/tomli/_parser.py:164
↓ 3 callersFunction_get_config_data
(file_path: str, sections: tuple[str, ...])
isort/settings.py:819
↓ 3 callersFunctionparse_args
(argv: Sequence[str] | None = None)
isort/main.py:922
↓ 3 callersFunctionparse_key
(src: str, pos: Pos)
isort/_vendored/tomli/_parser.py:357
↓ 3 callersFunctionshow_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 callersFunctionskip_until
( src: str, pos: Pos, expect: str, *, error_on: FrozenSet[str], error_on_eof: bool, )
isort/_vendored/tomli/_parser.py:241
↓ 3 callersFunctionsort_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 callersMethodsuccess
(self, message: str)
isort/format.py:104
↓ 2 callersFunction_build_arg_parser
()
isort/main.py:136
↓ 2 callersFunction_is_package
(path: Path)
isort/place.py:110
↓ 2 callersMethod_open
Open a file in read only mode using the encoding detected by detect_encoding().
isort/io.py:40
↓ 2 callersFunction_tmp_file
(source_file: File)
isort/api.py:352
↓ 2 callersFunction_vertical_grid_common
(need_trailing_char: bool, **interface: Any)
isort/wrap_modes.py:186
↓ 2 callersFunction_write_simple_settings
(tmp_file)
tests/unit/test_settings.py:114
↓ 2 callersFunctioncheck_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 callersMethoddetect_encoding
(filename: str | Path, readline: Callable[[], bytes])
isort/io.py:24
↓ 2 callersFunctionentry_points
Call entry_point after lazy loading it. TODO: The reason for lazy loading here are unknown.
isort/settings.py:922
↓ 2 callersFunctionfind_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 callersFunctionget_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 callersFunctionnormalize_line
Normalizes import related statements in the provided line. Returns (normalized_line: str, raw_line: str)
isort/parse.py:39
↓ 2 callersFunctionparse_basic_str
(src: str, pos: Pos, *, multiline: bool)
isort/_vendored/tomli/_parser.py:536
↓ 2 callersFunctionparse_key_value_pair
(src: str, pos: Pos, parse_float: ParseFloat)
isort/_vendored/tomli/_parser.py:343
↓ 2 callersFunctionparse_literal_str
(src: str, pos: Pos)
isort/_vendored/tomli/_parser.py:498
↓ 2 callersFunctionparse_one_line_basic_str
(src: str, pos: Pos)
isort/_vendored/tomli/_parser.py:391
↓ 2 callersFunctionparse_value
(src: str, pos: Pos, parse_float: ParseFloat)
isort/_vendored/tomli/_parser.py:568
↓ 2 callersFunctionskip_comment
(src: str, pos: Pos)
isort/_vendored/tomli/_parser.py:263
↓ 2 callersFunctionskip_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 callersMethodstatement
(self)
isort/identify.py:27
↓ 2 callersFunctionstrip_syntax
(import_string: str)
isort/parse.py:66
↓ 2 callersMethodstyle_text
(text: str, style: str | None = None)
isort/format.py:126
↓ 1 callersMethod__init__
(self, error: str, success: str, output: TextIO | None = None)
isort/format.py:99
↓ 1 callersFunction_abspaths
(cwd: str, values: Iterable[str])
isort/settings.py:741
↓ 1 callersFunction_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 callersFunction_as_list
(value: str)
isort/settings.py:734
↓ 1 callersFunction_atoi
(text: str)
isort/sorting.py:126
↓ 1 callersMethod_check_folder_git_ls_files
(self, folder: str)
isort/settings.py:542
↓ 1 callersFunction_ensure_newline_before_comment
(output: list[str])
isort/output.py:672
↓ 1 callersFunction_file_output_stream_context
(filename: str | Path, source_file: File)
isort/api.py:362
↓ 1 callersFunction_find_config
(path: str)
isort/settings.py:753
↓ 1 callersFunction_forced_separate
(name: str, config: Config)
isort/place.py:33
↓ 1 callersMethod_format_option
(name: str, value: Any, source: str)
isort/exceptions.py:163
↓ 1 callersFunction_get_str_to_type_converter
(setting_name: str)
isort/settings.py:727
↓ 1 callersFunction_hanging_indent_end_line
(line: str)
isort/wrap_modes.py:111
↓ 1 callersFunction_has_changed
(before: str, after: str, line_separator: str, ignore_whitespace: bool)
isort/core.py:510
↓ 1 callersFunction_in_memory_output_stream_context
()
isort/api.py:357
↓ 1 callersFunction_indented_config
(config: Config, indent: str)
isort/core.py:496
↓ 1 callersFunction_infer_line_separator
(contents: str)
isort/parse.py:31
↓ 1 callersFunction_is_module
(path: Path)
isort/place.py:99
↓ 1 callersFunction_is_namespace_package
(path: Path, src_extensions: frozenset[str])
isort/place.py:114
↓ 1 callersFunction_known_pattern
(name: str, config: Config)
isort/place.py:53
↓ 1 callersFunction_local
(name: str, config: Config)
isort/place.py:46
↓ 1 callersFunction_natural_keys
(text: str)
isort/sorting.py:130
↓ 1 callersFunction_normalize_empty_lines
(lines: list[str])
isort/output.py:653
↓ 1 callersFunction_output_as_string
(lines: list[str], line_separator: str)
isort/output.py:649
↓ 1 callersMethod_parse_known_pattern
Expand pattern if identified as a directory and return found sub packages
isort/settings.py:713
↓ 1 callersFunction_print_hard_fail
Fail on unrecoverable exception with custom message.
isort/main.py:121
↓ 1 callersFunction_record_targets
(code: str, prefix: str = "")
tests/integration/test_hypothesmith.py:22
↓ 1 callersFunction_src_path
( name: str, config: Config, src_paths: Iterable[Path] | None = None, prefix: tuple[str, ...]
isort/place.py:64
↓ 1 callersFunction_src_path_is_module
(src_path: Path, module_name: str)
isort/place.py:143
↓ 1 callersFunction_user_info
(user: dict[str, str], verbose=False)
scripts/check_acknowledgments.py:23
↓ 1 callersFunction_with_from_imports
( parsed: parse.ParsedContent, config: Config, from_modules: Iterable[str], section: str,
isort/output.py:250
↓ 1 callersFunction_with_star_comments
(parsed: parse.ParsedContent, module: str, comments: list[str])
isort/output.py:685
↓ 1 callersFunction_with_straight_imports
( parsed: parse.ParsedContent, config: Config, straight_modules: Iterable[str], section: str,
isort/output.py:575
↓ 1 callersMethodappend_nest_to_list
(self, key: Key)
isort/_vendored/tomli/_parser.py:215
↓ 1 callersFunctionask_whether_to_apply_changes_to_file
(file_path: str)
isort/format.py:76
↓ 1 callersFunctionassignments
(code: str)
isort/literal.py:24
↓ 1 callersFunctionblack_format
Formats the provided code snippet using black
tests/unit/profiles/test_black.py:7
↓ 1 callersFunctionbuild_input_content
()
tests/unit/test_main.py:375
↓ 1 callersFunctioncached_tz
(hour_str: str, minute_str: str, sign_str: str)
isort/_vendored/tomli/_re.py:81
↓ 1 callersFunctionconfig_default
(default: Any)
scripts/build_config_option_docs.py:347
↓ 1 callersFunctionconfig_options
()
scripts/build_config_option_docs.py:368
↓ 1 callersFunctionconfigs
Generate arbitrary Config objects.
tests/integration/test_hypothesmith.py:36
↓ 1 callersFunctionconfigs
Generate arbitrary Config objects.
tests/integration/test_setting_combinations.py:20
↓ 1 callersFunctioncoord_repr
(src: str, pos: Pos)
isort/_vendored/tomli/_parser.py:636
↓ 1 callersFunctioncreate_dict_rule
(src: str, pos: Pos, out: Output)
isort/_vendored/tomli/_parser.py:282
↓ 1 callersFunctioncreate_list_rule
(src: str, pos: Pos, out: Output)
isort/_vendored/tomli/_parser.py:300
↓ 1 callersFunctiondocument_text
()
scripts/build_profile_docs.py:32
next →1–100 of 739, ranked by callers