Skip to content

Commit

Permalink
Merge branch 'pyproject'
Browse files Browse the repository at this point in the history
* pyproject:
  Configure coverage in pyproject
  Configure mypy in pyproject
  Set up pyproject.toml for ruff
  • Loading branch information
albertyw committed Jul 10, 2023
2 parents 67af271 + 9c889af commit 08e063d
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 16 deletions.
14 changes: 0 additions & 14 deletions .coveragerc

This file was deleted.

2 changes: 1 addition & 1 deletion .drone.yml
Expand Up @@ -11,7 +11,7 @@ steps:
- python setup.py develop
- pip install -r requirements-test.txt
- ruff check .
- mypy . --strict --ignore-missing-imports --exclude build
- mypy .
- cc-test-reporter before-build
- coverage run -m unittest
- exitcode="$?"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -96,7 +96,7 @@ Development
python setup.py develop
pip install -r requirements-test.txt
ruff check .
mypy . --strict --ignore-missing-imports
mypy .
coverage run -m unittest
coverage report -m
```
Expand Down
24 changes: 24 additions & 0 deletions pyproject.toml
@@ -0,0 +1,24 @@
[tool.ruff]
select = ["E", "F", "B"]

[tool.mypy]
strict = true
ignore_missing_imports = true
exclude = [
"build",
]

[tool.coverage.run]
source = [
".",
]
omit = [
".virtualenv",
"setup.py",
]

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
'if __name__ == "__main__":',
]

0 comments on commit 08e063d

Please sign in to comment.