Skip to content

Commit c1ec9cb

Browse files
committed
Update flake8 additional dependencies, fix warning
This bumps the versions of the flake8 plugins specified with pinned versions as additional dependencies of flake8 for pre-commit. Doing so gains a warning about a call to warnings.warn with no stacklevel argument. This appears to be the uncommon case where the implifit effect of stacklevel=1 is intended, so I have made that explicit, which clarifies this intent and dismisses the warning.
1 parent bf7af69 commit c1ec9cb

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Diff for: .pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ repos:
55
- id: flake8
66
additional_dependencies:
77
[
8-
flake8-bugbear==22.12.6,
9-
flake8-comprehensions==3.10.1,
8+
flake8-bugbear==23.9.16,
9+
flake8-comprehensions==3.14.0,
1010
flake8-typing-imports==1.14.0,
1111
]
1212
exclude: ^doc|^git/ext/|^test/

Diff for: git/repo/base.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ def __init__(
206206
if expand_vars and re.search(self.re_envvars, epath):
207207
warnings.warn(
208208
"The use of environment variables in paths is deprecated"
209-
+ "\nfor security reasons and may be removed in the future!!"
209+
+ "\nfor security reasons and may be removed in the future!!",
210+
stacklevel=1,
210211
)
211212
epath = expand_path(epath, expand_vars)
212213
if epath is not None:

0 commit comments

Comments
 (0)