Skip to content

Commit

Permalink
Resolve linting errors (mypy) and verify tests pass for:
Browse files Browse the repository at this point in the history
* solenoid.elements.xml_handlers;
* solenoid.emails;
* solenoid.people.
  • Loading branch information
jonavellecuerdo committed Nov 27, 2023
1 parent 1cc0119 commit 2898edb
Show file tree
Hide file tree
Showing 10 changed files with 496 additions and 241 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ mypy:
pipenv run mypy .

ruff:
pipenv run ruff check .
pipenv run ruff check ./solenoid/elements

safety:
pipenv check
Expand Down
2 changes: 2 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ python_version = "3.11"
[dev-packages]
black = "*"
coveralls = "*"
django-stubs = "*"
freezegun = "*"
mypy = "*"
pre-commit = "*"
Expand All @@ -17,6 +18,7 @@ pytest-django = "*"
ruff = "*"
#pytest-cov = "*"
requests-mock = "*"
types-beautifulsoup4 = "*"

[packages]
# Only needed for Heroku
Expand Down
199 changes: 138 additions & 61 deletions Pipfile.lock

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,22 @@
[tool.black]
line-length = 90

[tool.django-stubs]
django_settings_module = "solenoid.settings.base"

[tool.mypy]
disallow_untyped_calls = true
disallow_untyped_defs = true
plugins = ["mypy_django_plugin.main"]
exclude = ["tests/"]

[[tool.mypy.overrides]]
module = ["solenoid.userauth.*", "solenoid.settings.*"]
disallow_untyped_calls = false
disallow_untyped_defs = false
ignore_errors = true
ignore_missing_imports = true

[tool.pytest.ini_options]
log_level = "INFO"

Expand Down
2 changes: 1 addition & 1 deletion solenoid/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@


@app.task(bind=True)
def debug_task(self):
def debug_task(self) -> None: # type: ignore
print("Request: {0!r}".format(self.request))
Loading

0 comments on commit 2898edb

Please sign in to comment.