distro: fix type annotations to please mypy
This commit is contained in:
parent
d13392b2b8
commit
a7da033845
3 changed files with 11 additions and 6 deletions
|
@ -1,8 +1,11 @@
|
|||
from typing import Optional
|
||||
|
||||
|
||||
class PackageInfo:
|
||||
name: str
|
||||
version: str
|
||||
filename: str
|
||||
resolved_url: str
|
||||
resolved_url: Optional[str]
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
|
@ -19,6 +22,7 @@ class PackageInfo:
|
|||
def __repr__(self):
|
||||
return f'{self.name}@{self.version}'
|
||||
|
||||
@staticmethod
|
||||
def parse_desc(desc_str: str, resolved_url=None):
|
||||
"""Parses a desc file, returning a PackageInfo"""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue