Mercurial > public > mercurial-scm > hg-stable
diff tests/test-contrib-check-code.t @ 49036:55d132525155
check-code: remove ban on old-style classes
In Python 3, `class foo:` is equivalent to `class foo(object):`. So
we can allow the former form now.
Differential Revision: https://phab.mercurial-scm.org/D12351
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 21 Feb 2022 13:03:43 -0700 |
parents | 867883d454ea |
children | 3b6f25190157 |
line wrap: on
line diff
--- a/tests/test-contrib-check-code.t Mon Feb 21 12:46:27 2022 -0700 +++ b/tests/test-contrib-check-code.t Mon Feb 21 13:03:43 2022 -0700 @@ -51,12 +51,6 @@ ./quote.py:5: > '"""', 42+1, """and missing whitespace in expression - ./classstyle.py:4: - > class oldstyle_class: - old-style class, use class foo(object) - ./classstyle.py:7: - > class empty(): - class foo() creates old style object, use class foo(object) [1] $ cat > python3-compat.py << NO_CHECK_EOF > foo <> bar