Skip to content

Commit

Permalink
🔧 MAINTAIN: Move yapf and mypy config to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell committed Aug 11, 2021
1 parent ead3f39 commit f5bae52
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 76 deletions.
4 changes: 3 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ repos:
]

- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.30.0
rev: v0.31.0
hooks:
- id: yapf
name: yapf
Expand All @@ -39,6 +39,7 @@ repos:
docs/.*|
)$
args: ['-i']
additional_dependencies: ['toml']

- repo: local

Expand All @@ -56,6 +57,7 @@ repos:
- id: mypy
name: mypy
entry: mypy
args: [--config-file=pyproject.toml]
language: python
types: [python]
require_serial: true
Expand Down
8 changes: 0 additions & 8 deletions .style.yapf

This file was deleted.

67 changes: 0 additions & 67 deletions mypy.ini

This file was deleted.

40 changes: 40 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,46 @@ markers = [
"sphinx: set parameters for the sphinx `app` fixture"
]

[tool.yapf]
based_on_style = "google"
column_limit = 120
dedent_closing_brackets = true
coalesce_brackets = true
align_closing_bracket_with_visual_indent = true
split_arguments_when_comma_terminated = true
indent_dictionary_value = false

[tool.mypy]
show_error_codes = true
check_untyped_defs = true
scripts_are_modules = true
warn_unused_ignores = true
warn_redundant_casts = true

[[tool.mypy.overrides]]
module = 'aiida.*'
# can only follow these imports when more of the code is typed
follow_imports = "skip"

[[tool.mypy.overrides]]
module = 'tests.*'
check_untyped_defs = false

[[tool.mypy.overrides]]
module = [
'circus.*',
'disk_objectstore.*',
'django.*',
'kiwipy.*',
'numpy.*',
'ruamel.*',
'scipy.*',
'sqlalchemy.*',
'tqdm.*',
'wrapt.*',
]
ignore_missing_imports = true

[tool.tox]
legacy_tox_ini = """
[tox]
Expand Down

0 comments on commit f5bae52

Please sign in to comment.