mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 01:09:40 +08:00
Enable ruff SIM102 rule (#11341)
* Enable ruff SIM102 rule * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -71,10 +71,13 @@ def added_solution_file_path() -> list[pathlib.Path]:
|
||||
|
||||
|
||||
def collect_solution_file_paths() -> list[pathlib.Path]:
|
||||
if os.environ.get("CI") and os.environ.get("GITHUB_EVENT_NAME") == "pull_request":
|
||||
# Return only if there are any, otherwise default to all solutions
|
||||
if filepaths := added_solution_file_path():
|
||||
return filepaths
|
||||
# Return only if there are any, otherwise default to all solutions
|
||||
if (
|
||||
os.environ.get("CI")
|
||||
and os.environ.get("GITHUB_EVENT_NAME") == "pull_request"
|
||||
and (filepaths := added_solution_file_path())
|
||||
):
|
||||
return filepaths
|
||||
return all_solution_file_paths()
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user