summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-06-07 22:59:57 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-06-07 22:59:57 +0200
commitecf050a59ac42c9cf7d12dab44dd51a341c916f2 (patch)
tree077d3e90d1bc25805112ce5aa234e965dceddec5
parent87ea75c803400ca74c4f1b863c496165ed802fc2 (diff)
Removed docs pipeline in noxfile, reformatted code w black
-rw-r--r--noxfile.py18
-rw-r--r--text_recognizer/networks/transformer/layers.py6
2 files changed, 1 insertions, 23 deletions
diff --git a/noxfile.py b/noxfile.py
index 1976a08..a90d53b 100644
--- a/noxfile.py
+++ b/noxfile.py
@@ -13,7 +13,6 @@ locations = (
"training",
"tests",
"noxfile.py",
- "docs/conf.py",
)
@@ -125,26 +124,9 @@ def typeguard(session: Session) -> None:
session.run("pytest", f"--typeguard-packages={package}", *args)
-@nox.session(python=["3.9"])
-def xdoctest(session: Session) -> None:
- """Run examples with xdoctest."""
- args = session.posargs or ["all"]
- session.run("poetry", "install", "--no-dev", external=True)
- install_with_constraints(session, "xdoctest")
- session.run("python", "-m", "xdoctest", package, *args)
-
-
@nox.session(python="3.9")
def coverage(session: Session) -> None:
"""Upload coverage data."""
install_with_constraints(session, "coverage[toml]", "codecov")
session.run("coverage", "xml", "--fail-under=0")
session.run("codecov", *session.posargs)
-
-
-@nox.session(python="3.9")
-def docs(session: Session) -> None:
- """Build the documentation."""
- session.run("poetry", "install", "--no-dev", external=True)
- install_with_constraints(session, "sphinx", "sphinx-autodoc-typehints")
- session.run("sphinx-build", "docs", "docs/_build")
diff --git a/text_recognizer/networks/transformer/layers.py b/text_recognizer/networks/transformer/layers.py
index a44a525..1266d32 100644
--- a/text_recognizer/networks/transformer/layers.py
+++ b/text_recognizer/networks/transformer/layers.py
@@ -47,11 +47,7 @@ class AttentionLayers(nn.Module):
return "a", "f"
def _build_network(
- self,
- causal: bool,
- attn_fn: partial,
- norm_fn: partial,
- ff_fn: partial,
+ self, causal: bool, attn_fn: partial, norm_fn: partial, ff_fn: partial,
) -> nn.ModuleList:
"""Configures transformer network."""
layers = nn.ModuleList([])