Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Update linters #378

Merged
merged 1 commit into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
repos:
- repo: https://github.com/psf/black
rev: 22.10.0
rev: 23.10.1
hooks:
- id: black
args: [--safe, --quiet]
- repo: https://github.com/asottile/blacken-docs
rev: v1.12.1
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies: [black==22.3.0]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -20,7 +20,7 @@ repos:
# - id: isort
# exclude: tests/data
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
args:
Expand Down
1 change: 0 additions & 1 deletion boa/cli/boa.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@


def main(config=None):

parser = argparse.ArgumentParser(
description="Boa, the fast, mamba powered-build tool for conda packages."
)
Expand Down
1 change: 0 additions & 1 deletion boa/cli/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def order_output_dict(d):


def main(docname):

with open(docname, "r") as fi:
lines = fi.readlines()
context = {}
Expand Down
3 changes: 0 additions & 3 deletions boa/core/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ def select_files(files, include_files, exclude_files):


def bundle_conda(metadata, initial_files, env, files_selector=None):

files = post_process_files(metadata, initial_files)

# first filter is so that info_files does not pick up ignored files
Expand Down Expand Up @@ -374,7 +373,6 @@ def bundle_conda(metadata, initial_files, env, files_selector=None):


def write_build_scripts(m, script, build_file):

with utils.path_prepended(m.config.host_prefix):
with utils.path_prepended(m.config.build_prefix):
env = environ.get_dict(m=m)
Expand Down Expand Up @@ -467,7 +465,6 @@ def write_build_scripts(m, script, build_file):


def execute_build_script(m, src_dir, env, provision_only=False):

script_list = utils.ensure_list(m.get_value("build/script", None))
if script_list:
script = "\n".join(script_list)
Expand Down
2 changes: 0 additions & 2 deletions boa/core/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ def build_string_from_metadata(metadata):
("mro", "mro-base", 3),
("mro", "mro-base_impl", 3),
):

for ms in metadata.ms_depends("run"):
for name in ensure_list(names):
if ms.name == name and name in build_pkg_names:
Expand Down Expand Up @@ -97,7 +96,6 @@ def build_string_from_metadata(metadata):


class MetaData:

path: str
uses_new_style_compiler_activation: bool = False
uses_vcs_in_meta: bool = False
Expand Down
1 change: 0 additions & 1 deletion boa/core/recipe_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,6 @@ def set_final_build_id(self, meta, all_outputs):
self.data["build"]["run_exports"] = final_run_exports or None

def finalize_solve(self, all_outputs):

self._solve_env("build", all_outputs)
self._solve_env("host", all_outputs)
self._solve_env("run", all_outputs)
Expand Down
3 changes: 1 addition & 2 deletions boa/core/run_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def recursive_add(target):

sorted_recipes = toposort.toposort(sort_recipes)
num_recipes = len(sorted_recipes)
console.print(f"Found {num_recipes} recipe{'s'[:num_recipes^1]}")
console.print(f"Found {num_recipes} recipe{'s'[:num_recipes ^ 1]}")
for rec in sorted_recipes:
console.print(f" - {rec}")

Expand Down Expand Up @@ -198,7 +198,6 @@ def build_recipe(
rerun_build: bool = False,
pyproject_recipes=False,
):

ydoc = render(recipe_path, config=config, is_pyproject_recipe=pyproject_recipes)
# We need to assemble the variants for each output
variants = {}
Expand Down
1 change: 0 additions & 1 deletion boa/core/variant_arithmetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ def get_dependency_variants(variant_keys, conda_build_config, config):


def apply_variants(output, variants, cbc):

final_outputs = []

# this is all a bit hacky ... will have to clean that up eventually
Expand Down
1 change: 0 additions & 1 deletion boa/schemas/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ class Config:


class About(BaseModel):

# URLs
home: Optional[str] = None
dev_url: Optional[str] = None
Expand Down
2 changes: 0 additions & 2 deletions tests/test_rendering.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ def get_outputs(


def test_variants_zipping():

cbc, sorted_outputs = get_outputs("cbc1.yaml")
assert cbc == {
"python": ["3.6", "3.7", "3.8"],
Expand Down Expand Up @@ -217,7 +216,6 @@ def test_compiler():


def call_render(recipe):

os.chdir(recipe.parent)

print(["boa", "render", str(recipe.resolve()), "--json"])
Expand Down