22
22
23
23
## LocalPackageInfo
24
24
25
- [ Show source in packageinfo.py:80 ] ( ../../../licensecheck/packageinfo.py#L80 )
25
+ [ Show source in packageinfo.py:75 ] ( ../../../licensecheck/packageinfo.py#L75 )
26
26
27
27
Handles retrieval of package info from local installation.
28
28
@@ -34,21 +34,18 @@ class LocalPackageInfo: ...
34
34
35
35
### LocalPackageInfo.get_info
36
36
37
- [ Show source in packageinfo.py:83 ] ( ../../../licensecheck/packageinfo.py#L83 )
37
+ [ Show source in packageinfo.py:78 ] ( ../../../licensecheck/packageinfo.py#L78 )
38
38
39
39
Retrieve package metadata from local installation.
40
40
41
41
#### Arguments
42
42
43
43
- ` package ` * ucstr* - Package name.
44
44
45
- #### Raises
46
-
47
- - ` ModuleNotFoundError ` - If the package is not found locally.
48
-
49
45
#### Returns
50
46
51
- - ` PackageInfo ` - Local package information.
47
+ Type: * PackageInfo*
48
+ Local package information.
52
49
53
50
#### Signature
54
51
@@ -64,7 +61,7 @@ def get_info(package: ucstr) -> PackageInfo: ...
64
61
65
62
### LocalPackageInfo.get_size
66
63
67
- [ Show source in packageinfo.py:116 ] ( ../../../licensecheck/packageinfo.py#L116 )
64
+ [ Show source in packageinfo.py:104 ] ( ../../../licensecheck/packageinfo.py#L104 )
68
65
69
66
Retrieve installed package size.
70
67
@@ -74,7 +71,8 @@ Retrieve installed package size.
74
71
75
72
#### Returns
76
73
77
- - ` int ` - Size in bytes.
74
+ Type: * int*
75
+ Size in bytes.
78
76
79
77
#### Signature
80
78
@@ -104,17 +102,16 @@ class PackageInfoManager:
104
102
105
103
### PackageInfoManager().getPackages
106
104
107
- [ Show source in packageinfo.py:29 ] ( ../../../licensecheck/packageinfo.py#L29 )
105
+ [ Show source in packageinfo.py:34 ] ( ../../../licensecheck/packageinfo.py#L34 )
108
106
109
107
Retrieve package information from local installation or PyPI.
110
108
111
- #### Arguments
112
-
113
- - ` reqs ` * set[ ucstr] * - Set of dependency names to retrieve information for.
109
+ : param set[ ucstr] reqs: Set of dependency names to retrieve information for.
114
110
115
111
#### Returns
116
112
117
- - ` set[PackageInfo] ` - A set of package information objects.
113
+ Type: * set[ PackageInfo] *
114
+ A set of package information objects.
118
115
119
116
#### Signature
120
117
@@ -129,17 +126,18 @@ def getPackages(self, reqs: set[ucstr]) -> set[PackageInfo]: ...
129
126
130
127
### PackageInfoManager().get_package_info
131
128
132
- [ Show source in packageinfo.py:47 ] ( ../../../licensecheck/packageinfo.py#L47 )
129
+ [ Show source in packageinfo.py:48 ] ( ../../../licensecheck/packageinfo.py#L48 )
133
130
134
131
Retrieve package information, preferring local data.
135
132
136
133
#### Arguments
137
134
138
- - ` package ` * ucstr* - Package name.
135
+ - ` pacage ` * ucstr* - Package name.
139
136
140
137
#### Returns
141
138
142
- - ` PackageInfo ` - Information about the package.
139
+ Type: * PackageInfo*
140
+ Information about the package.
143
141
144
142
#### Signature
145
143
@@ -156,7 +154,7 @@ def get_package_info(self, package: ucstr) -> PackageInfo: ...
156
154
157
155
## ProjectMetadata
158
156
159
- [ Show source in packageinfo.py:222 ] ( ../../../licensecheck/packageinfo.py#L222 )
157
+ [ Show source in packageinfo.py:192 ] ( ../../../licensecheck/packageinfo.py#L192 )
160
158
161
159
Handles extraction of project metadata from configuration files.
162
160
@@ -168,13 +166,14 @@ class ProjectMetadata: ...
168
166
169
167
### ProjectMetadata.get_license
170
168
171
- [ Show source in packageinfo.py:250 ] ( ../../../licensecheck/packageinfo.py#L250 )
169
+ [ Show source in packageinfo.py:220 ] ( ../../../licensecheck/packageinfo.py#L220 )
172
170
173
171
Extract license from project metadata.
174
172
175
173
#### Returns
176
174
177
- - ` ucstr ` - License string.
175
+ Type: * ucstr*
176
+ License string.
178
177
179
178
#### Signature
180
179
@@ -189,7 +188,7 @@ def get_license() -> ucstr: ...
189
188
190
189
### ProjectMetadata.get_metadata
191
190
192
- [ Show source in packageinfo.py:225 ] ( ../../../licensecheck/packageinfo.py#L225 )
191
+ [ Show source in packageinfo.py:195 ] ( ../../../licensecheck/packageinfo.py#L195 )
193
192
194
193
Extract project metadata from setup.cfg or pyproject.toml.
195
194
@@ -209,7 +208,7 @@ def get_metadata() -> dict[str, Any]: ...
209
208
210
209
## RemotePackageInfo
211
210
212
- [ Show source in packageinfo.py:131 ] ( ../../../licensecheck/packageinfo.py#L131 )
211
+ [ Show source in packageinfo.py:115 ] ( ../../../licensecheck/packageinfo.py#L115 )
213
212
214
213
Handles retrieval of package info from PyPI.
215
214
@@ -221,7 +220,7 @@ class RemotePackageInfo: ...
221
220
222
221
### RemotePackageInfo.get_info
223
222
224
- [ Show source in packageinfo.py:134 ] ( ../../../licensecheck/packageinfo.py#L134 )
223
+ [ Show source in packageinfo.py:118 ] ( ../../../licensecheck/packageinfo.py#L118 )
225
224
226
225
Retrieve package metadata from PyPI.
227
226
@@ -230,13 +229,10 @@ Retrieve package metadata from PyPI.
230
229
- ` package ` * ucstr* - Package name.
231
230
- ` pypi_api ` * str* - PyPI API base URL.
232
231
233
- #### Raises
234
-
235
- - ` ModuleNotFoundError ` - If package is not found.
236
-
237
232
#### Returns
238
233
239
- - ` PackageInfo ` - Remote package information.
234
+ Type: * PackageInfo*
235
+ Remote package information.
240
236
241
237
#### Signature
242
238
@@ -252,17 +248,16 @@ def get_info(package: ucstr, pypi_api: str) -> PackageInfo: ...
252
248
253
249
### RemotePackageInfo.get_size
254
250
255
- [ Show source in packageinfo.py:171 ] ( ../../../licensecheck/packageinfo.py#L171 )
251
+ [ Show source in packageinfo.py:148 ] ( ../../../licensecheck/packageinfo.py#L148 )
256
252
257
253
Retrieve package size from PyPI metadata.
258
254
259
- #### Arguments
260
-
261
- data (dict[ str, Any] ): PyPI response JSON.
255
+ : param dict[ str, Any] data: PyPI response JSON.
262
256
263
257
#### Returns
264
258
265
- - ` int ` - Package size in bytes.
259
+ Type: * int*
260
+ Package size in bytes.
266
261
267
262
#### Signature
268
263
@@ -275,7 +270,7 @@ def get_size(data: dict[str, Any]) -> int: ...
275
270
276
271
## from_classifiers
277
272
278
- [ Show source in packageinfo.py:203 ] ( ../../../licensecheck/packageinfo.py#L203 )
273
+ [ Show source in packageinfo.py:173 ] ( ../../../licensecheck/packageinfo.py#L173 )
279
274
280
275
Extract license from classifiers.
281
276
@@ -300,18 +295,20 @@ def from_classifiers(classifiers: list[str] | None) -> ucstr: ...
300
295
301
296
## meta_get
302
297
303
- [ Show source in packageinfo.py:186 ] ( ../../../licensecheck/packageinfo.py#L186 )
298
+ [ Show source in packageinfo.py:160 ] ( ../../../licensecheck/packageinfo.py#L160 )
304
299
305
300
Retrieve metadata value safely.
306
301
302
+ : param metadata.PackageMetadata | dict[ str, Any] metadata_obj: Metadata source.
303
+
307
304
#### Arguments
308
305
309
- metadata_obj (metadata.PackageMetadata | dict[ str, Any] ): Metadata source.
310
306
- ` key ` * str* - Metadata key.
311
307
312
308
#### Returns
313
309
314
- - ` str ` - Retrieved metadata value.
310
+ Type: * str*
311
+ Retrieved metadata value.
315
312
316
313
#### Signature
317
314
0 commit comments