We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e7b968 commit ae9ca43Copy full SHA for ae9ca43
importlib_metadata/__init__.py
@@ -3,8 +3,10 @@
3
import abc
4
import csv
5
import sys
6
+import json
7
import zipp
8
import email
9
+import types
10
import inspect
11
import pathlib
12
import operator
@@ -618,6 +620,16 @@ def url_req_space(req):
618
620
space = url_req_space(section.value)
619
621
yield section.value + space + quoted_marker(section.name)
622
623
+ @property
624
+ def origin(self):
625
+ return self._load_json('direct_url.json')
626
+
627
+ def _load_json(self, filename):
628
+ return pass_none(json.loads)(
629
+ self.read_text(filename),
630
+ object_hook=lambda data: types.SimpleNamespace(**data),
631
+ )
632
633
634
class DistributionFinder(MetaPathFinder):
635
"""
0 commit comments