From 998355bb1d280fcb6f3b20c47b063903a48fe943 Mon Sep 17 00:00:00 2001 From: Sebastiaan Huber Date: Fri, 22 Dec 2023 13:15:48 +0100 Subject: [PATCH] Devops: Update the pre-commit hooks The encoding pragme is now actually removed as it was essentially only useful for code that needed to support Python 2. --- .github/workflows/validate_release_tag.py | 1 - .pre-commit-config.yaml | 7 ++++++- aiida_wien2k/__init__.py | 1 - aiida_wien2k/calculations/run123_lapw.py | 1 - aiida_wien2k/parsers/scf123.py | 1 - aiida_wien2k/workflows/scf123_workchain.py | 1 - tests/calculations/test_scf123_lapw.py | 1 - tests/conftest.py | 1 - tests/parsers/test_scf123.py | 1 - 9 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/validate_release_tag.py b/.github/workflows/validate_release_tag.py index f15fadc..3b224b2 100644 --- a/.github/workflows/validate_release_tag.py +++ b/.github/workflows/validate_release_tag.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Validate that the version in the tag label matches the version of the package.""" import argparse import ast diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e6d8138..a7f5340 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,10 +1,15 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: + - id: check-merge-conflict + - id: check-yaml + - id: double-quote-string-fixer - id: end-of-file-fixer - id: fix-encoding-pragma + args: [--remove] - id: mixed-line-ending + args: [--fix=lf] - id: trailing-whitespace exclude: >- (?x)^( diff --git a/aiida_wien2k/__init__.py b/aiida_wien2k/__init__.py index 1054e06..f5fe769 100644 --- a/aiida_wien2k/__init__.py +++ b/aiida_wien2k/__init__.py @@ -1,3 +1,2 @@ -# -*- coding: utf-8 -*- """The official AiiDA plugin for WIEN2k.""" __version__ = '0.1.2' diff --git a/aiida_wien2k/calculations/run123_lapw.py b/aiida_wien2k/calculations/run123_lapw.py index 905105d..077370c 100644 --- a/aiida_wien2k/calculations/run123_lapw.py +++ b/aiida_wien2k/calculations/run123_lapw.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import io import numpy as np diff --git a/aiida_wien2k/parsers/scf123.py b/aiida_wien2k/parsers/scf123.py index 4304118..fa1b419 100644 --- a/aiida_wien2k/parsers/scf123.py +++ b/aiida_wien2k/parsers/scf123.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import io import numpy as np diff --git a/aiida_wien2k/workflows/scf123_workchain.py b/aiida_wien2k/workflows/scf123_workchain.py index 5f6c5ab..21bcdf8 100644 --- a/aiida_wien2k/workflows/scf123_workchain.py +++ b/aiida_wien2k/workflows/scf123_workchain.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from aiida.engine import ToContext, WorkChain from aiida.orm import AbstractCode, Dict, StructureData from aiida.plugins.factories import CalculationFactory diff --git a/tests/calculations/test_scf123_lapw.py b/tests/calculations/test_scf123_lapw.py index 63baeb7..fd657b6 100644 --- a/tests/calculations/test_scf123_lapw.py +++ b/tests/calculations/test_scf123_lapw.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Tests for the :mod:`aiida_wien2k.calculations.run123_lapw` module.""" from __future__ import annotations diff --git a/tests/conftest.py b/tests/conftest.py index 28c7503..52bcd01 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Module with test fixtures.""" from __future__ import annotations diff --git a/tests/parsers/test_scf123.py b/tests/parsers/test_scf123.py index 9f4daf3..fd24b52 100644 --- a/tests/parsers/test_scf123.py +++ b/tests/parsers/test_scf123.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Tests for the :mod:`aiida_wien2k.parsers.scf123` module.""" from aiida_wien2k.calculations.run123_lapw import Wien2kRun123Lapw