docs: strip non-essential comments, fold key facts into docstrings

This commit is contained in:
imSp4rky
2026-08-16 23:32:02 -06:00
parent 66bcbe9377
commit 511f96d8db
81 changed files with 204 additions and 1017 deletions
-7
View File
@@ -1,23 +1,16 @@
# Clone from https://github.com/keis/base58
"""Base58 encoding
Implementations of Base58 and Base58Check encodings that are compatible
with the bitcoin network.
"""
# This module is based upon base58 snippets found scattered over many bitcoin
# tools written in python. From what I gather the original source is from a
# forum post by Gavin Andresen, so direct your praise to him.
# This module adds shiny packaging and support for python3.
from functools import lru_cache
from hashlib import sha256
from typing import Mapping, Union
__version__ = "2.1.1"
# 58 character alphabet used
BITCOIN_ALPHABET = b"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
RIPPLE_ALPHABET = b"rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz"
XRP_ALPHABET = RIPPLE_ALPHABET
-2
View File
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
base62
~~~~~~
@@ -40,7 +39,6 @@ def encodebytes(barray, charset=CHARSET_DEFAULT):
check_type(barray, bytes)
# Count the number of leading zeros.
leading_zeros_count = 0
for i in range(len(barray)):
if barray[i] != 0:
-3
View File
@@ -6,7 +6,6 @@ def get_os_arch(name: str) -> str:
os_name = platform.system().lower()
os_arch = platform.machine().lower()
# Map platform.system() output to desired OS name
if os_name == "windows":
os_name = "win"
elif os_name == "darwin":
@@ -14,11 +13,9 @@ def get_os_arch(name: str) -> str:
else:
os_name = "linux"
# Map platform.machine() output to desired architecture
if os_arch in ["x86_64", "amd64"]:
os_arch = "x64"
elif os_arch == "arm64":
os_arch = "arm64"
# Construct the dependency name in the desired format using the input name
return f"{name}-{os_name}-{os_arch}"