Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ceb5791

Browse files
committed
Include final year on x axis but no extra vertical line
1 parent c747042 commit ceb5791

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

_tools/generate_release_cycle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def format_year(year: int) -> str:
121121
SCALE=SCALE,
122122
diagram_width=DIAGRAM_WIDTH,
123123
diagram_height=(len(self.sorted_versions) + 2) * LINE_HEIGHT,
124-
years=range(first_date.year, last_date.year),
124+
years=range(first_date.year, last_date.year + 1),
125125
LINE_HEIGHT=LINE_HEIGHT,
126126
versions=list(reversed(self.sorted_versions)),
127127
today=dt.datetime.strptime(today, "%Y-%m-%d").date(),

_tools/release_cycle_template.svg.jinja

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
>
3131
{{ format_year(year) }}
3232
</text>
33+
{% if not loop.last %}
3334
<line
3435
class="release-cycle-year-line"
3536
x1="{{ year_to_x(year + 1) * SCALE }}"
@@ -38,6 +39,7 @@
3839
y2="{{ (diagram_height - LINE_HEIGHT) * SCALE }}"
3940
font-size="{{ SCALE }}"
4041
/>
42+
{% endif %}
4143
{% endfor %}
4244

4345
{% for version in versions %}

include/release-cycle.svg

Lines changed: 9 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)