mirror of https://github.com/mamba-org/mamba.git
Update pre-commit versions
This commit is contained in:
parent
32e5056cbf
commit
3719781cdf
|
@ -1,16 +1,16 @@
|
|||
repos:
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 19.10b0
|
||||
rev: 21.12b0
|
||||
hooks:
|
||||
- id: black
|
||||
args: [--safe, --quiet]
|
||||
- repo: https://github.com/asottile/blacken-docs
|
||||
rev: v1.7.0
|
||||
rev: v1.12.0
|
||||
hooks:
|
||||
- id: blacken-docs
|
||||
additional_dependencies: [black==19.10b0]
|
||||
additional_dependencies: [black==21.12b0]
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v3.2.0
|
||||
rev: v4.1.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: end-of-file-fixer
|
||||
|
@ -26,20 +26,20 @@ repos:
|
|||
- id: debug-statements
|
||||
language_version: python3
|
||||
- repo: https://github.com/pre-commit/mirrors-isort
|
||||
rev: v5.2.2
|
||||
rev: v5.10.1
|
||||
hooks:
|
||||
- id: isort
|
||||
exclude: tests/data
|
||||
- repo: https://gitlab.com/pycqa/flake8
|
||||
rev: 3.8.3
|
||||
rev: 4.0.1
|
||||
hooks:
|
||||
- id: flake8
|
||||
language_version: python3
|
||||
additional_dependencies:
|
||||
- flake8-typing-imports==1.9.0
|
||||
- flake8-typing-imports==1.12.0
|
||||
- flake8-builtins==1.5.3
|
||||
- flake8-bugbear==20.1.4
|
||||
- flake8-isort==3.0.1
|
||||
- flake8-bugbear==22.1.11
|
||||
- flake8-isort==4.1.1
|
||||
- repo: https://github.com/bmorcos/pre-commit-hooks-cpp
|
||||
rev: master
|
||||
hooks:
|
||||
|
|
|
@ -262,7 +262,10 @@ def latex_visit_mermaid_inheritance(
|
|||
graph_hash = get_graph_hash(node)
|
||||
name = "inheritance%s" % graph_hash
|
||||
|
||||
dotcode = graph.generate_dot(name, env=self.builder.env,)
|
||||
dotcode = graph.generate_dot(
|
||||
name,
|
||||
env=self.builder.env,
|
||||
)
|
||||
# graph_attrs={'size': '"6.0,6.0"'})
|
||||
render_mm_latex(self, node, dotcode, {}, "inheritance")
|
||||
raise nodes.SkipNode
|
||||
|
@ -279,7 +282,10 @@ def texinfo_visit_mermaid_inheritance(
|
|||
graph_hash = get_graph_hash(node)
|
||||
name = "inheritance%s" % graph_hash
|
||||
|
||||
dotcode = graph.generate_dot(name, env=self.builder.env,)
|
||||
dotcode = graph.generate_dot(
|
||||
name,
|
||||
env=self.builder.env,
|
||||
)
|
||||
# graph_attrs={'size': '"6.0,6.0"'})
|
||||
render_mm_texinfo(self, node, dotcode, {}, "inheritance")
|
||||
raise nodes.SkipNode
|
||||
|
|
|
@ -767,7 +767,10 @@ def configure_clean_locks(sub_parsers):
|
|||
g.title: g for g in sub_parsers.choices["clean"]._action_groups
|
||||
}["Removal Targets"]
|
||||
removal_target_options.add_argument(
|
||||
"-l", "--locks", action="store_true", help="Remove lock files.",
|
||||
"-l",
|
||||
"--locks",
|
||||
action="store_true",
|
||||
help="Remove lock files.",
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -380,7 +380,10 @@ def compute_final_precs(
|
|||
|
||||
|
||||
def to_txn_precs(
|
||||
specs_to_add, specs_to_remove, prefix, final_precs,
|
||||
specs_to_add,
|
||||
specs_to_remove,
|
||||
prefix,
|
||||
final_precs,
|
||||
):
|
||||
unlink_precs, link_precs = diff_for_unlink_link_precs(
|
||||
prefix,
|
||||
|
@ -413,6 +416,15 @@ def to_txn(
|
|||
):
|
||||
prefix_data = PrefixData(prefix)
|
||||
final_precs = compute_final_precs(
|
||||
prefix_data.iter_records(), to_link, to_unlink, installed_pkg_recs, index,
|
||||
prefix_data.iter_records(),
|
||||
to_link,
|
||||
to_unlink,
|
||||
installed_pkg_recs,
|
||||
index,
|
||||
)
|
||||
return to_txn_precs(
|
||||
specs_to_add,
|
||||
specs_to_remove,
|
||||
prefix,
|
||||
final_precs,
|
||||
)
|
||||
return to_txn_precs(specs_to_add, specs_to_remove, prefix, final_precs,)
|
||||
|
|
|
@ -23,7 +23,9 @@ data_files = [
|
|||
("etc/profile.d", ["mamba/shell_templates/mamba.sh"]),
|
||||
]
|
||||
if sys.platform == "win32":
|
||||
data_files.append(("condabin", ["mamba/shell_templates/mamba.bat"]),)
|
||||
data_files.append(
|
||||
("condabin", ["mamba/shell_templates/mamba.bat"]),
|
||||
)
|
||||
data_files.append(
|
||||
("Library/bin", ["mamba/shell_templates/win_redirect/mamba.bat"]),
|
||||
)
|
||||
|
|
|
@ -672,7 +672,10 @@ class TestActivation:
|
|||
assert find_path_in_str(str(rp / "envs" / u1), res["PATH"])
|
||||
assert find_path_in_str(str(rp / "envs" / u2), res["PATH"])
|
||||
|
||||
s = ["micromamba activate", f"micromamba activate '{u3}'",] + evars
|
||||
s = [
|
||||
"micromamba activate",
|
||||
f"micromamba activate '{u3}'",
|
||||
] + evars
|
||||
stdout, stderr = call(s)
|
||||
res = TestActivation.to_dict(stdout)
|
||||
assert find_path_in_str(str(rp / "condabin"), res["PATH"])
|
||||
|
|
|
@ -80,7 +80,11 @@ class TestConfigSources:
|
|||
|
||||
os.makedirs(TestConfigSources.root_prefix, exist_ok=False)
|
||||
create(
|
||||
"-n", TestConfigSources.env_name, "--json", "--offline", no_dry_run=True,
|
||||
"-n",
|
||||
TestConfigSources.env_name,
|
||||
"--json",
|
||||
"--offline",
|
||||
no_dry_run=True,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
|
@ -148,7 +152,15 @@ class TestConfigSources:
|
|||
with open(os.path.expanduser(rc_file), "w") as f:
|
||||
f.write("override_channels_enabled: true")
|
||||
|
||||
srcs = config("sources", "-n", TestConfigSources.env_name,).strip().splitlines()
|
||||
srcs = (
|
||||
config(
|
||||
"sources",
|
||||
"-n",
|
||||
TestConfigSources.env_name,
|
||||
)
|
||||
.strip()
|
||||
.splitlines()
|
||||
)
|
||||
short_name = rc_file.replace(os.path.expanduser("~"), "~")
|
||||
expected_srcs = (
|
||||
f"Configuration files (by precedence order):\n{short_name}".splitlines()
|
||||
|
@ -314,7 +326,12 @@ class TestConfigList:
|
|||
)
|
||||
assert (
|
||||
config(
|
||||
"list", "offline", "--no-rc", "--no-env", "-s", "--offline",
|
||||
"list",
|
||||
"offline",
|
||||
"--no-rc",
|
||||
"--no-env",
|
||||
"-s",
|
||||
"--offline",
|
||||
).splitlines()
|
||||
== "offline: true # 'CLI'".splitlines()
|
||||
)
|
||||
|
|
|
@ -32,7 +32,13 @@ class TestEnv:
|
|||
if cls.env_txt.exists():
|
||||
cls.env_txt.rename(cls.env_txt_bkup)
|
||||
|
||||
res = create(f"", "-n", cls.env_name_1, "--json", no_dry_run=True,)
|
||||
res = create(
|
||||
f"",
|
||||
"-n",
|
||||
cls.env_name_1,
|
||||
"--json",
|
||||
no_dry_run=True,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def setup(cls):
|
||||
|
@ -83,8 +89,20 @@ class TestEnv:
|
|||
|
||||
def test_register_new_env(self):
|
||||
|
||||
res = create(f"", "-n", self.env_name_2, "--json", no_dry_run=True,)
|
||||
res = create(f"", "-n", self.env_name_3, "--json", no_dry_run=True,)
|
||||
res = create(
|
||||
f"",
|
||||
"-n",
|
||||
self.env_name_2,
|
||||
"--json",
|
||||
no_dry_run=True,
|
||||
)
|
||||
res = create(
|
||||
f"",
|
||||
"-n",
|
||||
self.env_name_3,
|
||||
"--json",
|
||||
no_dry_run=True,
|
||||
)
|
||||
|
||||
env_json = run_env("list", "--json")
|
||||
env_2_fp = str(self.root_prefix / "envs" / self.env_name_2)
|
||||
|
|
|
@ -58,7 +58,9 @@ class TestList:
|
|||
def test_not_environment(self):
|
||||
with pytest.raises(subprocess.CalledProcessError):
|
||||
umamba_list(
|
||||
"-p", os.path.join(TestList.root_prefix, "envs"), "--json",
|
||||
"-p",
|
||||
os.path.join(TestList.root_prefix, "envs"),
|
||||
"--json",
|
||||
)
|
||||
|
||||
@pytest.mark.parametrize("quiet_flag", ["", "-q", "--quiet"])
|
||||
|
|
|
@ -304,7 +304,13 @@ class TestMultiplePkgCaches:
|
|||
os.environ["CONDA_PKGS_DIRS"] = f"{cache1},{cache2}"
|
||||
env_name = TestMultiplePkgCaches.env_name
|
||||
|
||||
res = create("-n", env_name, "xtensor", "--json", no_dry_run=True,)
|
||||
res = create(
|
||||
"-n",
|
||||
env_name,
|
||||
"xtensor",
|
||||
"--json",
|
||||
no_dry_run=True,
|
||||
)
|
||||
|
||||
linked_file = get_env(env_name, xtensor_hpp)
|
||||
assert linked_file.exists()
|
||||
|
|
Loading…
Reference in New Issue