Skip to content

Commit 179c95e

Browse files
committed
Fix black, mypy, and flake8 issue.
1 parent bfff404 commit 179c95e

File tree

27 files changed

+8
-39
lines changed

27 files changed

+8
-39
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ repos:
1919
- id: mypy
2020
files: '\.py$'
2121
exclude: '^tests/.+$'
22+
additional_dependencies:
23+
- types-python-dateutil
24+
- types-PyYAML
25+
- types-requests
26+
- types-setuptools

src/e3/anod/context.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,6 @@ def decision_error(cls, action: Action, decision: Decision) -> NoReturn:
804804
Decision.LEFT,
805805
Decision.RIGHT,
806806
):
807-
808807
if decision.expected_choice == BuildOrDownload.BUILD:
809808
msg = (
810809
"A spec in the plan has a build_tree dependency"

src/e3/anod/deps.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ def __str__(self) -> str:
3131

3232

3333
class Dependency:
34-
3534
kind: DEPENDENCY_PRIMITIVE
3635

3736
def __init__(

src/e3/anod/error.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
from typing import Optional
99
from e3.os.process import Run
1010

11-
assert Run # Make pyflakes happy?
12-
1311

1412
class AnodError(e3.error.E3Error):
1513
"""Base Anod error."""

src/e3/anod/package.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ class SharedSource(Source):
188188

189189

190190
class SourceBuilder:
191-
192191
DEFAULT_PATCH_CMD: Final = 1
193192

194193
def __init__(

src/e3/anod/queries.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ def compute_closure(self, spec: Anod, publish: bool) -> None:
141141

142142
# Follow dependencies
143143
for dep, dep_spec in list(self.context.dependencies[spec.uid].values()):
144-
145144
# Only consider build and install dependency (discard source deps)
146145
if dep.kind in ("build", "install", "download"):
147146
if dep_spec.kind == "install":

src/e3/anod/sandbox/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def get_configuration(self) -> dict:
147147
return yaml.safe_load(f)
148148

149149
def write_scripts(self) -> None:
150-
from setuptools.command.easy_install import get_script_args
150+
from setuptools.command.easy_install import get_script_args # type: ignore[attr-defined]
151151

152152
# Retrieve sandbox_scripts entry points
153153
e3_distrib = get_distribution("e3-core")

src/e3/anod/sandbox/action.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525

2626
class SandBoxAction(metaclass=abc.ABCMeta):
27-
2827
require_sandbox = True
2928

3029
def __init__(self, subparsers):
@@ -61,7 +60,6 @@ def run(self, args):
6160

6261

6362
class SandBoxCreate(SandBoxAction):
64-
6563
name = "create"
6664
help = "Create a new sandbox"
6765

@@ -96,7 +94,6 @@ def run(self, args):
9694

9795

9896
class SandBoxShowConfiguration(SandBoxAction):
99-
10097
name = "show-config"
10198
help = "Display sandbox configuration"
10299

@@ -140,7 +137,6 @@ def error(message: str) -> NoReturn:
140137

141138

142139
class SandBoxExec(SandBoxCreate):
143-
144140
name = "exec"
145141
help = "Execute anod action in an sandbox"
146142

src/e3/anod/sandbox/migrate.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010

1111
class SandBoxMigrate(SandBoxAction):
12-
1312
name = "migrate"
1413
help = "Migrate to a newer anod API version"
1514
require_sandbox = False

src/e3/collection/dag.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ class DAGError(E3Error):
2424

2525

2626
class DAGIterator:
27-
2827
NOT_VISITED = 0
2928
BUSY = 1
3029
VISITED = 2

0 commit comments

Comments
 (0)