Movatterモバイル変換


[0]ホーム

URL:


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

Commit2ed3334

Browse files
committed
Fix order of environment setup and git module import
The environment setup must happen before the `git` module is imported,otherwise GitPython won't be able to find the Git executable and raisean exception that causes the ClusterFuzz fuzzer runs to fail.
1 parent27de867 commit2ed3334

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

‎fuzzing/fuzz-targets/fuzz_submodule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
importos
44
importtempfile
55
fromconfigparserimportParsingError
6-
fromgitimportRepo,GitCommandError,InvalidGitRepositoryError
76
fromutilsimport (
87
setup_git_environment,
98
handle_exception,
@@ -12,6 +11,7 @@
1211

1312
# Setup the git environment
1413
setup_git_environment()
14+
fromgitimportRepo,GitCommandError,InvalidGitRepositoryError
1515

1616

1717
defTestOneInput(data):

‎pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ lint.unfixable = [
7878
"test/**" = [
7979
"B018",# useless-expression
8080
]
81+
"fuzzing/fuzz-targets/**" = [
82+
"E402",# environment setup must happen before the `git` module is imported, thus cannot happen at top of file
83+
]
84+
8185

8286
[tool.codespell]
8387
ignore-words-list="gud,doesnt"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp