Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYiming Wu <xp8110@outlook.com>2022-06-02 16:27:09 +0300
committerYiming Wu <xp8110@outlook.com>2022-06-02 16:27:28 +0300
commit04f67fb2dbf38e05d9c4855d2b214d545913c850 (patch)
treec7875a5a8ee51a8448210498363ed8e8ac5b4b68 /tests/python/pep8.py
parente3363451667299b1cbc85b04bcec3f106e5dc216 (diff)
parent432c4c74ebe6f66b83e06ff7fca70c96d0526d6a (diff)
Merge remote-tracking branch 'origin/master' into temp-lineart-containedtemp-lineart-contained
Diffstat (limited to 'tests/python/pep8.py')
-rw-r--r--tests/python/pep8.py21
1 files changed, 2 insertions, 19 deletions
diff --git a/tests/python/pep8.py b/tests/python/pep8.py
index 9a2871c9ed5..2583bec8256 100644
--- a/tests/python/pep8.py
+++ b/tests/python/pep8.py
@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
-# <pep8-80 compliant>
-
import os
import subprocess
import shutil
@@ -22,7 +20,6 @@ import shutil
# how many lines to read into the file, pep8 comment
# should be directly after the license header, ~20 in most cases
-PEP8_SEEK_COMMENT = 40
SKIP_PREFIX = "./tools", "./config", "./extern"
SKIP_ADDONS = True
FORCE_PEP8_ALL = False
@@ -39,22 +36,8 @@ def is_pep8(path):
print(path)
if open(path, 'rb').read(3) == b'\xef\xbb\xbf':
print("\nfile contains BOM, remove first 3 bytes: %r\n" % path)
-
- # templates don't have a header but should be pep8
- for d in ("presets", "templates_py", "examples"):
- if ("%s%s%s" % (os.sep, d, os.sep)) in path:
- return 1
-
- f = open(path, 'r', encoding="utf8")
- for _ in range(PEP8_SEEK_COMMENT):
- line = f.readline()
- if line.startswith("# <pep8"):
- if line.startswith("# <pep8 compliant>"):
- return 1
- elif line.startswith("# <pep8-80 compliant>"):
- return 2
- f.close()
- return 0
+ # Currently all scripts assumed to be pep8.
+ return 1
def check_files_flake8(files):