Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cfe9c82

Browse files
gpongelliLee-W
authored andcommitted
pass black, isort, flake8 checks
1 parent 3acd8ce commit cfe9c82

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

‎commitizen/git.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import re
21
import os
2+
import re
33
from pathlib import Path
44
from tempfile import NamedTemporaryFile
55
from typing import List, Optional

‎tests/conftest.py‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import os
2-
32
import re
3+
44
import pytest
55

66
from commitizen import cmd, defaults
@@ -26,8 +26,8 @@ def tmp_commitizen_project(tmp_git_project):
2626

2727
@pytest.fixture(scope="function")
2828
def tmp_commitizen_project_with_gpg(tmp_commitizen_project):
29-
_gpg_file = tmp_commitizen_project.join('gpg_setup')
30-
with open(_gpg_file, "w", newline='') as f:
29+
_gpg_file = tmp_commitizen_project.join("gpg_setup")
30+
with open(_gpg_file, "w", newline="") as f:
3131
f.write("Key-Type: default" + os.linesep)
3232
f.write("Subkey-Type: default" + os.linesep)
3333
f.write("Name-Real: Joe Tester" + os.linesep)
@@ -38,9 +38,11 @@ def tmp_commitizen_project_with_gpg(tmp_commitizen_project):
3838

3939
cmd.run(f"gpg --batch --generate-key {_gpg_file}")
4040

41-
_new_key = cmd.run(f"gpg --list-secret-keys joe@foo.bar")
42-
_m = re.search(f"[a-zA-Z0-9 \[\]-_]*{os.linesep}[ ]*([0-9A-Za-z]*){os.linesep}[{os.linesep}a-zA-Z0-9 \[\]-_<>@]*",
43-
_new_key.out)
41+
_new_key = cmd.run("gpg --list-secret-keys joe@foo.bar")
42+
_m = re.search(
43+
rf"[a-zA-Z0-9 \[\]-_]*{os.linesep}[ ]*([0-9A-Za-z]*){os.linesep}[{os.linesep}a-zA-Z0-9 \[\]-_<>@]*",
44+
_new_key.out,
45+
)
4446
if _m:
4547
_key_id = _m.group(1)
4648
cmd.run("git config --global commit.gpgsign true")

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /