Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔧 MAINTAIN: Move yapf and mypy config to pyproject.toml #5066

Merged
merged 1 commit into from
Aug 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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