diff --git a/cdds/cdds/deprecated/transfer/list_queue.py b/cdds/cdds/deprecated/transfer/list_queue.py index e7434e7f2..296625994 100755 --- a/cdds/cdds/deprecated/transfer/list_queue.py +++ b/cdds/cdds/deprecated/transfer/list_queue.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3.6 # (C) British Crown Copyright 2021-2025, Met Office. # Please see LICENSE.md for license details. """Print a list of messages in the CMIP6 queues""" diff --git a/cdds/cdds/deprecated/transfer/resend_failed_msgs.py b/cdds/cdds/deprecated/transfer/resend_failed_msgs.py index 01ff5957f..767c04ddc 100644 --- a/cdds/cdds/deprecated/transfer/resend_failed_msgs.py +++ b/cdds/cdds/deprecated/transfer/resend_failed_msgs.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3.6 # (C) British Crown Copyright 2021-2025, Met Office. # Please see LICENSE.md for license details. diff --git a/cdds/cdds/tests/test_coding_standards.py b/cdds/cdds/tests/test_copyright_headers.py similarity index 91% rename from cdds/cdds/tests/test_coding_standards.py rename to cdds/cdds/tests/test_copyright_headers.py index f379b7600..ce5c53102 100644 --- a/cdds/cdds/tests/test_coding_standards.py +++ b/cdds/cdds/tests/test_copyright_headers.py @@ -1,7 +1,7 @@ -# (C) British Crown Copyright 2022-2025, Met Office. +# (C) British Crown Copyright 2022-2026, Met Office. # Please see LICENSE.md for license details. # pylint: disable = missing-docstring, invalid-name, too-many-public-methods -"""Tests for coding standards and copyright headers.""" +"""Test for copyright headers.""" import os import re import unittest @@ -15,8 +15,8 @@ @pytest.mark.style -class TestCodingStandards(unittest.TestCase): - """Tests for coding standards.""" +class TestCopyrightHeaders(unittest.TestCase): + """Test for copyright headers.""" def setUp(self): cdds_dir = Path(cdds.__file__).parent.absolute() @@ -45,7 +45,7 @@ def test_copyright_headers(self): def get_copyright_files(self): self.exclude_patterns.extend( - ['egg-info', 'EGG-INFO', 'dist', '.pyc', 'doctrees', 'html', 'cfg', 'clyc', + ['egg-info', 'EGG-INFO', 'dist', '.pyc', 'doctrees', 'html', 'clyc', 'pylintrc', 'TAGS', 'json', 'todel', 'nfsc', 'txt', 'ini', 'conf', 'workflows'] ) diff --git a/mip_convert/mip_convert/tests/test_coding_standards.py b/mip_convert/mip_convert/tests/test_copyright_headers.py similarity index 92% rename from mip_convert/mip_convert/tests/test_coding_standards.py rename to mip_convert/mip_convert/tests/test_copyright_headers.py index 427a0e7d1..8c2b76378 100644 --- a/mip_convert/mip_convert/tests/test_coding_standards.py +++ b/mip_convert/mip_convert/tests/test_copyright_headers.py @@ -1,7 +1,7 @@ -# (C) British Crown Copyright 2023-2025, Met Office. +# (C) British Crown Copyright 2023-2026, Met Office. # Please see LICENSE.md for license details. # pylint: disable = missing-docstring, invalid-name, too-many-public-methods -"""Tests for coding standards and copyright headers.""" +"""Test for copyright headers.""" import os import re import unittest @@ -15,8 +15,8 @@ @pytest.mark.style -class TestCodingStandards(unittest.TestCase): - """Tests for coding standards.""" +class TestCopyrightHeaders(unittest.TestCase): + """Test for copyright headers.""" def setUp(self): mip_convert_dir = Path(mip_convert.__file__).parent.absolute() diff --git a/ruff.toml b/ruff.toml index 5601bb90f..8e9263ab0 100644 --- a/ruff.toml +++ b/ruff.toml @@ -6,6 +6,10 @@ select = [ #pycodestyle "E", "W", + "CPY" ] ignore = [] -preview = true \ No newline at end of file +preview = true + +[lint.flake8-copyright] +notice-rgx = '^(#!/usr/bin/env python3\n)?# \(C\) British Crown Copyright 20\d{2}(-20\d{2})?, Met Office\.\n# Please see LICENSE\.md for license details\.'