Mercurial > hg-stable
changeset 47851:142a76127e3a stable
check-code: drop the camelcase checks
Fro about 2 years we have been using CamelCase is class names. That rules gets
in the way of assigning class or exception in compatibility layers.
I think it is safe to drop it now that we started using CamelCase for some case.
My motivation for this is the need to assign `FileNotFoundError` in `pycompat`.
Differential Revision: https://phab.mercurial-scm.org/D11309
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 19 Aug 2021 18:04:14 +0200 |
parents | 254833bde23b |
children | 2b76255a4f74 |
files | contrib/check-code.py |
diffstat | 1 files changed, 0 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/check-code.py Fri Aug 20 00:23:49 2021 +0530 +++ b/contrib/check-code.py Thu Aug 19 18:04:14 2021 +0200 @@ -340,11 +340,6 @@ (r'[^\n]\Z', "no trailing newline"), (r'(\S[ \t]+|^[ \t]+)\n', "trailing whitespace"), ( - r'^\s+(self\.)?[A-Za-z][a-z0-9]+[A-Z]\w* = ', - "don't use camelcase in identifiers", - r'#.*camelcase-required', - ), - ( r'^\s*(if|while|def|class|except|try)\s[^[\n]*:\s*[^\\n]#\s]+', "linebreak after :", ),