From 3b1eeef7a85ed00635f7cb5fe3acb81e04211483 Mon Sep 17 00:00:00 2001 From: liu-sheng Date: Mon, 27 Jan 2014 10:38:08 +0800 Subject: [PATCH] Remove vi modelines We don't need to have the vi modelines in each source file, it can be set in a user's vimrc if required. Also a check is added to hacking to detect if they are re-added. Change-Id: I347307a5145b2760c69085b6ca850d6a9137ffc6 Closes-Bug: #1229324 --- HACKING.rst | 1 + nova/db/__init__.py | 3 --- nova/db/api.py | 2 -- nova/db/base.py | 2 -- nova/db/migration.py | 2 -- nova/db/sqlalchemy/__init__.py | 2 -- nova/db/sqlalchemy/api.py | 2 -- nova/db/sqlalchemy/migration.py | 2 -- nova/db/sqlalchemy/types.py | 2 -- nova/db/sqlalchemy/utils.py | 2 -- nova/test.py | 2 -- nova/tests/__init__.py | 2 -- nova/tests/integrated/v3/test_aggregates.py | 1 - nova/tests/volume/encryptors/test_cryptsetup.py | 2 -- nova/utils.py | 2 -- nova/volume/encryptors/cryptsetup.py | 2 -- 16 files changed, 1 insertion(+), 30 deletions(-) diff --git a/HACKING.rst b/HACKING.rst index 9046e40b8..c9f9db450 100644 --- a/HACKING.rst +++ b/HACKING.rst @@ -13,6 +13,7 @@ Nova Specific Commandments This enforces a guideline defined in ``nova.openstack.common.db.sqlalchemy.session`` - [N310] timeutils.utcnow() wrapper must be used instead of direct calls to datetime.datetime.utcnow() to make it easy to override its return value in tests +- [N123] vim configuration should not be kept in source files. Creating Unit Tests ------------------- diff --git a/nova/db/__init__.py b/nova/db/__init__.py index 8ae248cf9..63b3b6fb0 100644 --- a/nova/db/__init__.py +++ b/nova/db/__init__.py @@ -1,6 +1,3 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. diff --git a/nova/db/api.py b/nova/db/api.py index 5d910920b..08e3d4a75 100644 --- a/nova/db/api.py +++ b/nova/db/api.py @@ -1,5 +1,3 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - # Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. diff --git a/nova/db/base.py b/nova/db/base.py index 2fb5c6b9e..303f0ba76 100644 --- a/nova/db/base.py +++ b/nova/db/base.py @@ -1,5 +1,3 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. diff --git a/nova/db/migration.py b/nova/db/migration.py index b25adbe1f..49ab83536 100644 --- a/nova/db/migration.py +++ b/nova/db/migration.py @@ -1,5 +1,3 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. diff --git a/nova/db/sqlalchemy/__init__.py b/nova/db/sqlalchemy/__init__.py index 800f11071..03fec6f2c 100644 --- a/nova/db/sqlalchemy/__init__.py +++ b/nova/db/sqlalchemy/__init__.py @@ -1,5 +1,3 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index 41ab1b763..ef47998f0 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -1,5 +1,3 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - # Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. diff --git a/nova/db/sqlalchemy/migration.py b/nova/db/sqlalchemy/migration.py index 12756e2e8..8e4d7aac2 100644 --- a/nova/db/sqlalchemy/migration.py +++ b/nova/db/sqlalchemy/migration.py @@ -1,5 +1,3 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. diff --git a/nova/db/sqlalchemy/types.py b/nova/db/sqlalchemy/types.py index f4ab0ee58..4b771e2ea 100644 --- a/nova/db/sqlalchemy/types.py +++ b/nova/db/sqlalchemy/types.py @@ -1,5 +1,3 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - # Copyright 2011 OpenStack Foundation # All Rights Reserved. # diff --git a/nova/db/sqlalchemy/utils.py b/nova/db/sqlalchemy/utils.py index b07058c13..092b2f6ff 100644 --- a/nova/db/sqlalchemy/utils.py +++ b/nova/db/sqlalchemy/utils.py @@ -1,5 +1,3 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - # Copyright (c) 2013 Boris Pavlovic (boris@pavlovic.me). # All Rights Reserved. # diff --git a/nova/test.py b/nova/test.py index eaf01f742..6b470ae5f 100644 --- a/nova/test.py +++ b/nova/test.py @@ -1,5 +1,3 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. diff --git a/nova/tests/__init__.py b/nova/tests/__init__.py index 6cbd763dd..566fabba1 100644 --- a/nova/tests/__init__.py +++ b/nova/tests/__init__.py @@ -1,5 +1,3 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. diff --git a/nova/tests/integrated/v3/test_aggregates.py b/nova/tests/integrated/v3/test_aggregates.py index 9fd3f8731..6bae77396 100644 --- a/nova/tests/integrated/v3/test_aggregates.py +++ b/nova/tests/integrated/v3/test_aggregates.py @@ -1,4 +1,3 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, Inc. # Copyright 2013 IBM Corp. # diff --git a/nova/tests/volume/encryptors/test_cryptsetup.py b/nova/tests/volume/encryptors/test_cryptsetup.py index eaca29981..5ed64217f 100644 --- a/nova/tests/volume/encryptors/test_cryptsetup.py +++ b/nova/tests/volume/encryptors/test_cryptsetup.py @@ -1,5 +1,3 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - # Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory # All Rights Reserved. # diff --git a/nova/utils.py b/nova/utils.py index b8cf911f6..307b0b6c7 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -1,5 +1,3 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara diff --git a/nova/volume/encryptors/cryptsetup.py b/nova/volume/encryptors/cryptsetup.py index 5d9096fb1..d3c08a23d 100644 --- a/nova/volume/encryptors/cryptsetup.py +++ b/nova/volume/encryptors/cryptsetup.py @@ -1,5 +1,3 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - # Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory # All Rights Reserved. #