Skip to content

Commit

Permalink
Merge pull request optuna#5861 from himkt/mypy-pyproject
Browse files Browse the repository at this point in the history
RFC: move mypy related entries in setup.cfg to pyproject.toml
  • Loading branch information
y0z authored Dec 13, 2024
2 parents 54469cf + cde8bcc commit 76a0e15
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
16 changes: 16 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,19 @@ markers = [
"skip_coverage: marks tests are skipped when calculating the coverage",
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
]

[tool.mypy]
# Options configure mypy's strict mode.
warn_unused_configs = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
no_implicit_optional = true
warn_redundant_casts = true
strict_equality = true
extra_checks = true
no_implicit_reexport = true

ignore_missing_imports = true
exclude = [".venv", "venv", "build", "docs", "tutorial", "optuna/storages/_rdb/alembic"]
17 changes: 0 additions & 17 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,3 @@ ignore =
max-line-length = 99
statistics = True
exclude = .venv,venv,build,tutorial,.asv,docs/visualization_examples,docs/visualization_matplotlib_examples

# This section is for mypy.
[mypy]
# Options configure mypy's strict mode.
warn_unused_configs = True
disallow_untyped_calls = True
disallow_untyped_defs = True
disallow_incomplete_defs = True
check_untyped_defs = True
no_implicit_optional = True
warn_redundant_casts = True
strict_equality = True
extra_checks = True
no_implicit_reexport = True

ignore_missing_imports = True
exclude = .venv|venv|build|docs|tutorial|optuna/storages/_rdb/alembic

0 comments on commit 76a0e15

Please sign in to comment.