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

CLI --flom-first flag require an argument #1781

Closed
amano-takahisa opened this issue Jul 14, 2021 · 0 comments
Closed

CLI --flom-first flag require an argument #1781

amano-takahisa opened this issue Jul 14, 2021 · 0 comments

Comments

@amano-takahisa
Copy link

If I run

isort my_script.py --from-first

raise error like

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] [--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 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 FROM_FIRST]
             [--fgw [FORCE_GRID_WRAP]] [-i INDENT] [--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,35,36,37,38,39,auto}]
             [files [files ...]]
isort: error: argument --ff/--from-first: expected one argument

Is this expected behavior? Otherwise, I thought

action="store_true",

is missing in this section.

isort/isort/main.py

Lines 461 to 467 in 2776034

output_group.add_argument(
"--ff",
"--from-first",
dest="from_first",
help="Switches the typical ordering preference, "
"showing from imports first then straight ones.",
)

My isort version is 5.9.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant