Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Providing path to an external isort is breaking formatting #54

Closed
den-is opened this issue May 31, 2022 · 0 comments · Fixed by #57
Closed

Providing path to an external isort is breaking formatting #54

den-is opened this issue May 31, 2022 · 0 comments · Fixed by #57
Labels
bug Issue identified by VS Code Team member as probable bug needs investigation

Comments

@den-is
Copy link

den-is commented May 31, 2022

To mitigate formatting issues that I have reported in #53 I was trying to use adequate, default, known, healthy, community-supported isort.

VScode settings:

"isort.path": ["/usr/local/bin/isort"],
"isort.args": [
    "--profile",
    "black",
    "--line-length",
    "99",
    "--skip-gitignore"
],

Output errors that I get. isort somehow dublicates arguments and passing the stuff:

/usr/local/bin/isort --profile black --line-length 99 --skip-gitignore --check --filename /Users/den/work/sky/projects/webapi/browser.py -
CWD Formatter: /Users/den/work/sky/projects
/usr/local/bin/isort --profile black --line-length 99 --skip-gitignore --check --filename /Users/den/work/sky/projects/webapi/browser.py - --profile black --line-length 99 --skip-gitignore --filename /Users/den/work/sky/projects/webapi/browser.py -
CWD Formatter: /Users/den/work/sky/projects
[Error - 1:56:05 PM] usage: isort [-h] [-V] [--vn] [-v] [--only-modified] [--dedup-headings] [-q]
             [-d] [--overwrite-in-place] [--show-config] [--show-files] [--df]
             [-c] [--ws] [--sp SETTINGS_PATH] [--cr CONFIG_ROOT]
             [--resolve-all-configs] [--profile PROFILE] [--old-finders]
             [-j [JOBS]] [--ac] [--interactive] [--format-error FORMAT_ERROR]
             [--format-success FORMAT_SUCCESS] [--filter-files] [-s SKIP]
             [--extend-skip EXTEND_SKIP] [--sg SKIP_GLOB]
             [--extend-skip-glob EXTEND_SKIP_GLOB] [--gitignore]
             [--ext SUPPORTED_EXTENSIONS]
             [--blocked-extension BLOCKED_EXTENSIONS] [--dont-follow-links]
             [--filename FILENAME] [--allow-root] [-a ADD_IMPORTS] [--append]
             [--af] [--rm REMOVE_IMPORTS] [--float-to-top]
             [--dont-float-to-top] [--ca] [--cs] [-e] [--ff]
             [--fgw [FORCE_GRID_WRAP]] [-i INDENT]
             [--lbi LINES_BEFORE_IMPORTS] [--lai LINES_AFTER_IMPORTS]
             [--lbt LINES_BETWEEN_TYPES] [--le LINE_ENDING] [--ls] [--lss]
             [-m {GRID,VERTICAL,HANGING_INDENT,VERTICAL_HANGING_INDENT,VERTICAL_GRID,VERTICAL_GRID_GROUPED,VERTICAL_GRID_GROUPED_NO_COMMA,NOQA,VERTICAL_HANGING_INDENT_BRACKET,VERTICAL_PREFIX_FROM_MODULE_IMPORT,HANGING_INDENT_WITH_PARENTHESES,BACKSLASH_GRID,0,1,2,3,4,5,6,7,8,9,10,11}]
             [-n] [--nis] [--ot] [--dt] [--rr] [--reverse-sort]
             [--sort-order SORT_ORDER] [--sl] [--nsl SINGLE_LINE_EXCLUSIONS]
             [--tc] [--up] [-l LINE_LENGTH] [--wl WRAP_LENGTH]
             [--case-sensitive] [--remove-redundant-aliases] [--honor-noqa]
             [--treat-comment-as-code TREAT_COMMENTS_AS_CODE]
             [--treat-all-comment-as-code] [--formatter FORMATTER] [--color]
             [--ext-format EXT_FORMAT] [--star-first] [--sd DEFAULT_SECTION]
             [--only-sections] [--ds] [--fas] [--fss] [--hcss] [--srss]
             [--fass] [-t FORCE_TO_TOP] [--combine-straight-imports]
             [--nlb NO_LINES_BEFORE] [--src SRC_PATHS]
             [-b KNOWN_STANDARD_LIBRARY]
             [--extra-builtin EXTRA_STANDARD_LIBRARY]
             [-f KNOWN_FUTURE_LIBRARY] [-o KNOWN_THIRD_PARTY]
             [-p KNOWN_FIRST_PARTY] [--known-local-folder KNOWN_LOCAL_FOLDER]
             [--virtual-env VIRTUAL_ENV] [--conda-env CONDA_ENV]
             [--py {all,2,27,3,310,35,36,37,38,39,auto}]
             [files ...]
isort: error: unrecognized arguments: -

/usr/local/bin/isort --profile black --line-length 99 --skip-gitignore --check --filename /Users/den/work/sky/projects/webapi/browser.py - --profile black --line-length 99 --skip-gitignore --filename /Users/den/work/sky/projects/webapi/browser.py - --profile black --line-length 99 --skip-gitignore --filename /Users/den/work/sky/projects/webapi/browser.py -
CWD Formatter: /Users/den/work/sky/projects
[Error - 1:56:05 PM] usage: isort [-h] [-V] [--vn] [-v] [--only-modified] [--dedup-headings] [-q]
             [-d] [--overwrite-in-place] [--show-config] [--show-files] [--df]
             [-c] [--ws] [--sp SETTINGS_PATH] [--cr CONFIG_ROOT]
             [--resolve-all-configs] [--profile PROFILE] [--old-finders]
             [-j [JOBS]] [--ac] [--interactive] [--format-error FORMAT_ERROR]
             [--format-success FORMAT_SUCCESS] [--filter-files] [-s SKIP]
             [--extend-skip EXTEND_SKIP] [--sg SKIP_GLOB]
             [--extend-skip-glob EXTEND_SKIP_GLOB] [--gitignore]
             [--ext SUPPORTED_EXTENSIONS]
             [--blocked-extension BLOCKED_EXTENSIONS] [--dont-follow-links]
             [--filename FILENAME] [--allow-root] [-a ADD_IMPORTS] [--append]
             [--af] [--rm REMOVE_IMPORTS] [--float-to-top]
             [--dont-float-to-top] [--ca] [--cs] [-e] [--ff]
             [--fgw [FORCE_GRID_WRAP]] [-i INDENT]
             [--lbi LINES_BEFORE_IMPORTS] [--lai LINES_AFTER_IMPORTS]
             [--lbt LINES_BETWEEN_TYPES] [--le LINE_ENDING] [--ls] [--lss]
             [-m {GRID,VERTICAL,HANGING_INDENT,VERTICAL_HANGING_INDENT,VERTICAL_GRID,VERTICAL_GRID_GROUPED,VERTICAL_GRID_GROUPED_NO_COMMA,NOQA,VERTICAL_HANGING_INDENT_BRACKET,VERTICAL_PREFIX_FROM_MODULE_IMPORT,HANGING_INDENT_WITH_PARENTHESES,BACKSLASH_GRID,0,1,2,3,4,5,6,7,8,9,10,11}]
             [-n] [--nis] [--ot] [--dt] [--rr] [--reverse-sort]
             [--sort-order SORT_ORDER] [--sl] [--nsl SINGLE_LINE_EXCLUSIONS]
             [--tc] [--up] [-l LINE_LENGTH] [--wl WRAP_LENGTH]
             [--case-sensitive] [--remove-redundant-aliases] [--honor-noqa]
             [--treat-comment-as-code TREAT_COMMENTS_AS_CODE]
             [--treat-all-comment-as-code] [--formatter FORMATTER] [--color]
             [--ext-format EXT_FORMAT] [--star-first] [--sd DEFAULT_SECTION]
             [--only-sections] [--ds] [--fas] [--fss] [--hcss] [--srss]
             [--fass] [-t FORCE_TO_TOP] [--combine-straight-imports]
             [--nlb NO_LINES_BEFORE] [--src SRC_PATHS]
             [-b KNOWN_STANDARD_LIBRARY]
             [--extra-builtin EXTRA_STANDARD_LIBRARY]
             [-f KNOWN_FUTURE_LIBRARY] [-o KNOWN_THIRD_PARTY]
             [-p KNOWN_FIRST_PARTY] [--known-local-folder KNOWN_LOCAL_FOLDER]
             [--virtual-env VIRTUAL_ENV] [--conda-env CONDA_ENV]
             [--py {all,2,27,3,310,35,36,37,38,39,auto}]
             [files ...]
isort: error: unrecognized arguments: - -

/usr/local/bin/isort --profile black --line-length 99 --skip-gitignore --check --filename /Users/den/work/sky/projects/webapi/browser.py - --profile black --line-length 99 --skip-gitignore --filename /Users/den/work/sky/projects/webapi/browser.py - --profile black --line-length 99 --skip-gitignore --filename /Users/den/work/sky/projects/webapi/browser.py - --profile black --line-length 99 --skip-gitignore --check --filename /Users/den/work/sky/projects/webapi/browser.py -
CWD Formatter: /Users/den/work/sky/projects
@github-actions github-actions bot added the triage-needed Issue is not triaged. label May 31, 2022
@karthiknadig karthiknadig added needs investigation bug Issue identified by VS Code Team member as probable bug and removed triage-needed Issue is not triaged. labels May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug needs investigation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants