mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-28 06:05:29 -04:00
* fix [E401](https://github.com/PyCQA/pycodestyle/blob/2.8.0/docs/intro.rst#error-codes) * fix [E711](https://github.com/PyCQA/pycodestyle/blob/2.8.0/docs/intro.rst#error-codes) * fix [E713](https://github.com/PyCQA/pycodestyle/blob/2.8.0/docs/intro.rst#error-codes) * fix [E722](https://github.com/PyCQA/pycodestyle/blob/2.8.0/docs/intro.rst#error-codes) * fix [W601](https://github.com/PyCQA/pycodestyle/blob/2.8.0/docs/intro.rst#error-codes) * fix [W605](https://github.com/PyCQA/pycodestyle/blob/2.8.0/docs/intro.rst#error-codes)
15 lines
384 B
Python
Executable file
15 lines
384 B
Python
Executable file
#!/usr/bin/env python3
|
|
|
|
import re
|
|
import sys
|
|
|
|
FYPP_SYMBOLS = r"(#|\$|@)"
|
|
FYPP_LINE = r"^\s*" + FYPP_SYMBOLS + r":"
|
|
FYPP_INLINE = r"(" + FYPP_SYMBOLS + r"{|}" + FYPP_SYMBOLS + r")"
|
|
FYPP_RE = re.compile(r"(" + FYPP_LINE + r"|" + FYPP_INLINE + r")")
|
|
|
|
with open(sys.argv[1], "r", encoding="utf8") as infile:
|
|
if any(FYPP_RE.search(l) for l in infile):
|
|
sys.exit(0)
|
|
|
|
sys.exit(1)
|