mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-29 06:35:28 -04:00
precommit: Update Python packages and re-format
This commit is contained in:
parent
9079630cc5
commit
4e03334606
27 changed files with 307 additions and 345 deletions
|
|
@ -18,7 +18,6 @@ from prettify_cp2k import replacer
|
|||
sys.path.insert(0, path.join(path.dirname(path.abspath(__file__)), "fprettify"))
|
||||
from fprettify import reformat_ffile, fparse_utils, log_exception
|
||||
|
||||
|
||||
TO_UPCASE_RE = re.compile(
|
||||
r"""
|
||||
(?P<toUpcase>
|
||||
|
|
|
|||
|
|
@ -26,8 +26,10 @@ rm -rf /var/lib/apt/lists/*
|
|||
python3 -m venv /opt/venv
|
||||
export PATH="/opt/venv/bin:$PATH"
|
||||
|
||||
# TODO Add a pylock.toml file (https://peps.python.org/pep-0751/)
|
||||
# Install Python packages. Upgrade via:
|
||||
# pip3 install black flask gunicorn mdformat-gfm cmake-format
|
||||
# pip3 install black flask gunicorn cmake-format fortitude-lint \
|
||||
# mdformat mdformat-gfm mdformat_frontmatter mdformat_myst mdformat_tables
|
||||
# pip3 freeze > requirements.txt
|
||||
pip3 install --quiet -r requirements.txt
|
||||
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ def parseRoutine(inFile, logger):
|
|||
}
|
||||
stream = InputStream(inFile)
|
||||
while True:
|
||||
(jline, _, lines) = stream.nextFortranLine()
|
||||
jline, _, lines = stream.nextFortranLine()
|
||||
if len(lines) == 0:
|
||||
break
|
||||
if FCT_RE.match(jline) or SUBR_RE.match(jline):
|
||||
|
|
@ -317,7 +317,7 @@ def parseRoutine(inFile, logger):
|
|||
subF = open(m.group("file"), "r", encoding="utf8")
|
||||
subStream = InputStream(subF)
|
||||
while True:
|
||||
(subjline, _, sublines) = subStream.nextFortranLine()
|
||||
subjline, _, sublines = subStream.nextFortranLine()
|
||||
if not sublines:
|
||||
break
|
||||
routine["strippedCore"].append(subjline)
|
||||
|
|
@ -351,7 +351,7 @@ def parseRoutine(inFile, logger):
|
|||
routine["result"] = routine["name"]
|
||||
|
||||
while True:
|
||||
(jline, comment_list, lines) = stream.nextFortranLine()
|
||||
jline, comment_list, lines = stream.nextFortranLine()
|
||||
comments = "\n".join(_ for _ in comment_list)
|
||||
if len(lines) == 0:
|
||||
break
|
||||
|
|
@ -422,7 +422,7 @@ def parseRoutine(inFile, logger):
|
|||
istart = lines
|
||||
interfaceDeclFile = StringIO()
|
||||
while True:
|
||||
(jline, _, lines) = stream.nextFortranLine()
|
||||
jline, _, lines = stream.nextFortranLine()
|
||||
if INTERFACE_END_RE.match(jline):
|
||||
iend = lines
|
||||
break
|
||||
|
|
@ -481,7 +481,7 @@ def parseRoutine(inFile, logger):
|
|||
subF = open(m.group("file"), "r", encoding="utf8")
|
||||
subStream = InputStream(subF)
|
||||
while True:
|
||||
(subjline, _, sublines) = subStream.nextFortranLine()
|
||||
subjline, _, sublines = subStream.nextFortranLine()
|
||||
if not sublines:
|
||||
break
|
||||
routine["strippedCore"].append(subjline)
|
||||
|
|
@ -498,7 +498,7 @@ def parseRoutine(inFile, logger):
|
|||
if logger.isEnabledFor(logging.DEBUG):
|
||||
traceback.print_exc()
|
||||
|
||||
(jline, _, lines) = stream.nextFortranLine()
|
||||
jline, _, lines = stream.nextFortranLine()
|
||||
return routine
|
||||
|
||||
|
||||
|
|
@ -1021,7 +1021,7 @@ def parseUse(inFile):
|
|||
commonUses = ""
|
||||
stream = InputStream(inFile)
|
||||
while True:
|
||||
(jline, comment_list, lines) = stream.nextFortranLine()
|
||||
jline, comment_list, lines = stream.nextFortranLine()
|
||||
comments = "\n".join(_ for _ in comment_list if _)
|
||||
lineNr = lineNr + len(lines)
|
||||
if not lines:
|
||||
|
|
|
|||
|
|
@ -1,31 +1,31 @@
|
|||
black==24.3.0
|
||||
blinker==1.7.0
|
||||
click==8.1.7
|
||||
black==26.1.0
|
||||
blinker==1.9.0
|
||||
click==8.3.1
|
||||
cmake-format==0.6.13
|
||||
cmakelang==0.6.13
|
||||
Flask==3.0.0
|
||||
Flask==3.1.3
|
||||
fortitude-lint==0.7.5
|
||||
gunicorn==23.0.0
|
||||
itsdangerous==2.1.2
|
||||
gunicorn==25.1.0
|
||||
itsdangerous==2.2.0
|
||||
Jinja2==3.1.6
|
||||
linkify-it-py==2.0.2
|
||||
markdown-it-py==2.2.0
|
||||
MarkupSafe==2.1.3
|
||||
mdformat==0.7.17
|
||||
mdformat-gfm==0.3.5
|
||||
mdformat_frontmatter==2.0.1
|
||||
mdformat_myst==0.1.5
|
||||
mdformat_tables==0.4.1
|
||||
mdit-py-plugins==0.3.5
|
||||
markdown-it-py==3.0.0
|
||||
MarkupSafe==3.0.3
|
||||
mdformat==0.7.22
|
||||
mdformat-gfm==1.0.0
|
||||
mdformat_footnote==0.1.3
|
||||
mdformat_front_matters==2.0.0
|
||||
mdformat_frontmatter==2.0.10
|
||||
mdformat_myst==0.3.0
|
||||
mdformat_tables==1.0.0
|
||||
mdit-py-plugins==0.5.0
|
||||
mdurl==0.1.2
|
||||
mypy-extensions==1.0.0
|
||||
packaging==23.2
|
||||
pathspec==0.11.2
|
||||
platformdirs==4.0.0
|
||||
ruamel.yaml==0.18.5
|
||||
ruamel.yaml.clib==0.2.8
|
||||
six==1.16.0
|
||||
tomli==2.0.1
|
||||
typing_extensions==4.8.0
|
||||
uc-micro-py==1.0.2
|
||||
Werkzeug==3.1.5
|
||||
mypy_extensions==1.1.0
|
||||
packaging==26.0
|
||||
pathspec==1.0.4
|
||||
platformdirs==4.9.2
|
||||
pytokens==0.4.1
|
||||
ruamel.yaml==0.19.1
|
||||
six==1.17.0
|
||||
toml==0.10.2
|
||||
wcwidth==0.6.0
|
||||
Werkzeug==3.1.6
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue