MCPcopy Create free account

hub / github.com/PyCQA/isort / functions

Functions820 in github.com/PyCQA/isort

Functionexamples_path
()
tests/unit/conftest.py:33
Methodextension
(self)
isort/io.py:33
Functionfile_contents
Parses a python file taking out and categorizing imports.
isort/parse.py:77
Functionfind
Finds and provides an iterator for all Python source files defined in paths.
isort/files.py:8
Functionfind_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
Functionfind_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
Functionfrom_string
(value: object)
isort/wrap_modes.py:12
Functionfunc
()
tests/unit/example_crlf_file.py:5
Functiongit_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
Functiongrid
(**interface: Any)
isort/wrap_modes.py:44
Functionhanging_indent_with_parentheses
(**interface: Any)
isort/wrap_modes.py:308
Functionidentify_imports_main
( argv: Sequence[str] | None = None, stdin: TextIOWrapper | None = None )
isort/main.py:912
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:52
Functionkey_callback
(text: str)
isort/sorting.py:117
Methodknown_patterns
(self)
isort/settings.py:617
Functionline
Returns a line wrapped to the specified line-length, if possible.
isort/wrap.py:71
Functionload
Parse TOML from a binary file object.
isort/_vendored/tomli/_parser.py:145
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:11
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:109
Functionnoqa
(**interface: Any)
isort/wrap_modes.py:240
Functionparse_basic_str_escape_multiline
(src: str, pos: Pos)
isort/_vendored/tomli/_parser.py:589
Methodposix_skips
Returns a frozenset of absolute paths to skip, normalized to POSIX-style paths.
isort/settings.py:665
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:43
Methodraise_arbitrary_exception
(*args, **kwargs)
tests/unit/test_io.py:34
Functionregister_type
Registers a new literal sort type.
isort/literal.py:65
Functionsafe_parse_float
(float_str: str)
isort/_vendored/tomli/_parser.py:764
Methodsection_comments
(self)
isort/settings.py:641
Methodsection_comments_end
(self)
isort/settings.py:649
Functionsection_key
(line: str, config: Config)
isort/sorting.py:55
Methodseekable
(self)
tests/unit/test_isort.py:5454
Functionsetup
Register build hooks.
docs/conf.py:57
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:676
Methodskips
(self)
isort/settings.py:657
Functionsort
( config: Config, to_sort: Iterable[str], key: Callable[[str], Any] | None = None, reverse: bo
isort/sorting.py:100
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:66
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:393
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:18
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:135
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:253
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:3092
Functiontest_aliases
()
tests/unit/test_identify.py:268
Functiontest_all_imports_from_single_module
()
tests/unit/test_isort.py:3936
Functiontest_alphabetic_sorting
Test to ensure isort correctly handles single line imports
tests/unit/test_isort.py:2564
Functiontest_alphabetic_sorting_multi_line
Test to ensure isort correctly handles multiline import see: issue 364
tests/unit/test_isort.py:2589
Functiontest_alphabetic_sorting_no_newlines
Test to ensure that alphabetical sort does not erroneously introduce new lines (issue #328)
tests/unit/test_isort.py:2706
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:3709
Functiontest_as_bool
()
tests/unit/test_settings.py:219
Functiontest_as_imports_mixed
Test to ensure as imports can be mixed with non as. See issue #908
tests/unit/test_isort.py:5212
Functiontest_as_imports_with_line_length
Test to ensure it's possible to combine from and as imports.
tests/unit/test_isort.py:1798
Functiontest_as_list
()
tests/unit/test_settings.py:109
Functiontest_ascii_art
(capsys)
tests/unit/test_main.py:92
Functiontest_ask_whether_to_apply_changes_to_file
()
tests/unit/test_format.py:13
Functiontest_assignments_invalid_section
()
tests/unit/test_literal.py:28
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:2084
Functiontest_auto_saved
hypothesis_auto tests cases that have been saved to ensure they run each test cycle
tests/unit/test_wrap_modes.py:16
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:65
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:2629
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_quote_escapes_double_when_value_has_both_quotes
()
tests/unit/test_literal.py:77
Functiontest_black_quote_falls_back_to_repr_for_control_chars
()
tests/unit/test_literal.py:81
Functiontest_black_quote_prefers_double_quotes
()
tests/unit/test_literal.py:69
Functiontest_black_quote_uses_single_when_value_has_double_quote_only
()
tests/unit/test_literal.py:73
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:48
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:92
← previousnext →201–300 of 820, ranked by callers