Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dfa4652

Browse files
committed
#14804: Remove [] around optional arguments with default values
1 parent f54c060 commit dfa4652

8 files changed

Lines changed: 11 additions & 11 deletions

File tree

Doc/library/curses.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,7 @@ the following methods:
10911091
rendition (as set by :meth:`bkgdset`) merged into them.
10921092

10931093

1094-
.. method:: window.scroll([lines=1])
1094+
.. method:: window.scroll(lines=1)
10951095

10961096
Scroll the screen or scrolling region upward by *lines* lines.
10971097

Doc/library/email.generator.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ except that non-\ :mimetype:`text` parts are substituted with a format string
178178
representing the part.
179179

180180

181-
.. class:: DecodedGenerator(outfp[, mangle_from_=True, maxheaderlen=78, fmt=None)
181+
.. class:: DecodedGenerator(outfp, mangle_from_=True, maxheaderlen=78, fmt=None)
182182

183183
This class, derived from :class:`Generator` walks through all the subparts of a
184184
message. If the subpart is of main type :mimetype:`text`, then it prints the

Doc/library/http.cookiejar.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ accessed using the following methods:
700700
The :class:`Cookie` class also defines the following method:
701701

702702

703-
.. method:: Cookie.is_expired([now=None])
703+
.. method:: Cookie.is_expired(now=None)
704704

705705
True if cookie has passed the time at which the server requested it should
706706
expire. If *now* is given (in seconds since the epoch), return whether the

Doc/library/nis.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Because NIS exists only on Unix systems, this module is only available for Unix.
1717
The :mod:`nis` module defines the following functions:
1818

1919

20-
.. function:: match(key, mapname[, domain=default_domain])
20+
.. function:: match(key, mapname, domain=default_domain)
2121

2222
Return the match for *key* in map *mapname*, or raise an error
2323
(:exc:`nis.error`) if there is none. Both should be strings, *key* is 8-bit
@@ -30,7 +30,7 @@ The :mod:`nis` module defines the following functions:
3030
unspecified, lookup is in the default NIS domain.
3131

3232

33-
.. function:: cat(mapname[, domain=default_domain])
33+
.. function:: cat(mapname, domain=default_domain)
3434

3535
Return a dictionary mapping *key* to *value* such that ``match(key,
3636
mapname)==value``. Note that both keys and values of the dictionary are
@@ -42,7 +42,7 @@ The :mod:`nis` module defines the following functions:
4242
unspecified, lookup is in the default NIS domain.
4343

4444

45-
.. function:: maps([domain=default_domain])
45+
.. function:: maps(domain=default_domain)
4646

4747
Return a list of all valid maps.
4848

Doc/library/os.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,7 @@ Files and Directories
11451145
Availability: Unix.
11461146

11471147

1148-
.. function:: mknod(filename[, mode=0o600[, device]])
1148+
.. function:: mknod(filename, mode=0o600, device=0)
11491149

11501150
Create a filesystem node (file, device special file or named pipe) named
11511151
*filename*. *mode* specifies both the permissions to use and the type of node

Doc/library/ossaudiodev.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ The following convenience methods combine several ioctls, or one ioctl and some
277277
simple calculations.
278278

279279

280-
.. method:: oss_audio_device.setparameters(format, nchannels, samplerate [, strict=False])
280+
.. method:: oss_audio_device.setparameters(format, nchannels, samplerate, strict=False)
281281

282282
Set the key audio sampling parameters---sample format, number of channels, and
283283
sampling rate---in one method call. *format*, *nchannels*, and *samplerate*

Doc/library/select.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ Edge and Level Trigger Polling (epoll) Objects
181181
Remove a registered file descriptor from the epoll object.
182182

183183

184-
.. method:: epoll.poll([timeout=-1[, maxevents=-1]])
184+
.. method:: epoll.poll(timeout=-1, maxevents=-1)
185185

186186
Wait for events. timeout in seconds (float)
187187

@@ -285,7 +285,7 @@ Kqueue Objects
285285
Create a kqueue object from a given file descriptor.
286286

287287

288-
.. method:: kqueue.control(changelist, max_events[, timeout=None]) -> eventlist
288+
.. method:: kqueue.control(changelist, max_events, timeout=None) -> eventlist
289289

290290
Low level interface to kevent
291291

Doc/library/sqlite3.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ Cursor Objects
514514
or :const:`None` when no more data is available.
515515

516516

517-
.. method:: Cursor.fetchmany([size=cursor.arraysize])
517+
.. method:: Cursor.fetchmany(size=cursor.arraysize)
518518

519519
Fetches the next set of rows of a query result, returning a list. An empty
520520
list is returned when no more rows are available.

0 commit comments

Comments
 (0)