mirror of https://github.com/mamba-org/mamba.git
Update pre-commit hooks (#2586)
This commit is contained in:
parent
59ac1d6895
commit
48d595ae45
|
@ -1,12 +1,12 @@
|
|||
exclude: libmamba/tests/data/repodata_json_cache*
|
||||
repos:
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 22.12.0
|
||||
rev: 23.3.0
|
||||
hooks:
|
||||
- id: black
|
||||
args: [--safe, --quiet]
|
||||
- repo: https://github.com/asottile/blacken-docs
|
||||
rev: v1.12.1
|
||||
rev: 1.13.0
|
||||
hooks:
|
||||
- id: blacken-docs
|
||||
additional_dependencies: [black==22.3.0]
|
||||
|
@ -42,7 +42,7 @@ repos:
|
|||
- flake8-bugbear==22.10.27
|
||||
- flake8-isort==5.0.0
|
||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||
rev: v15.0.6
|
||||
rev: v16.0.4
|
||||
hooks:
|
||||
- id: clang-format
|
||||
args: [--style=file]
|
||||
|
|
|
@ -120,7 +120,6 @@ class Mermaid(Directive):
|
|||
return mmcode
|
||||
|
||||
def run(self):
|
||||
|
||||
node = mermaid()
|
||||
node["code"] = self.get_mm_code()
|
||||
node["options"] = {}
|
||||
|
|
|
@ -57,7 +57,6 @@ def normalize_keys(keys: KeySet) -> KeySet:
|
|||
|
||||
|
||||
class RepoSigner:
|
||||
|
||||
keys = {
|
||||
"root": [],
|
||||
"key_mgr": [
|
||||
|
@ -134,7 +133,6 @@ class RepoSigner:
|
|||
print("[reposigner] Root metadata signed & verified!")
|
||||
|
||||
def create_key_mgr(self, keys):
|
||||
|
||||
private_key_key_mgr = cct_common.PrivateKey.from_hex(
|
||||
keys["key_mgr"][0]["private"]
|
||||
)
|
||||
|
@ -197,7 +195,6 @@ class RepoSigner:
|
|||
|
||||
|
||||
class ChannelHandler(SimpleHTTPRequestHandler):
|
||||
|
||||
url_pattern = re.compile(r"^/(?:t/[^/]+/)?([^/]+)")
|
||||
|
||||
def do_GET(self) -> None:
|
||||
|
|
|
@ -448,7 +448,6 @@ def first_cache_is_writable():
|
|||
|
||||
|
||||
def link_dir(new_dir, existing_dir, prefixes=None):
|
||||
|
||||
for i in existing_dir.iterdir():
|
||||
if i.is_dir():
|
||||
subdir = new_dir / i.name
|
||||
|
|
|
@ -191,7 +191,6 @@ def call_interpreter(s, tmp_path, interpreter, interactive=False, env=None):
|
|||
encoding="utf-8",
|
||||
)
|
||||
except subprocess.CalledProcessError as e:
|
||||
|
||||
stdout = e.stdout.strip()
|
||||
stderr = e.stderr.strip()
|
||||
|
||||
|
|
|
@ -248,7 +248,6 @@ class TestConfigList:
|
|||
os.environ.pop("MAMBA_OFFLINE")
|
||||
|
||||
def test_no_env(self):
|
||||
|
||||
os.environ["MAMBA_OFFLINE"] = "false"
|
||||
|
||||
assert (
|
||||
|
|
|
@ -29,7 +29,6 @@ def constructor(*args, default_channel=True, no_rc=True, no_dry_run=False):
|
|||
|
||||
|
||||
class TestInstall:
|
||||
|
||||
current_root_prefix = os.environ["MAMBA_ROOT_PREFIX"]
|
||||
current_prefix = os.environ["CONDA_PREFIX"]
|
||||
cache = os.path.join(current_root_prefix, "pkgs")
|
||||
|
|
|
@ -9,7 +9,6 @@ from .helpers import *
|
|||
|
||||
|
||||
class TestInstall:
|
||||
|
||||
current_root_prefix = os.environ["MAMBA_ROOT_PREFIX"]
|
||||
current_prefix = os.environ["CONDA_PREFIX"]
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@ else:
|
|||
|
||||
|
||||
class TestLinking:
|
||||
|
||||
current_root_prefix = os.environ["MAMBA_ROOT_PREFIX"]
|
||||
current_prefix = os.environ["CONDA_PREFIX"]
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ def simple_short_program():
|
|||
|
||||
|
||||
class TestRun:
|
||||
|
||||
current_root_prefix = os.environ["MAMBA_ROOT_PREFIX"]
|
||||
current_prefix = os.environ["CONDA_PREFIX"]
|
||||
|
||||
|
@ -49,7 +48,6 @@ class TestRun:
|
|||
@pytest.mark.parametrize("option_flag", common_simple_flags)
|
||||
@pytest.mark.parametrize("make_label_flags", next_label_flags)
|
||||
def test_unknown_exe_fails(self, option_flag, make_label_flags):
|
||||
|
||||
fails = True
|
||||
try:
|
||||
umamba_run(option_flag, *make_label_flags(), "exe-that-does-not-exists")
|
||||
|
|
|
@ -32,7 +32,6 @@ def skip_if_shell_incompat(shell_type):
|
|||
|
||||
|
||||
class TestShell:
|
||||
|
||||
current_root_prefix = os.environ["MAMBA_ROOT_PREFIX"]
|
||||
current_prefix = os.environ["CONDA_PREFIX"]
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ from .helpers import *
|
|||
|
||||
@pytest.mark.skipif(dry_run_tests == DryRun.ULTRA_DRY, reason="Running ultra dry tests")
|
||||
class TestUpdate:
|
||||
|
||||
current_root_prefix = os.environ["MAMBA_ROOT_PREFIX"]
|
||||
current_prefix = os.environ["CONDA_PREFIX"]
|
||||
|
||||
|
@ -204,7 +203,6 @@ class TestUpdate:
|
|||
|
||||
|
||||
class TestUpdateConfig:
|
||||
|
||||
current_root_prefix = os.environ["MAMBA_ROOT_PREFIX"]
|
||||
current_prefix = os.environ["CONDA_PREFIX"]
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ from .helpers import info
|
|||
|
||||
class TestVirtualPkgs:
|
||||
def test_virtual_packages(self):
|
||||
|
||||
infos = info()
|
||||
|
||||
assert "virtual packages :" in infos
|
||||
|
|
|
@ -54,7 +54,6 @@ def apply_changelog(name, version, changes):
|
|||
|
||||
|
||||
def commands(changes):
|
||||
|
||||
commit_msg = ", ".join([f"{x} {changes[x]['version']}" for x in changes])
|
||||
|
||||
today = datetime.date.today()
|
||||
|
@ -134,7 +133,6 @@ def main():
|
|||
|
||||
contents = contents[release_start:]
|
||||
for idx, c in enumerate(contents):
|
||||
|
||||
if c.startswith("Releases"):
|
||||
releases = [x.strip() for x in c[len("Releases: ") :].split(",")]
|
||||
for r in releases:
|
||||
|
|
Loading…
Reference in New Issue