Skip to content
Open
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
9 changes: 1 addition & 8 deletions conda_smithy/azure_ci_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from vsts.build.v4_1.models import (
BuildDefinition,
BuildDefinitionReference,
BuildRepository,
SourceRepositories,
SourceRepository,
)
Expand Down Expand Up @@ -133,12 +134,6 @@ def get_default_build_definition(
):
import inspect

from vsts.build.v4_1.models import (
BuildDefinition,
BuildRepository,
)
from vsts.task_agent.v4_0.task_agent_client import TaskAgentClient

aclient = TaskAgentClient(config.instance_base_url, config.credentials)

source_repo = get_repo_reference(config, github_org, repo_name)
Expand Down Expand Up @@ -213,8 +208,6 @@ def get_default_build_definition(


def register_repo(github_org, repo_name, config: AzureConfig = default_config):
from vsts.build.v4_1.models import BuildDefinitionReference

bclient = build_client()
build_definition = get_default_build_definition(
github_org,
Expand Down
4 changes: 1 addition & 3 deletions conda_smithy/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ def generate_feedstock_content(
try:
configure_feedstock.copytree(source_recipe_dir, target_recipe_dir)
except Exception as e:
import sys

raise type(e)(
str(e) + f" while copying file {source_recipe_dir}"
).with_traceback(sys.exc_info()[2])
Expand Down Expand Up @@ -570,7 +568,7 @@ class Regenerate(Subcommand):
def __init__(self, parser):
super().__init__(
parser,
"Regenerate / update the CI support files of the " "feedstock.",
"Regenerate / update the CI support files of the feedstock.",
)
scp = self.subcommand_parser
scp.add_argument(
Expand Down
4 changes: 2 additions & 2 deletions conda_smithy/configure_feedstock.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ def _collapse_subpackage_variants(
def _is_config_skipped(config, top_level_loop_vars, list_of_metas):
trimmed_config = {loop_var: config[loop_var] for loop_var in top_level_loop_vars}
logger.debug("checking config: %s", trimmed_config)
for i, meta in enumerate(list_of_metas):
for meta in list_of_metas:
trimmed_meta = {
loop_var: meta.config.variant.get(loop_var)
for loop_var in top_level_loop_vars
Expand Down Expand Up @@ -2271,7 +2271,7 @@ def render_readme(jinja_env, forge_config, forge_dir, render_info=None):

# align new style about with old style about
logger.debug("subpackages_about\n %s", pprint.pformat(subpackages_about))
for i, (name, about) in enumerate(subpackages_about):
for name, about in subpackages_about:
if "repository" in about:
about["dev_url"] = about["repository"]
if "homepage" in about:
Expand Down
5 changes: 1 addition & 4 deletions conda_smithy/feedstock_tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,10 +738,7 @@ def add_feedstock_token_to_azure(user, project, feedstock_token, clobber):
else:
variables = ed.variables

if "FEEDSTOCK_TOKEN" in variables:
have_feedstock_token = True
else:
have_feedstock_token = False
have_feedstock_token = "FEEDSTOCK_TOKEN" in variables

if not have_feedstock_token or (have_feedstock_token and clobber):
variables["FEEDSTOCK_TOKEN"] = BuildDefinitionVariable(
Expand Down
23 changes: 23 additions & 0 deletions news/2518-pylint-finds.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* Small code improvements as pointed out by pylint. (#2518)

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>