Skip to content

Commit

Permalink
Pre-commit: Update a number of pre-commit hooks (#6236)
Browse files Browse the repository at this point in the history
* Add the `check-merge-conflict` hook
* Explicitly define target line ending for `mixed-line-ending`
* Change `fix-encoding-pragma` to actually remove the pragma
  This was mostly useful when Python 2 was still in use but now that
  Python 3 is the only version supported, this encoding pragma is no
  longer necessary.
  • Loading branch information
sphuber committed Dec 21, 2023
1 parent c27aa33 commit a4ced7a
Show file tree
Hide file tree
Showing 994 changed files with 6 additions and 996 deletions.
1 change: 0 additions & 1 deletion .docker/tests/conftest.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
import json
import time
from pathlib import Path
Expand Down
1 change: 0 additions & 1 deletion .docker/tests/test_aiida.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
import json

import pytest
Expand Down
1 change: 0 additions & 1 deletion .github/system_tests/test_containerized_code.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion .github/system_tests/test_daemon.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion .github/system_tests/workchains.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/check_release_tag.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""Check that the GitHub release tag matches the package version."""
import argparse
import ast
Expand Down
1 change: 0 additions & 1 deletion .molecule/default/files/polish/__init__.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion .molecule/default/files/polish/cli.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion .molecule/default/files/polish/lib/__init__.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion .molecule/default/files/polish/lib/expression.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion .molecule/default/files/polish/lib/workchain.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
9 changes: 6 additions & 3 deletions .pre-commit-config.yaml
Expand Up @@ -6,6 +6,8 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-merge-conflict
- id: check-yaml
- id: double-quote-string-fixer
- id: end-of-file-fixer
exclude: &exclude_pre_commit_hooks >
Expand All @@ -15,10 +17,11 @@ repos:
CHANGELOG.md|
)$
- id: fix-encoding-pragma
args: [--remove]
- id: mixed-line-ending
args: [--fix=lf]
- id: trailing-whitespace
exclude: *exclude_pre_commit_hooks
- id: check-yaml

- repo: https://github.com/ikamensh/flynt/
rev: 1.0.1
Expand Down Expand Up @@ -204,8 +207,8 @@ repos:
pass_filenames: false
files: >-
(?x)^(
pyproject.toml|
utils/dependency_management.py
pyproject.toml|
utils/dependency_management.py
)$
- id: dependencies
Expand Down
1 change: 0 additions & 1 deletion aiida/__init__.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/__main__.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/calculations/__init__.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/calculations/arithmetic/__init__.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/calculations/arithmetic/add.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/calculations/diff_tutorial/calculations.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""Calculations provided by aiida_diff tutorial plugin.
Register calculations via the "aiida.calculations" entry point in the pyproject.toml file.
Expand Down
1 change: 0 additions & 1 deletion aiida/calculations/importers/arithmetic/add.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""Importer for the :class:`aiida.calculations.arithmetic.add.ArithmeticAddCalculation` plugin."""
from pathlib import Path
from re import match
Expand Down
1 change: 0 additions & 1 deletion aiida/calculations/monitors/base.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""Monitors for the :class:`aiida.calculations.arithmetic.add.ArithmeticAddCalculation` plugin."""
from __future__ import annotations

Expand Down
1 change: 0 additions & 1 deletion aiida/calculations/templatereplacer.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/calculations/transfer.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/__init__.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/__init__.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_archive.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_calcjob.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_code.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_computer.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_config.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_daemon.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_data/__init__.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_data/cmd_array.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_data/cmd_bands.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_data/cmd_cif.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_data/cmd_dict.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_data/cmd_export.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_data/cmd_list.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_data/cmd_remote.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_data/cmd_show.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_data/cmd_singlefile.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_data/cmd_structure.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_data/cmd_trajectory.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_data/cmd_upf.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_database.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_devel.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_group.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_help.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_node.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_plugin.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_process.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_profile.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_rabbitmq.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_restapi.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_run.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_setup.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_shell.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_status.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_storage.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_user.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/commands/cmd_verdi.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/groups/__init__.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""Module with custom implementations of :class:`click.Group`."""

# AUTO-GENERATED
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/groups/dynamic.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""Subclass of :class:`click.Group` that loads subcommands dynamically from entry points."""
from __future__ import annotations

Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/groups/verdi.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""Subclass of :class:`click.Group` for the ``verdi`` CLI."""
from __future__ import annotations

Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/params/__init__.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/params/arguments/__init__.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/params/arguments/main.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/params/arguments/overridable.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/params/options/__init__.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/params/options/callable.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/params/options/commands/__init__.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/params/options/commands/code.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/params/options/commands/computer.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/params/options/commands/setup.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down
1 change: 0 additions & 1 deletion aiida/cmdline/params/options/conditional.py
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
Expand Down

0 comments on commit a4ced7a

Please sign in to comment.