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

Skip to content

Commit 87d8200

Browse files
committed
#14804: Remove [] around optional arguments with default values
2 parents 44f7cf0 + dfa4652 commit 87d8200

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
@@ -1120,7 +1120,7 @@ the following methods and attributes:
11201120
rendition (as set by :meth:`bkgdset`) merged into them.
11211121

11221122

1123-
.. method:: window.scroll([lines=1])
1123+
.. method:: window.scroll(lines=1)
11241124

11251125
Scroll the screen or scrolling region upward by *lines* lines.
11261126

Doc/library/email.generator.rst

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

199199

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

202202
This class, derived from :class:`Generator` walks through all the subparts of a
203203
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
@@ -707,7 +707,7 @@ accessed using the following methods:
707707
The :class:`Cookie` class also defines the following method:
708708

709709

710-
.. method:: Cookie.is_expired([now=None])
710+
.. method:: Cookie.is_expired(now=None)
711711

712712
True if cookie has passed the time at which the server requested it should
713713
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
@@ -1786,7 +1786,7 @@ Files and Directories
17861786
Availability: Unix.
17871787

17881788

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

17911791
Create a filesystem node (file, device special file or named pipe) named
17921792
*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
@@ -281,7 +281,7 @@ The following convenience methods combine several ioctls, or one ioctl and some
281281
simple calculations.
282282

283283

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

286286
Set the key audio sampling parameters---sample format, number of channels, and
287287
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
@@ -267,7 +267,7 @@ Edge and Level Trigger Polling (epoll) Objects
267267
Remove a registered file descriptor from the epoll object.
268268

269269

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

272272
Wait for events. timeout in seconds (float)
273273

@@ -371,7 +371,7 @@ Kqueue Objects
371371
Create a kqueue object from a given file descriptor.
372372

373373

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

376376
Low level interface to kevent
377377

Doc/library/sqlite3.rst

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

528528

529-
.. method:: Cursor.fetchmany([size=cursor.arraysize])
529+
.. method:: Cursor.fetchmany(size=cursor.arraysize)
530530

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

0 commit comments

Comments
 (0)