Skip to content

Commit

Permalink
Setup mypy type checking
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Marr <[email protected]>
  • Loading branch information
smarr committed Sep 29, 2024
1 parent 0144014 commit 739d41f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ jobs:
black --check rebench
if: matrix.python-version == '3.12'

- name: Install and run mypy
run: |
pip install mypy
mypy --install-types --non-interactive rebench
mypy rebench
if: matrix.python-version == '3.12'

- name: Upload coverage results to Coveralls
run: coveralls
env:
Expand Down
11 changes: 11 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
[tool.mypy]
warn_unused_configs = true

[[tool.mypy.overrides]]
module = "cpuinfo.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "pykwalify.*"
ignore_missing_imports = true

[tool.black]
extend-exclude = '''
/rebench/interop/jmh_adapter.py
Expand Down
2 changes: 1 addition & 1 deletion rebench/tests/configurator_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def test_number_of_experiments_smallconf(self):
self.ui, None)
self.assertEqual(1, len(cnf.get_experiments()))

@unittest.skip
@unittest.skip("needs to be fixed, see #21")
def test_number_of_experiments_testconf(self):
cnf = Configurator(load_config(self._path + '/test.conf'), DataStore(self.ui),
self.ui, None, None, 'all')
Expand Down
4 changes: 2 additions & 2 deletions rebench/tests/features/issue_42_vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

test = sys.argv[2]

env = os.environ.items()
env = sorted(env, key=lambda el: el[0])
env_items = os.environ.items()
env = sorted(env_items, key=lambda el: el[0])
print(test)
print(env)

Expand Down

0 comments on commit 739d41f

Please sign in to comment.