Skip to content

Commit 05c8f91

Browse files
authored
Fixes to lint CI (#81)
1 parent 4974754 commit 05c8f91

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/lint_python.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ jobs:
1010
cache: pip
1111
cache-dependency-path: .github/workflows/lint_python.yml
1212
- run: pip install --upgrade pip wheel
13-
- run: pip install bandit black codespell flake8 flake8-bugbear
14-
flake8-comprehensions isort mypy pyupgrade safety
13+
# TODO: remove setuptools installation when safety==2.4.0 is released
14+
- run: pip install --upgrade bandit black codespell flake8 flake8-bugbear
15+
flake8-comprehensions isort mypy pyupgrade safety setuptools
1516
- run: bandit --recursive --skip B101,B404,B603 .
1617
- run: black --diff .
1718
- run: codespell --ignore-words-list="commitish"

cherry_picker/cherry_picker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ def create_gh_pr(self, base_branch, head_branch, *, commit_message, gh_auth):
440440
"maintainer_can_modify": True,
441441
}
442442
url = CREATE_PR_URL_TEMPLATE.format(config=self.config)
443-
response = requests.post(url, headers=request_headers, json=data)
443+
response = requests.post(url, headers=request_headers, json=data, timeout=10)
444444
if response.status_code == requests.codes.created:
445445
response_data = response.json()
446446
click.echo(f"Backport PR created at {response_data['html_url']}")

cherry_picker/test_cherry_picker.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ def tmp_git_repo_dir(tmpdir, cd, git_init, git_commit, git_config):
135135
warnings.warn(
136136
"You need git 2.28.0 or newer to run the full test suite.",
137137
UserWarning,
138+
stacklevel=2,
138139
)
139140
git_config("--local", "user.name", "Monty Python")
140141
git_config("--local", "user.email", "bot@python.org")

0 commit comments

Comments
 (0)