Skip to content

Commit

Permalink
ci: avoid dependabot scanning raw requirements file
Browse files Browse the repository at this point in the history
  • Loading branch information
linw1995 committed Oct 12, 2024
1 parent 6bd9899 commit 050c5bc
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build:

python:
install:
- requirements: ./scripts/requirements-docs.txt
- requirements: ./scripts/requirements/requirements-docs.txt
- path: .

sphinx:
Expand Down
4 changes: 3 additions & 1 deletion scripts/export_requirements_txt.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from pathlib import Path

Format = enum.Enum("Format", "requirements setuppy")
BASE_DIR = Path(__file__).parent
BASE_DIR = Path(__file__).parent / "requirements"


def fix_end_of_file(text):
Expand All @@ -23,6 +23,8 @@ def pdm_export(args, filename, format: Format):
['# This a dummy setup.py to enable GitHub "Used By" stats', output]
)
p = Path(filename)
if not p.parent.exists():
p.parent.mkdir(parents=True)
is_new = not p.exists()
if is_new or p.read_text() != output:
p.write_text(output)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 050c5bc

Please sign in to comment.