| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -128,7 +128,7 @@ Diff generation | |||
| 128 | 128 | ||
| 129 | 129 | The :class:`Differ` class has this constructor: | |
| 130 | 130 | ||
| 131 | - .. method:: __init__(linejunk=None, charjunk=None) | ||
| 131 | + .. method:: __init__(linejunk=None, charjunk=None, autojunk=True) | ||
| 132 | 132 | ||
| 133 | 133 | Optional keyword parameters *linejunk* and *charjunk* are for filter functions | |
| 134 | 134 | (or ``None``): | |
@@ -147,6 +147,14 @@ Diff generation | |||
| 147 | 147 | :meth:`~SequenceMatcher.find_longest_match` method's *isjunk* | |
| 148 | 148 | parameter for an explanation. | |
| 149 | 149 | ||
| 150 | + Setting the optional *autojunk* argument to ``False`` will turn | ||
| 151 | + :ref:`automatic junk heuristic <difflib-junk>` off. | ||
| 152 | + | ||
| 153 | + .. versionchanged:: 3.16 | ||
| 154 | + Added keyword-only *autojunk* parameter. | ||
| 155 | + | ||
| 156 | + | ||
| 157 | + | ||
| 150 | 158 | :class:`Differ` objects are used (deltas generated) via a single method: | |
| 151 | 159 | ||
| 152 | 160 | ||
@@ -161,6 +169,8 @@ Diff generation | |||
| 161 | 169 | printed as-is via the :meth:`~io.IOBase.writelines` method of a | |
| 162 | 170 | file-like object. | |
| 163 | 171 | ||
| 172 | + | ||
| 173 | + | ||
| 164 | 174 | .. class:: HtmlDiff | |
| 165 | 175 | ||
| 166 | 176 | This class can be used to create an HTML table (or a complete HTML file | |
@@ -176,7 +186,7 @@ Diff generation | |||
| 176 | 186 | The constructor for this class is: | |
| 177 | 187 | ||
| 178 | 188 | ||
| 179 | - .. method:: __init__(tabsize=8, wrapcolumn=None, linejunk=None, charjunk=IS_CHARACTER_JUNK) | ||
| 189 | + .. method:: __init__(tabsize=8, wrapcolumn=None, linejunk=None, charjunk=IS_CHARACTER_JUNK, *, autojunk=True) | ||
| 180 | 190 | ||
| 181 | 191 | Initializes instance of :class:`HtmlDiff`. | |
| 182 | 192 | ||
@@ -187,8 +197,15 @@ Diff generation | |||
| 187 | 197 | broken and wrapped, defaults to ``None`` where lines are not wrapped. | |
| 188 | 198 | ||
| 189 | 199 | *linejunk* and *charjunk* are optional keyword arguments passed into :func:`ndiff` | |
| 190 | - (used by :class:`HtmlDiff` to generate the side by side HTML differences). See | ||
| 191 | - :func:`ndiff` documentation for argument default values and descriptions. | ||
| 200 | + (used by :class:`HtmlDiff` to generate the side by side HTML differences). | ||
| 201 | + See :func:`ndiff` documentation for argument default values and descriptions. | ||
| 202 | + | ||
| 203 | + Setting the optional *autojunk* argument to ``False`` will turn | ||
| 204 | + :ref:`automatic junk heuristic <difflib-junk>` off. | ||
| 205 | + | ||
| 206 | + .. versionchanged:: 3.16 | ||
| 207 | + Added keyword-only *autojunk* parameter. | ||
| 208 | + | ||
| 192 | 209 | ||
| 193 | 210 | The following methods are public: | |
| 194 | 211 | ||
@@ -231,7 +248,7 @@ Diff generation | |||
| 231 | 248 | ||
| 232 | 249 | ||
| 233 | 250 | ||
| 234 | - .. function:: context_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\n') | ||
| 251 | + .. function:: context_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\n', *, autojunk=True) | ||
| 235 | 252 | ||
| 236 | 253 | Compare *a* and *b* (lists of strings); return a delta (a :term:`generator` | |
| 237 | 254 | generating the delta lines) in context diff format. | |
@@ -277,8 +294,14 @@ Diff generation | |||
| 277 | 294 | ||
| 278 | 295 | See :ref:`difflib-interface` for a more detailed example. | |
| 279 | 296 | ||
| 297 | + Setting the optional *autojunk* argument to ``False`` will turn | ||
| 298 | + :ref:`automatic junk heuristic <difflib-junk>` off. | ||
| 299 | + | ||
| 300 | + .. versionchanged:: 3.16 | ||
| 301 | + Added keyword-only *autojunk* parameter. | ||
| 280 | 302 | ||
| 281 | - .. function:: get_close_matches(word, possibilities, n=3, cutoff=0.6) | ||
| 303 | + | ||
| 304 | + .. function:: get_close_matches(word, possibilities, n=3, cutoff=0.6, *, autojunk=True) | ||
| 282 | 305 | ||
| 283 | 306 | Return a list of the best "good enough" matches. *word* is a sequence for which | |
| 284 | 307 | close matches are desired (typically a string), and *possibilities* is a list of | |
@@ -290,6 +313,9 @@ Diff generation | |||
| 290 | 313 | Optional argument *cutoff* (default ``0.6``) is a float in the range [0, 1]. | |
| 291 | 314 | Possibilities that don't score at least that similar to *word* are ignored. | |
| 292 | 315 | ||
| 316 | + Setting the optional *autojunk* argument to ``False`` will turn | ||
| 317 | + :ref:`automatic junk heuristic <difflib-junk>` off. | ||
| 318 | + | ||
| 293 | 319 | The best (no more than *n*) matches among the possibilities are returned in a | |
| 294 | 320 | list, sorted by similarity score, most similar first. | |
| 295 | 321 | ||
@@ -303,8 +329,11 @@ Diff generation | |||
| 303 | 329 | >>> get_close_matches('accept', keyword.kwlist) | |
| 304 | 330 | ['except'] | |
| 305 | 331 | ||
| 332 | + .. versionchanged:: 3.16 | ||
| 333 | + Added keyword-only *autojunk* parameter. | ||
| 334 | + | ||
| 306 | 335 | ||
| 307 | - .. function:: ndiff(a, b, linejunk=None, charjunk=IS_CHARACTER_JUNK) | ||
| 336 | + .. function:: ndiff(a, b, linejunk=None, charjunk=IS_CHARACTER_JUNK, *, autojunk=True) | ||
| 308 | 337 | ||
| 309 | 338 | Compare *a* and *b* (lists of strings); return a :class:`Differ`\ -style | |
| 310 | 339 | delta (a :term:`generator` generating the delta lines). | |
@@ -325,6 +354,11 @@ Diff generation | |||
| 325 | 354 | function :func:`IS_CHARACTER_JUNK`, which filters out whitespace characters (a | |
| 326 | 355 | blank or tab; it's a bad idea to include newline in this!). | |
| 327 | 356 | ||
| 357 | + Setting the optional *autojunk* argument to ``False`` will turn | ||
| 358 | + :ref:`automatic junk heuristic <difflib-junk>` off. | ||
| 359 | + | ||
| 360 | + Example: | ||
| 361 | + | ||
| 328 | 362 | >>> diff = ndiff('one\ntwo\nthree\n'.splitlines(keepends=True), | |
| 329 | 363 | ... 'ore\ntree\nemu\n'.splitlines(keepends=True)) | |
| 330 | 364 | >>> print(''.join(diff), end="") | |
@@ -338,6 +372,9 @@ Diff generation | |||
| 338 | 372 | + tree | |
| 339 | 373 | + emu | |
| 340 | 374 | ||
| 375 | + .. versionchanged:: 3.16 | ||
| 376 | + Added keyword-only *autojunk* parameter. | ||
| 377 | + | ||
| 341 | 378 | ||
| 342 | 379 | .. function:: restore(sequence, which) | |
| 343 | 380 | ||
@@ -362,7 +399,7 @@ Diff generation | |||
| 362 | 399 | emu | |
| 363 | 400 | ||
| 364 | 401 | ||
| 365 | - .. function:: unified_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\n', *, color=False) | ||
| 402 | + .. function:: unified_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\n', *, autojunk=True, color=False) | ||
| 366 | 403 | ||
| 367 | 404 | Compare *a* and *b* (lists of strings); return a delta (a :term:`generator` | |
| 368 | 405 | generating the delta lines) in unified diff format. | |
@@ -410,6 +447,12 @@ Diff generation | |||
| 410 | 447 | .. versionchanged:: 3.15 | |
| 411 | 448 | Added the *color* parameter. | |
| 412 | 449 | ||
| 450 | + Setting the optional *autojunk* argument to ``False`` will turn | ||
| 451 | + :ref:`automatic junk heuristic <difflib-junk>` off. | ||
| 452 | + | ||
| 453 | + .. versionchanged:: 3.16 | ||
| 454 | + Added keyword-only *autojunk* parameter. | ||
| 455 | + | ||
| 413 | 456 | ||
| 414 | 457 | .. function:: diff_bytes(dfunc, a, b, fromfile=b'', tofile=b'', fromfiledate=b'', tofiledate=b'', n=3, lineterm=b'\n') | |
| 415 | 458 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -304,6 +304,37 @@ curses | |||
| 304 | 304 | (Contributed by Serhiy Storchaka in :gh:`133031`.) | |
| 305 | 305 | ||
| 306 | 306 | ||
| 307 | + ctypes | ||
| 308 | + ------ | ||
| 309 | + | ||
| 310 | + * Add :func:`ctypes.util.struct` for generating :class:`~ctypes.Structure` types | ||
| 311 | + from an annotation-based syntax, similar to how the :mod:`dataclasses` module | ||
| 312 | + is used. | ||
| 313 | + (Contributed by Peter Bierma in :gh:`104533`.) | ||
| 314 | + * Add :func:`ctypes.util.wrap_dll_function` for generating function pointers | ||
| 315 | + through a function signature. | ||
| 316 | + (Contributed by Peter Bierma in :gh:`153903`.) | ||
| 317 | + | ||
| 318 | + | ||
| 319 | + concurrent.futures | ||
| 320 | + ------------------ | ||
| 321 | + | ||
| 322 | + * The iterator returned by :meth:`concurrent.futures.Executor.map` is no longer | ||
| 323 | + automatically closed if a function call raises an exception. | ||
| 324 | + Use method :meth:`!close` to explicitly close the iterator. | ||
| 325 | + (Contributed by xzmeng and Serhiy Storchaka in :gh:`108518`.) | ||
| 326 | + | ||
| 327 | + | ||
| 328 | + difflib | ||
| 329 | + ------- | ||
| 330 | + | ||
| 331 | + * Expose optional ``autojunk`` parameter from :class:`difflib.SequenceMatcher` | ||
| 332 | + to public functions and class methods in :mod:`difflib`, | ||
| 333 | + allowing to modify behavior of automatic junk heuristic in this module | ||
| 334 | + in higher public class methods and functions. | ||
| 335 | + (Contributed by Tomasz Kazimierczak in :gh:`118150`) | ||
| 336 | + | ||
| 337 | + | ||
| 307 | 338 | encodings | |
| 308 | 339 | --------- | |
| 309 | 340 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -664,7 +664,7 @@ def real_quick_ratio(self): | |||
| 664 | 664 | __class_getitem__ = classmethod(GenericAlias) | |
| 665 | 665 | ||
| 666 | 666 | ||
| 667 | - def get_close_matches(word, possibilities, n=3, cutoff=0.6): | ||
| 667 | + def get_close_matches(word, possibilities, n=3, cutoff=0.6, *, autojunk=True): | ||
| 668 | 668 | """Use SequenceMatcher to return list of the best "good enough" matches. | |
| 669 | 669 | ||
| 670 | 670 | word is a sequence for which close matches are desired (typically a | |
@@ -698,7 +698,7 @@ def get_close_matches(word, possibilities, n=3, cutoff=0.6): | |||
| 698 | 698 | if not 0.0 <= cutoff <= 1.0: | |
| 699 | 699 | raise ValueError("cutoff must be in [0.0, 1.0]: %r" % (cutoff,)) | |
| 700 | 700 | result = [] | |
| 701 | - s = SequenceMatcher() | ||
| 701 | + s = SequenceMatcher(autojunk=autojunk) | ||
| 702 | 702 | s.set_seq2(word) | |
| 703 | 703 | for x in possibilities: | |
| 704 | 704 | s.set_seq1(x) | |
@@ -810,7 +810,7 @@ class Differ: | |||
| 810 | 810 | + 5. Flat is better than nested. | |
| 811 | 811 | """ | |
| 812 | 812 | ||
| 813 | - def __init__(self, linejunk=None, charjunk=None): | ||
| 813 | + def __init__(self, linejunk=None, charjunk=None, *, autojunk=True): | ||
| 814 | 814 | """ | |
| 815 | 815 | Construct a text differencer, with optional filters. | |
| 816 | 816 | ||
@@ -828,10 +828,13 @@ def __init__(self, linejunk=None, charjunk=None): | |||
| 828 | 828 | module-level function `IS_CHARACTER_JUNK` may be used to filter out | |
| 829 | 829 | whitespace characters (a blank or tab; **note**: bad idea to include | |
| 830 | 830 | newline in this!). Use of IS_CHARACTER_JUNK is recommended. | |
| 831 | + - `autojunk`: automatic junk diff heuristic | ||
| 832 | + (refer to :class:`SequenceMatcher` for specifics). | ||
| 831 | 833 | """ | |
| 832 | 834 | ||
| 833 | 835 | self.linejunk = linejunk | |
| 834 | 836 | self.charjunk = charjunk | |
| 837 | + self.autojunk = autojunk | ||
| 835 | 838 | ||
| 836 | 839 | def compare(self, a, b): | |
| 837 | 840 | r""" | |
@@ -859,7 +862,7 @@ def compare(self, a, b): | |||
| 859 | 862 | + emu | |
| 860 | 863 | """ | |
| 861 | 864 | ||
| 862 | - cruncher = SequenceMatcher(self.linejunk, a, b) | ||
| 865 | + cruncher = SequenceMatcher(self.linejunk, a, b, autojunk=self.autojunk) | ||
| 863 | 866 | for tag, alo, ahi, blo, bhi in cruncher.get_opcodes(): | |
| 864 | 867 | if tag == 'replace': | |
| 865 | 868 | g = self._fancy_replace(a, alo, ahi, b, blo, bhi) | |
@@ -920,7 +923,7 @@ def _fancy_replace(self, a, alo, ahi, b, blo, bhi): | |||
| 920 | 923 | # Later, more pathological cases prompted removing recursion | |
| 921 | 924 | # entirely. | |
| 922 | 925 | cutoff = 0.74999 | |
| 923 | - cruncher = SequenceMatcher(self.charjunk) | ||
| 926 | + cruncher = SequenceMatcher(self.charjunk, autojunk=self.autojunk) | ||
| 924 | 927 | crqr = cruncher.real_quick_ratio | |
| 925 | 928 | cqr = cruncher.quick_ratio | |
| 926 | 929 | cr = cruncher.ratio | |
@@ -1099,7 +1102,7 @@ def _format_range_unified(start, stop): | |||
| 1099 | 1102 | return '{},{}'.format(beginning, length) | |
| 1100 | 1103 | ||
| 1101 | 1104 | def unified_diff(a, b, fromfile='', tofile='', fromfiledate='', | |
| 1102 | - tofiledate='', n=3, lineterm='\n', *, color=False): | ||
| 1105 | + tofiledate='', n=3, lineterm='\n', *, autojunk=True, color=False): | ||
| 1103 | 1106 | r""" | |
| 1104 | 1107 | Compare two sequences of lines; generate the delta as a unified diff. | |
| 1105 | 1108 | ||
@@ -1120,6 +1123,9 @@ def unified_diff(a, b, fromfile='', tofile='', fromfiledate='', | |||
| 1120 | 1123 | 'git diff --color'. Even if enabled, it can be | |
| 1121 | 1124 | controlled using environment variables such as 'NO_COLOR'. | |
| 1122 | 1125 | ||
| 1126 | + Set `autojunk` to False if you don't want automated junk heuristic. | ||
| 1127 | + See details in :class:`SequenceMatcher. | ||
| 1128 | + | ||
| 1123 | 1129 | The unidiff format normally has a header for filenames and modification | |
| 1124 | 1130 | times. Any or all of these may be specified using strings for | |
| 1125 | 1131 | 'fromfile', 'tofile', 'fromfiledate', and 'tofiledate'. | |
@@ -1150,7 +1156,7 @@ def unified_diff(a, b, fromfile='', tofile='', fromfiledate='', | |||
| 1150 | 1156 | ||
| 1151 | 1157 | _check_types(a, b, fromfile, tofile, fromfiledate, tofiledate, lineterm) | |
| 1152 | 1158 | started = False | |
| 1153 | - for group in SequenceMatcher(None,a,b).get_grouped_opcodes(n): | ||
| 1159 | + for group in SequenceMatcher(None, a, b, autojunk=autojunk).get_grouped_opcodes(n): | ||
| 1154 | 1160 | if not started: | |
| 1155 | 1161 | started = True | |
| 1156 | 1162 | fromdate = '\t{}'.format(fromfiledate) if fromfiledate else '' | |
@@ -1193,7 +1199,7 @@ def _format_range_context(start, stop): | |||
| 1193 | 1199 | ||
| 1194 | 1200 | # See http://www.unix.org/single_unix_specification/ | |
| 1195 | 1201 | def context_diff(a, b, fromfile='', tofile='', | |
| 1196 | - fromfiledate='', tofiledate='', n=3, lineterm='\n'): | ||
| 1202 | + fromfiledate='', tofiledate='', n=3, lineterm='\n', *, autojunk=True): | ||
| 1197 | 1203 | r""" | |
| 1198 | 1204 | Compare two sequences of lines; generate the delta as a context diff. | |
| 1199 | 1205 | ||
@@ -1216,6 +1222,10 @@ def context_diff(a, b, fromfile='', tofile='', | |||
| 1216 | 1222 | The modification times are normally expressed in the ISO 8601 format. | |
| 1217 | 1223 | If not specified, the strings default to blanks. | |
| 1218 | 1224 | ||
| 1225 | + The kwarg `autojunk` sets up automated junk heuristic with | ||
| 1226 | + :class:`SequenceMatcher`, which is used under the hood in this function. | ||
| 1227 | + See documentation of :class:`SequenceMatcher` for details. | ||
| 1228 | + | ||
| 1219 | 1229 | Example: | |
| 1220 | 1230 | ||
| 1221 | 1231 | >>> print(''.join(context_diff('one\ntwo\nthree\nfour\n'.splitlines(True), | |
@@ -1239,7 +1249,7 @@ def context_diff(a, b, fromfile='', tofile='', | |||
| 1239 | 1249 | _check_types(a, b, fromfile, tofile, fromfiledate, tofiledate, lineterm) | |
| 1240 | 1250 | prefix = dict(insert='+ ', delete='- ', replace='! ', equal=' ') | |
| 1241 | 1251 | started = False | |
| 1242 | - for group in SequenceMatcher(None,a,b).get_grouped_opcodes(n): | ||
| 1252 | + for group in SequenceMatcher(None, a, b, autojunk=autojunk).get_grouped_opcodes(n): | ||
| 1243 | 1253 | if not started: | |
| 1244 | 1254 | started = True | |
| 1245 | 1255 | fromdate = '\t{}'.format(fromfiledate) if fromfiledate else '' | |
@@ -1321,7 +1331,7 @@ def decode(s): | |||
| 1321 | 1331 | for line in lines: | |
| 1322 | 1332 | yield line.encode('ascii', 'surrogateescape') | |
| 1323 | 1333 | ||
| 1324 | - def ndiff(a, b, linejunk=None, charjunk=IS_CHARACTER_JUNK): | ||
| 1334 | + def ndiff(a, b, linejunk=None, charjunk=IS_CHARACTER_JUNK, *, autojunk=True): | ||
| 1325 | 1335 | r""" | |
| 1326 | 1336 | Compare `a` and `b` (lists of strings); return a `Differ`-style delta. | |
| 1327 | 1337 | ||
@@ -1339,6 +1349,8 @@ def ndiff(a, b, linejunk=None, charjunk=IS_CHARACTER_JUNK): | |||
| 1339 | 1349 | whitespace characters (a blank or tab; note: it's a bad idea to | |
| 1340 | 1350 | include newline in this!). | |
| 1341 | 1351 | ||
| 1352 | + - autojunk: automatic junk heuristic - refer to :class:`SequenceMatcher` for details | ||
| 1353 | + | ||
| 1342 | 1354 | Tools/scripts/ndiff.py is a command-line front-end to this function. | |
| 1343 | 1355 | ||
| 1344 | 1356 | Example: | |
@@ -1356,10 +1368,10 @@ def ndiff(a, b, linejunk=None, charjunk=IS_CHARACTER_JUNK): | |||
| 1356 | 1368 | + tree | |
| 1357 | 1369 | + emu | |
| 1358 | 1370 | """ | |
| 1359 | - return Differ(linejunk, charjunk).compare(a, b) | ||
| 1371 | + return Differ(linejunk, charjunk, autojunk=autojunk).compare(a, b) | ||
| 1360 | 1372 | ||
| 1361 | 1373 | def _mdiff(fromlines, tolines, context=None, linejunk=None, | |
| 1362 | - charjunk=IS_CHARACTER_JUNK): | ||
| 1374 | + charjunk=IS_CHARACTER_JUNK, *, autojunk=True): | ||
| 1363 | 1375 | r"""Returns generator yielding marked up from/to side by side differences. | |
| 1364 | 1376 | ||
| 1365 | 1377 | Arguments: | |
@@ -1369,6 +1381,7 @@ def _mdiff(fromlines, tolines, context=None, linejunk=None, | |||
| 1369 | 1381 | if None, all from/to text lines will be generated. | |
| 1370 | 1382 | linejunk -- passed on to ndiff (see ndiff documentation) | |
| 1371 | 1383 | charjunk -- passed on to ndiff (see ndiff documentation) | |
| 1384 | + autojunk -- passed on to ndiff (see ndiff documentation) | ||
| 1372 | 1385 | ||
| 1373 | 1386 | This function returns an iterator which returns a tuple: | |
| 1374 | 1387 | (from line tuple, to line tuple, boolean flag) | |
@@ -1398,7 +1411,7 @@ def _mdiff(fromlines, tolines, context=None, linejunk=None, | |||
| 1398 | 1411 | change_re = re.compile(r'(\++|\-+|\^+)') | |
| 1399 | 1412 | ||
| 1400 | 1413 | # create the difference iterator to generate the differences | |
| 1401 | - diff_lines_iterator = ndiff(fromlines,tolines,linejunk,charjunk) | ||
| 1414 | + diff_lines_iterator = ndiff(fromlines, tolines, linejunk, charjunk, autojunk=autojunk) | ||
| 1402 | 1415 | ||
| 1403 | 1416 | def _make_line(lines, format_key, side, num_lines=[0,0]): | |
| 1404 | 1417 | """Returns line of text with user's change markup and line formatting. | |
@@ -1738,21 +1751,22 @@ class HtmlDiff(object): | |||
| 1738 | 1751 | _default_prefix = 0 | |
| 1739 | 1752 | ||
| 1740 | 1753 | def __init__(self,tabsize=8,wrapcolumn=None,linejunk=None, | |
| 1741 | - charjunk=IS_CHARACTER_JUNK): | ||
| 1754 | + charjunk=IS_CHARACTER_JUNK, *, autojunk=True): | ||
| 1742 | 1755 | """HtmlDiff instance initializer | |
| 1743 | 1756 | ||
| 1744 | 1757 | Arguments: | |
| 1745 | 1758 | tabsize -- tab stop spacing, defaults to 8. | |
| 1746 | 1759 | wrapcolumn -- column number where lines are broken and wrapped, | |
| 1747 | 1760 | defaults to None where lines are not wrapped. | |
| 1748 | - linejunk,charjunk -- keyword arguments passed into ndiff() (used by | ||
| 1761 | + linejunk, charjunk, autojunk -- keyword arguments passed into ndiff() (used by | ||
| 1749 | 1762 | HtmlDiff() to generate the side by side HTML differences). See | |
| 1750 | 1763 | ndiff() documentation for argument default values and descriptions. | |
| 1751 | 1764 | """ | |
| 1752 | 1765 | self._tabsize = tabsize | |
| 1753 | 1766 | self._wrapcolumn = wrapcolumn | |
| 1754 | 1767 | self._linejunk = linejunk | |
| 1755 | 1768 | self._charjunk = charjunk | |
| 1769 | + self._autojunk = autojunk | ||
| 1756 | 1770 | ||
| 1757 | 1771 | def make_file(self, fromlines, tolines, fromdesc='', todesc='', | |
| 1758 | 1772 | context=False, numlines=5, *, charset='utf-8'): | |
@@ -2026,7 +2040,7 @@ def make_table(self,fromlines,tolines,fromdesc='',todesc='',context=False, | |||
| 2026 | 2040 | else: | |
| 2027 | 2041 | context_lines = None | |
| 2028 | 2042 | diffs = _mdiff(fromlines,tolines,context_lines,linejunk=self._linejunk, | |
| 2029 | - charjunk=self._charjunk) | ||
| 2043 | + charjunk=self._charjunk, autojunk=self._autojunk) | ||
| 2030 | 2044 | ||
| 2031 | 2045 | # set up iterator to wrap lines that exceed desired width | |
| 2032 | 2046 | if self._wrapcolumn: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments