Enable flake8-annotations linting rules (#267)
See https://docs.astral.sh/ruff/rules/#flake8-annotations-ann.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from pathlib import Path
|
||||
from subprocess import run
|
||||
|
||||
from common import dates, endoflife
|
||||
@@ -6,7 +7,7 @@ from common.git import Git
|
||||
"""Fetch Debian versions by parsing news in www.debian.org source repository."""
|
||||
|
||||
|
||||
def extract_major_versions(product, repo_dir):
|
||||
def extract_major_versions(product: endoflife.Product, repo_dir: Path) -> None:
|
||||
child = run(
|
||||
f"grep -RhE -A 1 '<define-tag pagetitle>Debian [0-9]+.+</q> released' {repo_dir}/english/News "
|
||||
f"| cut -d '<' -f 2 "
|
||||
@@ -25,7 +26,7 @@ def extract_major_versions(product, repo_dir):
|
||||
is_release_line = True
|
||||
|
||||
|
||||
def extract_point_versions(product, repo_dir):
|
||||
def extract_point_versions(product: endoflife.Product, repo_dir: Path) -> None:
|
||||
child = run(
|
||||
f"grep -Rh -B 10 '<define-tag revision>' {repo_dir}/english/News "
|
||||
"| grep -Eo '(release_date>(.*)<|revision>(.*)<)' "
|
||||
|
||||
Reference in New Issue
Block a user