Skip to content

Commit b169fde

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 5b0f130 commit b169fde

2 files changed

Lines changed: 10 additions & 20 deletions

File tree

mkdocs_rss_plugin/git_manager/ci.py

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,52 +47,44 @@ def raise_ci_warnings(self) -> None:
4747
# Gitlab Runners
4848
if environ.get("GITLAB_CI") and n_commits < 50:
4949
# Default is GIT_DEPTH of 50 for gitlab
50-
logger.info(
51-
"""
50+
logger.info("""
5251
Running on a gitlab runner might lead to wrong \
5352
git revision dates due to a shallow git fetch depth. \
5453
Make sure to set GIT_DEPTH to 1000 in your .gitlab-ci.yml file. \
5554
(see https://docs.gitlab.com/user/project/repository/monorepos/#use-shallow-clones-in-cicd-processes).
56-
"""
57-
)
55+
""")
5856

5957
# Github Actions
6058
if environ.get("GITHUB_ACTIONS") and n_commits == 1:
6159
# Default is fetch-depth of 1 for github actions
62-
logger.info(
63-
"""
60+
logger.info("""
6461
Running on github actions might lead to wrong \
6562
git revision dates due to a shallow git fetch depth. \
6663
Try setting fetch-depth to 0 in your github action \
6764
(see https://github.com/actions/checkout?tab=readme-ov-file#fetch-all-history-for-all-tags-and-branches).
68-
"""
69-
)
65+
""")
7066

7167
# Bitbucket pipelines
7268
if environ.get("CI") and n_commits < 50:
7369
# Default is fetch-depth of 50 for bitbucket pipelines
74-
logger.info(
75-
"""
70+
logger.info("""
7671
Running on bitbucket pipelines might lead to wrong \
7772
git revision dates due to a shallow git fetch depth. \
7873
Try setting "clone: depth" to "full" in your pipeline \
7974
(see https://support.atlassian.com/bitbucket-cloud/docs/git-clone-behavior/#Depth
8075
and search 'depth').
81-
"""
82-
)
76+
""")
8377

8478
# Azure Devops Pipeline
8579
# Does not limit fetch-depth by default
8680
if environ.get("Agent.Source.Git.ShallowFetchDepth", 10e99) < n_commits:
87-
logger.info(
88-
"""
81+
logger.info("""
8982
Running on Azure pipelines \
9083
with limited fetch-depth might lead to wrong git revision dates \
9184
due to a shallow git fetch depth. \
9285
Remove any Shallow Fetch settings \
9386
(see https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/pipeline-options-for-git?view=azure-devops#shallow-fetch).
94-
"""
95-
)
87+
""")
9688

9789
def commit_count(self) -> int:
9890
"""Helper function to determine the number of commits in a repository.

tests/base.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,8 @@ def setup_clean_mkdocs_folder(
131131

132132
# Create empty 'testproject' folder
133133
if testproject_path.exists():
134-
logging.warning(
135-
"""This command does not work on windows.
136-
Refactor your test to use setup_clean_mkdocs_folder() only once"""
137-
)
134+
logging.warning("""This command does not work on windows.
135+
Refactor your test to use setup_clean_mkdocs_folder() only once""")
138136
shutil.rmtree(testproject_path)
139137

140138
# Copy correct mkdocs.yml file and our test 'docs/'

0 commit comments

Comments
 (0)