Skip to content

Commit

Permalink
add lint config
Browse files Browse the repository at this point in the history
  • Loading branch information
Deric-W committed Dec 15, 2023
1 parent 5363217 commit f30fcca
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
max-line-length = 100
extend-ignore = E221,E501
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/lambda_calculus/visitors/normalisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f30fcca

Please sign in to comment.