summaryrefslogtreecommitdiffstats
path: root/Lib/filecmp.py
diff options
context:
space:
mode:
authorEthan Smith <ethan@ethanhs.me>2020-04-10 04:47:31 (GMT)
committerGitHub <noreply@github.com>2020-04-10 04:47:31 (GMT)
commite3ec44d692d9442e640cf5b2d8708157a65cec3e (patch)
treedc16382cb3ae14abfda9fb38257202bb1ab7b3d2 /Lib/filecmp.py
parent7c4185d62d4aec486d82c3ad02acd878db2d3537 (diff)
downloadcpython-e3ec44d692d9442e640cf5b2d8708157a65cec3e.zip
cpython-e3ec44d692d9442e640cf5b2d8708157a65cec3e.tar.gz
cpython-e3ec44d692d9442e640cf5b2d8708157a65cec3e.tar.bz2
bpo-39481: PEP 585 for difflib, filecmp, fileinput (#19422)
Diffstat (limited to 'Lib/filecmp.py')
-rw-r--r--Lib/filecmp.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/filecmp.py b/Lib/filecmp.py
index cfdca1e..7a4da6b 100644
--- a/Lib/filecmp.py
+++ b/Lib/filecmp.py
@@ -13,6 +13,7 @@ Functions:
import os
import stat
from itertools import filterfalse
+from types import GenericAlias
__all__ = ['clear_cache', 'cmp', 'dircmp', 'cmpfiles', 'DEFAULT_IGNORES']
@@ -247,6 +248,9 @@ class dircmp:
self.methodmap[attr](self)
return getattr(self, attr)
+ __class_getitem__ = classmethod(GenericAlias)
+
+
def cmpfiles(a, b, common, shallow=True):
"""Compare common files in two directories.