← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] ~lgp171188/lpcraft:easier-way-to-add-a-ppa into lpcraft:main

 


Diff comments:

> diff --git a/lpcraft/config.py b/lpcraft/config.py
> index d8d2045..f60cbc2 100644
> --- a/lpcraft/config.py
> +++ b/lpcraft/config.py
> @@ -119,6 +121,13 @@ class PackageSuite(str, Enum):
>      jammy = "jammy"  # 22.04
>  
>  
> +class PPAShortFormURL(pydantic.ConstrainedStr):
> +    """A string with a constrained syntax to match a PPA short form URL."""
> +
> +    strict = True
> +    regex = re.compile(r"^[a-z0-9][a-z0-9\+\._\-]+/[a-z0-9][a-z0-9\+\._\-]+$")

This regex doesn't match `ppa:launchpad/ppa` form, it works only for `launchpad/ppa`. Is that intentional? I see that you use `ppa:launchpad/ppa` as an example below, but don't include that form in any of the tests.

> +
> +
>  class PackageRepository(ModelConfigDefaults):
>      """A representation of a package repository.
>  


-- 
https://code.launchpad.net/~lgp171188/lpcraft/+git/lpcraft/+merge/433493
Your team Launchpad code reviewers is requested to review the proposed merge of ~lgp171188/lpcraft:easier-way-to-add-a-ppa into lpcraft:main.



References