Skip to content

Commit 6f62eac

Browse files
committed
Space out file sections consistently
1 parent 0920eb4 commit 6f62eac

22 files changed

+24
-2
lines changed

userland/utilities/basename.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from .. import core
44

5+
56
parser = core.create_parser(
67
usage=("%prog NAME [SUFFIX]", "%prog OPTION... NAME..."),
78
description="Print the last component of each path NAME.",

userland/utilities/clear.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from .. import core
22

3-
# clear(1), roughly modelled off the ncurses implementation.
43

4+
# clear(1), roughly modelled off the ncurses implementation.
55

66
parser = core.create_parser(
77
usage=("%prog [OPTION]...",),

userland/utilities/dirname.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from .. import core
44

5+
56
parser = core.create_parser(
67
usage=("%prog [OPTION]... NAME...",),
78
description=(

userland/utilities/echo.py

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from .. import core
66

7+
78
ESCAPES_PATTERN = re.compile(
89
r"(\\0[0-7]{1,3}|\\x[0-9A-Za-z]{1,2}|\\[\\0abcefnrtv])",
910
re.UNICODE | re.VERBOSE,

userland/utilities/factor.py

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from .. import core
66

7+
78
# List of small primes greater than 2; used for lookup.
89
SMALL_PRIMES = [3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]
910

userland/utilities/groups.py

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
from .. import core
77

8+
89
parser = core.create_parser(
910
usage=("%prog [USERNAME]...",),
1011
description="Print a list of groups for each USERNAME or the current user.",

userland/utilities/hostid.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from .. import core
22

3+
34
parser = core.create_parser(
45
usage=("%prog",),
56
description="Print a 32-bit numeric host machine identifier.",

userland/utilities/id.py

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
from .. import core
77

8+
89
parser = core.create_parser(
910
usage=("%prog [OPTION]... [USER]...",),
1011
description="Print user and group information for each USER or the current user.",

userland/utilities/logname.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from .. import core
44

5+
56
parser = core.create_parser(
67
usage=("%prog",),
78
description="Print the current user's login name.",

userland/utilities/nologin.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from .. import core
22

3+
34
parser = core.create_parser(
45
usage=("%prog",),
56
description="Politely refuse a login.",

userland/utilities/nproc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import os
22

3-
43
from .. import core
54

5+
66
parser = core.create_parser(
77
usage=(" %prog [OPTION]...",),
88
description="Print the number of processing units available to the process.",

userland/utilities/printenv.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from .. import core
44

5+
56
parser = core.create_parser(
67
usage=(" %prog [OPTION] [VARIABLE]...",),
78
description="Print VARIABLE(s) or all environment variables, and their values.",

userland/utilities/pwd.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from .. import core
44

5+
56
parser = core.create_parser(
67
usage=("%prog [OPTION]",),
78
description="Print the path to the current working directory.",

userland/utilities/realpath.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
from .. import core
55

6+
67
# Note: os.path is used instead of pathlib because certain functionality such as
78
# os.path.normpath() lack a pathlib equivalent.
89

userland/utilities/reset.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
from .. import core
55

6+
67
# reset(1), roughly modelled off the ncurses implementation.
78

89
parser = core.create_parser(

userland/utilities/sleep.py

+2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33

44
from .. import core
55

6+
67
SUFFIXES = {"s": 1, "m": 60, "h": 60 * 60, "d": 24 * 60 * 60}
78

9+
810
parser = core.create_parser(
911
usage=("%prog DURATION[SUFFIX]...",),
1012
description=(

userland/utilities/sync.py

+2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33

44
from .. import core
55

6+
67
parser = core.create_parser(
78
usage=("%prog [FILE]...",),
89
description="Sync the filesystem or write each FILE's blocks to disk.",
910
)
1011

12+
1113
@core.command(parser)
1214
def python_userland_sync(_, args):
1315
if args:

userland/utilities/truncate.py

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from .. import core
66

7+
78
parser = core.create_parser(
89
usage=(
910
"%prog [OPTION]... -s SIZE FILE...",

userland/utilities/tty.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
from .. import core
55

6+
67
parser = core.create_parser(
78
usage=("%prog [OPTION]",),
89
description="Print the path to the terminal connected to standard input.",

userland/utilities/uname.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from .. import core
44

5+
56
# mapping of uname_result attribute name to option atttribute name
67
UNAME_ATTRS = {
78
"sysname": "kernel_name",

userland/utilities/whoami.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from .. import core
44

5+
56
parser = core.create_parser(
67
usage=("%prog",),
78
description="Print the current username. Same as `id -un`.",

userland/utilities/yes.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from .. import core
22

3+
34
parser = core.create_parser(
45
("%prog [STRING]...",),
56
description="Repeatedly output a line with STRING(s) (or 'y' by default).",

0 commit comments

Comments
 (0)