8000 gh-90300: split --help output into separate options by merwok · Pull Request #30331 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-90300: split --help output into separate options #30331

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

Merged
merged 33 commits into from
Jun 1, 2022
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
225c869
move list of X options out of help output
merwok Jan 2, 2022
eaefd1a
mention help option in fatal error message
merwok Jan 2, 2022
57fd33b
move variable declaration out of case block
merwok Jan 2, 2022
55dbf69
move extra envvars help to separate option
merwok Jan 2, 2022
0aaf9af
doc
merwok Jan 2, 2022
a592003
add minimal tests
merwok Jan 2, 2022
1c4cf63
flatten the sub-switch
merwok Jan 2, 2022
d8bfcff
suggestion from Barry
merwok Jan 3, 2022
38f2dd8
more suggestions from flufl
merwok Jan 3, 2022
a828fe8
remove unnecessary
merwok Jan 7, 2022
8bde4ec
mention all envvars in --help-env
merwok Jan 7, 2022
0dbaf03
mistake
merwok Jan 7, 2022
0c9a995
introduce --help-xoptions
merwok Jan 12, 2022
aab464f
add --help-all
merwok Jan 12, 2022
064d4ad
merge upstream
merwok Jan 12, 2022
b9a0b19
replace fprintf by printf; remove extra blanklines
merwok Jan 15, 2022
0ee24d4
merge upstream
merwok Feb 9, 2022
dd2beaa
Merge branch 'main' into shorten-help-output
merwok Apr 11, 2022
c74fc69
merge upstream
merwok May 5, 2022
2f108fe
merge upstream
merwok May 23, 2022
4f345e8
check return code in verify_valid_flag
merwok May 23, 2022
a6573d6
remove duplicate check
merwok May 24, 2022
da97a38
fix some help texts in 80 columns
merwok May 24, 2022
98525b4
remove needless checks
merwok May 25, 2022
5585095
reformat and rearrange some help entries
merwok May 25, 2022
24526bd
fix formatting issues and missing info in man page and --help
merwok May 25, 2022
0bb5dfa
make new tests a bit more useful
merwok May 25, 2022
8fa72f5
512 bytes should be enough for everyone
merwok May 25, 2022
29d04a0
keep long option at the end of help text
merwok May 26, 2022
356d1bf
merge branch 'fix-help-man'
merwok May 26, 2022
ac1b5fb
fix tests and output
merwok May 26, 2022
9bcea95
final fixes
merwok May 26, 2022
5485255
merge upstream
merwok May 29, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove needless checks
  • Loading branch information
merwok committed May 25, 2022
commit 98525b47c893989f8b25889b10e5e255a54e2f91
5 changes: 1 addition & 4 deletions Lib/test/test_cmd_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def test_directories(self):
assert_python_failure('< .')

def verify_valid_flag(self, cmd_line):
_, out, err = assert_python_ok(*cmd_line)
rc, out, err = assert_python_ok(*cmd_line)
self.assertTrue(out == b'' or out.endswith(b'\n'))
self.assertNotIn(b'Traceback', out)
self.assertNotIn(b'Traceback', err)
Expand Down Expand Up @@ -63,7 +63,6 @@ def test_site_flag(self):

def test_usage(self):
rc, out, err = assert_python_ 8685 ok('-h')
self.assertEqual(rc, 0)
lines = out.splitlines()
self.assertIn(b'usage', lines[0])
# The first line contains the program name,
Expand All @@ -74,7 +73,6 @@ def test_version(self):
version = ('Python %d.%d' % sys.version_info[:2]).encode("ascii")
for switch in '-V', '--version', '-VV':
rc, out, err = assert_python_ok(switch)
self.assertEqual(rc, 0)
self.assertFalse(err.startswith(version))
self.assertTrue(out.startswith(version))

Expand Down Expand Up @@ -109,7 +107,6 @@ def get_xoptions(*args):
'Cannot run -E tests when PYTHON env vars are required.')
def test_unknown_xoptions(self):
rc, out, err = assert_python_failure('-X', 'blech')
self.assertEqual(rc, 1)
self.assertIn(b'Unknown value for option -X', err)
msg = b'Fatal Python error: Unknown value for option -X (see --help-xoptions)'
self.assertEqual(err.splitlines().count(msg), 1)
Expand Down
0