Let us walk on the 3-isogeny graph
|
Public Member Functions | |
None | __post_init__ (self) |
Optional["LinkHash"] | find_hash_url_fragment (cls, str url) |
Dict[str, str] | as_dict (self) |
Hashes | as_hashes (self) |
bool | is_hash_allowed (self, Optional[Hashes] hashes) |
Data Fields | |
name | |
Static Public Attributes | |
str | name |
str | value |
Static Protected Attributes | |
_hash_url_fragment_re | |
Links to content may have embedded hash values. This class parses those. `name` must be any member of `_SUPPORTED_HASHES`. This class can be converted to and from `ArchiveInfo`. While ArchiveInfo intends to be JSON-serializable to conform to PEP 610, this class contains the logic for parsing a hash name and value for correctness, and then checking whether that hash conforms to a schema with `.is_hash_allowed()`.
None __post_init__ | ( | self | ) |
Definition at line 69 of file link.py.
References MunitParameterEnum.name, MunitParameter.name, MunitTest.name, MunitArgument_.name, Command.name, ConfigOptionParser.name, TransformedHit.name, _PackageInfo.name, InvalidWheel.name, BaseEntryPoint.name(), BasePath.name(), EntryPoint.name, InstallationCandidate.name, VcsInfo.name, ArchiveInfo.name, DirInfo.name, LinkHash.name, Wheel.name, LazyZipOverHTTP.name(), FrozenRequirement.name, InstallationResult.name, InstallRequirement.name(), InstallRequirement.name, Requirement.name(), Candidate.name(), _InstallRequirementBackedCandidate.name(), _InstallRequirementBackedCandidate.name, AlreadyInstalledCandidate.name, AlreadyInstalledCandidate.name(), ExtrasCandidate.name(), RequiresPythonCandidate.name(), ExplicitRequirement.name(), SpecifierRequirement.name(), RequiresPythonRequirement.name(), UnsatisfiableRequirement.name(), Bazaar.name, Mercurial.name, Subversion.name, VcsSupport.name, VersionControl.name, CodingStateMachineDict.name, Language.name, _Cache.name, Distribution.name, InstalledDistribution.name, EggInfoDistribution.name, LegacyMetadata.name, Metadata.name, ResourceBase.name, ExportEntry.name, Matcher.name, LinuxDistribution.name(), Formatter.name, BBCodeFormatter.name, GroffFormatter.name, HtmlFormatter.name, ImageFormatter.name, GifImageFormatter.name, JpgImageFormatter.name, BmpImageFormatter.name, IRCFormatter.name, LatexFormatter.name, NullFormatter.name, RawTokenFormatter.name, TestcaseFormatter.name, PangoMarkupFormatter.name, RtfFormatter.name, SvgFormatter.name, TerminalFormatter.name, Terminal256Formatter.name, TerminalTrueColorFormatter.name, Lexer.name, PythonLexer.name, Python2Lexer.name, _PythonConsoleLexerBase.name, PythonConsoleLexer.name, PythonTracebackLexer.name, Python2TracebackLexer.name, CythonLexer.name, DgLexer.name, NumPyLexer.name, ParserElement.name(), EditablePartial.name(), ElementState.name, LookupDict.name, Color.name, Emoji.name, Splitter.name, RowSplitter.name, ColumnSplitter.name, Layout.name, Tag.name, StockKeepingUnit.name, _Reader.name(), Frame.name, _LazyDescr.name, _SixMetaPathImporter.name, and Encoding.name.
Dict[str, str] as_dict | ( | self | ) |
Definition at line 82 of file link.py.
References MunitParameterEnum.name, MunitParameter.name, MunitTest.name, MunitArgument_.name, Command.name, ConfigOptionParser.name, TransformedHit.name, _PackageInfo.name, InvalidWheel.name, BaseEntryPoint.name(), BasePath.name(), EntryPoint.name, InstallationCandidate.name, VcsInfo.name, ArchiveInfo.name, DirInfo.name, LinkHash.name, Wheel.name, LazyZipOverHTTP.name(), FrozenRequirement.name, InstallationResult.name, InstallRequirement.name(), InstallRequirement.name, Requirement.name(), Candidate.name(), _InstallRequirementBackedCandidate.name(), _InstallRequirementBackedCandidate.name, AlreadyInstalledCandidate.name, AlreadyInstalledCandidate.name(), ExtrasCandidate.name(), RequiresPythonCandidate.name(), ExplicitRequirement.name(), SpecifierRequirement.name(), RequiresPythonRequirement.name(), UnsatisfiableRequirement.name(), Bazaar.name, Mercurial.name, Subversion.name, VcsSupport.name, VersionControl.name, CodingStateMachineDict.name, Language.name, _Cache.name, Distribution.name, InstalledDistribution.name, EggInfoDistribution.name, LegacyMetadata.name, Metadata.name, ResourceBase.name, ExportEntry.name, Matcher.name, LinuxDistribution.name(), Formatter.name, BBCodeFormatter.name, GroffFormatter.name, HtmlFormatter.name, ImageFormatter.name, GifImageFormatter.name, JpgImageFormatter.name, BmpImageFormatter.name, IRCFormatter.name, LatexFormatter.name, NullFormatter.name, RawTokenFormatter.name, TestcaseFormatter.name, PangoMarkupFormatter.name, RtfFormatter.name, SvgFormatter.name, TerminalFormatter.name, Terminal256Formatter.name, TerminalTrueColorFormatter.name, Lexer.name, PythonLexer.name, Python2Lexer.name, _PythonConsoleLexerBase.name, PythonConsoleLexer.name, PythonTracebackLexer.name, Python2TracebackLexer.name, CythonLexer.name, DgLexer.name, NumPyLexer.name, ParserElement.name(), EditablePartial.name(), ElementState.name, LookupDict.name, Color.name, Emoji.name, Splitter.name, RowSplitter.name, ColumnSplitter.name, Layout.name, Tag.name, StockKeepingUnit.name, _Reader.name(), Frame.name, _LazyDescr.name, _SixMetaPathImporter.name, Encoding.name, MunitParameter.value, BaseEntryPoint.value(), EntryPoint.value, LinkHash.value, ExportEntry.value(), Node.value, and Inspect.value.
Hashes as_hashes | ( | self | ) |
Return a Hashes instance which checks only for the current hash.
Definition at line 85 of file link.py.
References MunitParameterEnum.name, MunitParameter.name, MunitTest.name, MunitArgument_.name, Command.name, ConfigOptionParser.name, TransformedHit.name, _PackageInfo.name, InvalidWheel.name, BaseEntryPoint.name(), BasePath.name(), EntryPoint.name, InstallationCandidate.name, VcsInfo.name, ArchiveInfo.name, DirInfo.name, LinkHash.name, Wheel.name, LazyZipOverHTTP.name(), FrozenRequirement.name, InstallationResult.name, InstallRequirement.name(), InstallRequirement.name, Requirement.name(), Candidate.name(), _InstallRequirementBackedCandidate.name(), _InstallRequirementBackedCandidate.name, AlreadyInstalledCandidate.name, AlreadyInstalledCandidate.name(), ExtrasCandidate.name(), RequiresPythonCandidate.name(), ExplicitRequirement.name(), SpecifierRequirement.name(), RequiresPythonRequirement.name(), UnsatisfiableRequirement.name(), Bazaar.name, Mercurial.name, Subversion.name, VcsSupport.name, VersionControl.name, CodingStateMachineDict.name, Language.name, _Cache.name, Distribution.name, InstalledDistribution.name, EggInfoDistribution.name, LegacyMetadata.name, Metadata.name, ResourceBase.name, ExportEntry.name, Matcher.name, LinuxDistribution.name(), Formatter.name, BBCodeFormatter.name, GroffFormatter.name, HtmlFormatter.name, ImageFormatter.name, GifImageFormatter.name, JpgImageFormatter.name, BmpImageFormatter.name, IRCFormatter.name, LatexFormatter.name, NullFormatter.name, RawTokenFormatter.name, TestcaseFormatter.name, PangoMarkupFormatter.name, RtfFormatter.name, SvgFormatter.name, TerminalFormatter.name, Terminal256Formatter.name, TerminalTrueColorFormatter.name, Lexer.name, PythonLexer.name, Python2Lexer.name, _PythonConsoleLexerBase.name, PythonConsoleLexer.name, PythonTracebackLexer.name, Python2TracebackLexer.name, CythonLexer.name, DgLexer.name, NumPyLexer.name, ParserElement.name(), EditablePartial.name(), ElementState.name, LookupDict.name, Color.name, Emoji.name, Splitter.name, RowSplitter.name, ColumnSplitter.name, Layout.name, Tag.name, StockKeepingUnit.name, _Reader.name(), Frame.name, _LazyDescr.name, _SixMetaPathImporter.name, Encoding.name, MunitParameter.value, BaseEntryPoint.value(), EntryPoint.value, LinkHash.value, ExportEntry.value(), Node.value, and Inspect.value.
Optional["LinkHash"] find_hash_url_fragment | ( | cls, | |
str | url | ||
) |
Search a string for a checksum algorithm name and encoded output value.
Definition at line 74 of file link.py.
References LinkHash._hash_url_fragment_re, and i.
bool is_hash_allowed | ( | self, | |
Optional[Hashes] | hashes | ||
) |
Return True if the current hash is allowed by `hashes`.
Definition at line 89 of file link.py.
Referenced by Hashes.has_one_of().
|
staticprotected |
Definition at line 58 of file link.py.
Referenced by LinkHash.find_hash_url_fragment().
|
static |
Definition at line 55 of file link.py.
Referenced by AlreadyInstalledCandidate.__eq__(), Distribution.__eq__(), ExportEntry.__eq__(), _LazyDescr.__get__(), Distribution.__hash__(), ElementState.__init__(), Requirement.__init__(), LinkHash.__post_init__(), InstallationCandidate.__repr__(), Distribution.__repr__(), Metadata.__repr__(), ExportEntry.__repr__(), Encoding.__repr__(), Color.__rich_repr__(), Layout.__rich_repr__(), InstallationCandidate.__str__(), InstalledDistribution.__str__(), EggInfoDistribution.__str__(), Requirement.__str__(), ParserElement.__str__(), Tag.__str__(), _SixMetaPathImporter._add_module(), Matcher._check_compatible(), InstallRequirement._get_archive_name(), Wheel._get_extensions(), _SixMetaPathImporter._get_module(), ConfigOptionParser._get_ordered_configuration_items(), Distribution._get_requirements(), _Cache.add(), InstallRequirement.archive(), LinkHash.as_dict(), LinkHash.as_hashes(), Wheel.build(), _Cache.clear(), Wheel.filename(), Layout.get(), InstallRequirement.get_dist(), InstalledDistribution.get_distinfo_file(), RequirementCommand.get_requirements(), Wheel.get_wheel_metadata(), InstallRequirement.install(), Wheel.install(), SpecifierRequirement.is_satisfied_by(), LinuxDistribution.linux_distribution(), Wheel.metadata(), Distribution.name_and_version(), InstallRequirement.prepare_metadata(), Distribution.provides(), Metadata.provides(), VcsSupport.register(), VersionControl.run_command(), InstallRequirement.uninstall(), Wheel.update(), and Wheel.verify().
name |
Definition at line 95 of file link.py.
Referenced by AlreadyInstalledCandidate.__eq__(), Distribution.__eq__(), ExportEntry.__eq__(), _LazyDescr.__get__(), Distribution.__hash__(), ElementState.__init__(), Requirement.__init__(), LinkHash.__post_init__(), InstallationCandidate.__repr__(), Distribution.__repr__(), Metadata.__repr__(), ExportEntry.__repr__(), Encoding.__repr__(), Color.__rich_repr__(), Layout.__rich_repr__(), InstallationCandidate.__str__(), InstalledDistribution.__str__(), EggInfoDistribution.__str__(), Requirement.__str__(), ParserElement.__str__(), Tag.__str__(), _SixMetaPathImporter._add_module(), Matcher._check_compatible(), InstallRequirement._get_archive_name(), Wheel._get_extensions(), _SixMetaPathImporter._get_module(), ConfigOptionParser._get_ordered_configuration_items(), Distribution._get_requirements(), _Cache.add(), InstallRequirement.archive(), LinkHash.as_dict(), LinkHash.as_hashes(), Wheel.build(), _Cache.clear(), Wheel.filename(), Layout.get(), InstallRequirement.get_dist(), InstalledDistribution.get_distinfo_file(), RequirementCommand.get_requirements(), Wheel.get_wheel_metadata(), InstallRequirement.install(), Wheel.install(), SpecifierRequirement.is_satisfied_by(), LinuxDistribution.linux_distribution(), Wheel.metadata(), Distribution.name_and_version(), InstallRequirement.prepare_metadata(), Distribution.provides(), Metadata.provides(), VcsSupport.register(), VersionControl.run_command(), InstallRequirement.uninstall(), Wheel.update(), and Wheel.verify().
|
static |
Definition at line 56 of file link.py.
Referenced by Node.__str__(), Inspect._render(), LinkHash.as_dict(), and LinkHash.as_hashes().