diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..e30e003 --- /dev/null +++ b/.flake8 @@ -0,0 +1,3 @@ +[flake8] +max-line-length = 100 +extend-ignore = E221,E501 \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index c42f168..75335fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,6 +60,10 @@ dependencies = [ ] [tool.hatch.envs.lint.scripts] +lint = [ + "- flake8 src/lambda_calculus", + "- pylint src/lambda_calculus" +] typecheck = "mypy -p lambda_calculus" release = [ "typecheck" @@ -79,6 +83,9 @@ warn_unused_ignores = true warn_return_any = true warn_unreachable = true +[tool.pylint] +max-line-length = 100 + [tool.coverage.run] source_pkgs = ["lambda_calculus"] branch = true diff --git a/src/lambda_calculus/visitors/normalisation.py b/src/lambda_calculus/visitors/normalisation.py index 346d939..9406733 100644 --- a/src/lambda_calculus/visitors/normalisation.py +++ b/src/lambda_calculus/visitors/normalisation.py @@ -46,7 +46,7 @@ class BetaNormalisingVisitor(Visitor[Iterator[Step], str]): def skip_intermediate(self, term: terms.Term[str]) -> terms.Term[str]: """ Calculate the beta normal form directly. - + :param term: term which should be transformed into ist beta normal form :return: new term representing the beta normal form if it exists """ @@ -77,7 +77,7 @@ def visit_abstraction(self, abstraction: terms.Abstraction[str]) -> Iterator[Ste def beta_reducation(self, abstraction: terms.Abstraction[str], argument: terms.Term[str]) -> Generator[Step, None, terms.Term[str]]: """ Perform beta reduction of an application. - + :param abstraction: abstraction of the application :param argument: argument of the application :return: Generator yielding steps and returning the reduced term