Skip to content

Commit

Permalink
ci: fix misc lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ahal committed Dec 18, 2023
1 parent 26efabe commit 139cafe
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
1 change: 1 addition & 0 deletions .codespell-ignore-words.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
fo
pullrequests
2 changes: 1 addition & 1 deletion docs/concepts/optimization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ hash of the inputs to the task. In the diagram above, if both ``A`` and ``B`` ar
replaced with existing tasks, then ``D`` is a candidate for replacement. But if
``B`` has no replacement, then replacement of ``D`` will not be considered.

It is possible to replace a task with nothing. This is similar to optimzing
It is possible to replace a task with nothing. This is similar to optimizing
away, but is useful for utility tasks (possibly like ``G``). If such a task is
considered for replacement, then all of its dependencies (here, ``D``) have
already been replaced and there is no utility in running the task and no need
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/optimization-strategies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Optimization Strategies
=======================

Taskgraph provides some built-in strategies that can be used during the
:doc:`optimzation process </concepts/optimization>`.
:doc:`optimization process </concepts/optimization>`.

Strategies for Removing Tasks
-----------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/taskgraph/transforms/run/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
logger = logging.getLogger(__name__)

# Fetches may be accepted in other transforms and eventually passed along
# to a `task` (eg: from_deps). Defining this here allows them to re-use
# to a `task` (eg: from_deps). Defining this here allows them to reuse
# the schema and avoid duplication.
fetches_schema = {
Required("artifact"): str,
Expand Down
2 changes: 1 addition & 1 deletion src/taskgraph/transforms/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def verify_index(config, index):
{
# only one type is supported by any of the workers right now
"type": "persistent",
# name of the cache, allowing re-use by subsequent tasks naming the
# name of the cache, allowing reuse by subsequent tasks naming the
# same cache
"name": str,
# location in the task image where the cache will be mounted
Expand Down
5 changes: 2 additions & 3 deletions src/taskgraph/util/cached_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,9 @@ def add_optimization(
index_routes.append(TARGET_CACHE_INDEX.format(**subs))

# Pull requests use a different target cache index route. This way we can
# be confident they won't be used by anything other than other pull
# requests.
# be confident they won't be used by anything other than the pull request
# that created the cache in the first place.
if config.params["tasks_for"].startswith("github-pull-request"):
# Check the PR bucket first.
subs["head_ref"] = config.params["head_ref"]
if subs["head_ref"].startswith("refs/heads/"):
subs["head_ref"] = subs["head_ref"][11:]
Expand Down
2 changes: 1 addition & 1 deletion src/taskgraph/util/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def _quote(s):
As a special case, if given an int, returns a string containing the int,
not enclosed in quotes.
"""
if type(s) == int:
if isinstance(s, int):
return "%d" % s

# Empty strings need to be quoted to have any significance
Expand Down
2 changes: 1 addition & 1 deletion src/taskgraph/util/vcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


class Repository(ABC):
# Both mercurial and git use sha1 as revision idenfiers. Luckily, both define
# Both mercurial and git use sha1 as revision identifiers. Luckily, both define
# the same value as the null revision.
#
# https://github.com/git/git/blob/dc04167d378fb29d30e1647ff6ff51dd182bc9a3/t/oid-info/hash-info#L7
Expand Down

0 comments on commit 139cafe

Please sign in to comment.