Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 7488fcd

Browse files
tobiasdiezMatthias Koeppe
authored and
Matthias Koeppe
committed
Code cleanup
1 parent 6bc70fc commit 7488fcd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/sage/misc/package.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
# (at your option) any later version.
4141
# https://www.gnu.org/licenses/
4242
# ****************************************************************************
43-
from typing import Any, Dict, List, NamedTuple, Optional, Tuple, Union
43+
from typing import Dict, List, NamedTuple, Optional, Union
4444

4545
import sage.env
4646

@@ -158,7 +158,8 @@ def pip_installed_packages(normalization=None):
158158
stderr=devnull,
159159
)
160160
stdout = proc.communicate()[0].decode()
161-
def normalize(name: str):
161+
162+
def normalize(name: str) -> str:
162163
if normalization is None:
163164
return name
164165
elif normalization == 'spkg':
@@ -173,6 +174,7 @@ def normalize(name: str):
173174
# This may happen if pip is not correctly installed.
174175
return {}
175176

177+
176178
class PackageInfo(NamedTuple):
177179
"""Represents information about a package."""
178180
name: str
@@ -332,7 +334,7 @@ def list_packages(*pkg_types: str, pkg_sources: List[str] = ['normal', 'pip', 's
332334
if not local:
333335
remote_version = pip_remote_version(p, ignore_URLError=ignore_URLError)
334336
else:
335-
remote_version = None
337+
remote_version = None
336338
elif src == 'normal':
337339
# If package-version.txt does not exist, that is an error
338340
# in the build system => we just propagate the exception

0 commit comments

Comments
 (0)