This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fluent(bound_method, /, *args, **kwargs): | |
"""Call a bound method and return `self` from that method.""" | |
bound_method(*args, **kwargs) | |
return bound_method.__self__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import functools | |
from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar | |
from .requirements import Requirement | |
from .specifiers import SpecifierSet | |
from .utils import NormalizedName, canonicalize_name | |
from .version import Version | |
_T = TypeVar("_T") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pathlib | |
from typing import Any, Dict, Iterable, List, Optional, Tuple, Union | |
from .requirements import Requirement | |
from .specifiers import SpecifierSet | |
from .utils import NormalizedName, canonicalize_name | |
from .version import Version | |
class Metadata: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Back in my day, we only needed **one** command. 🧓""" | |
import runpy | |
import sys | |
def run(command): | |
sys.argv[0] = command | |
runpy.run_module(command, run_name="__main__") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cross_compiling=yes | |
ac_cv_file__dev_ptmx=no | |
ac_cv_file__dev_ptc=no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"__future__": [], | |
"_xxsubinterpreters": [], | |
"abc": ["_abc", "_py_abc"], | |
"aifc": [], | |
"antigravity": [], | |
"argparse": [], | |
"array": [], | |
"ast": ["_ast"], | |
"asynchat": [], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PowTest: | |
def __init__(self, name): | |
self.name = name | |
def __ipow__(self, _): | |
print(f"{self.name}.__ipow__") | |
return NotImplemented | |
def __pow__(self, _): | |
print(f"{self.name}.__pow__") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE issues ( | |
recording_date TEXT NOT NULL DEFAULT CURRENT_DATE, | |
gh_num INTEGER NOT NULL CHECK(gh_num >= 1), | |
url TEXT NOT NULL, | |
title TEXT NOT NULL, | |
created TEXT NOT NULL, -- Date of issue creation | |
by_team INT NOT NULL DEFAULT 0 CHECK(upvotes >= 0), | |
assignee TEXT NULL, -- Who the issue is assigned to | |
last_OP_comment TEXT NULL, -- When the last comment from the OP was |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Get VS Code versions | |
run: curl --output vscode-stable-versions.json https://update.code.visualstudio.com/api/releases/stable | |
- uses: actions/cache@v1 | |
with: | |
path: .vscode-test/ | |
key: ${{ runner.os }}-vscode-test-${{ hashFiles('vscode-stable-versions.json') }} | |
restore-keys: | | |
${{ runner.os }}-vscode-test- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import packaging.tags | |
def parse_wheel_filename(path): | |
name = os.path.splitext(_compat.fspath(path))[0] | |
index = len(name) | |
for _ in range(3): # interpreter, ABI, platform. | |
index = name.rindex("-", 0, index) | |
return packaging.tags.parse_tag(name[index + 1 :]) | |
NewerOlder