Skip to content

Commit

Permalink
Update flake8 additional dependencies, fix warning
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
EliahKagan committed Sep 21, 2023
1 parent bf7af69 commit c1ec9cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ repos:
- id: flake8
additional_dependencies:
[
flake8-bugbear==22.12.6,
flake8-comprehensions==3.10.1,
flake8-bugbear==23.9.16,
flake8-comprehensions==3.14.0,
flake8-typing-imports==1.14.0,
]
exclude: ^doc|^git/ext/|^test/
Expand Down
3 changes: 2 additions & 1 deletion git/repo/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ def __init__(
if expand_vars and re.search(self.re_envvars, epath):
warnings.warn(
"The use of environment variables in paths is deprecated"
+ "\nfor security reasons and may be removed in the future!!"
+ "\nfor security reasons and may be removed in the future!!",
stacklevel=1,
)
epath = expand_path(epath, expand_vars)
if epath is not None:
Expand Down

0 comments on commit c1ec9cb

Please sign in to comment.