Skip to content

Commit

Permalink
Remove vim configuration from Python files
Browse files Browse the repository at this point in the history
In a project where contributors are free to use whatever editor they
want and we have linting tools that verify the proper formatting of
Python files, it should not be required to have a vim-specific line in
Python files.
  • Loading branch information
rhcarvalho committed May 9, 2017
1 parent 53cdc13 commit a0539d0
Show file tree
Hide file tree
Showing 19 changed files with 0 additions and 43 deletions.
1 change: 0 additions & 1 deletion bin/cluster
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python2
# vim: expandtab:tabstop=4:shiftwidth=4

import argparse
import ConfigParser
Expand Down
19 changes: 0 additions & 19 deletions docs/best_practices_guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,6 @@ This guide complies with https://www.ietf.org/rfc/rfc2119.txt[RFC2119].

== Python

=== Python Source Files

'''
[[Python-source-files-MUST-contain-the-following-vim-mode-line]]
[cols="2v,v"]
|===
| <<Python-source-files-MUST-contain-the-following-vim-mode-line, Rule>>
| Python source files MUST contain the following vim mode line.
|===

[source]
----
# vim: expandtab:tabstop=4:shiftwidth=4
----

Since most developers contributing to this repository use vim, this rule helps to promote consistency.

If mode lines for other editors are needed, please open a GitHub issue.

=== Method Signatures

'''
Expand Down
1 change: 0 additions & 1 deletion filter_plugins/oo_filters.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# vim: expandtab:tabstop=4:shiftwidth=4
# pylint: disable=too-many-lines
"""
Custom filters for use in openshift-ansible
Expand Down
1 change: 0 additions & 1 deletion filter_plugins/openshift_node.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# vim: expandtab:tabstop=4:shiftwidth=4
'''
Custom filters for use in openshift-node
'''
Expand Down
2 changes: 0 additions & 2 deletions filter_plugins/openshift_version.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/python

# -*- coding: utf-8 -*-
# vim: expandtab:tabstop=4:shiftwidth=4
"""
Custom version comparison filters for use in openshift-ansible
"""
Expand Down
2 changes: 0 additions & 2 deletions library/kubeclient_ca.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# vim: expandtab:tabstop=4:shiftwidth=4

''' kubeclient_ca ansible module '''

import base64
Expand Down
2 changes: 0 additions & 2 deletions library/modify_yaml.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# vim: expandtab:tabstop=4:shiftwidth=4

''' modify_yaml ansible module '''

import yaml
Expand Down
2 changes: 0 additions & 2 deletions lookup_plugins/oo_option.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# vim: expandtab:tabstop=4:shiftwidth=4

'''
oo_option lookup plugin for openshift-ansible
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# vim: expandtab:tabstop=4:shiftwidth=4
'''
Custom filters for use in openshift-ansible
'''
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# vim: expandtab:tabstop=4:shiftwidth=4

"""Ansible module for modifying OpenShift configs during an upgrade"""

import os
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# vim: expandtab:tabstop=4:shiftwidth=4
'''
Custom filters for use in testing
'''
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# vim: expandtab:tabstop=4:shiftwidth=4
"""
Custom filters for use in openshift-ansible
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# vim: expandtab:tabstop=4:shiftwidth=4
# pylint: disable=missing-docstring,invalid-name
#

import random
import tempfile
Expand Down
1 change: 0 additions & 1 deletion roles/openshift_facts/library/openshift_facts.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/python
# pylint: disable=too-many-lines
# -*- coding: utf-8 -*-
# vim: expandtab:tabstop=4:shiftwidth=4
# Reason: Disable pylint too-many-lines because we don't want to split up this file.
# Status: Permanently disabled to keep this module as self-contained as possible.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# vim: expandtab:tabstop=4:shiftwidth=4
'''
Ansible callback plugin.
'''
Expand Down
1 change: 0 additions & 1 deletion roles/openshift_health_checker/library/aos_version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/python
# vim: expandtab:tabstop=4:shiftwidth=4
'''
Ansible module for yum-based systems determining if multiple releases
of an OpenShift package are available, and if the release requested
Expand Down
1 change: 0 additions & 1 deletion roles/openshift_health_checker/library/check_yum_update.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/python
# vim: expandtab:tabstop=4:shiftwidth=4
'''
Ansible module to test whether a yum update or install will succeed,
without actually performing it or running yum.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# vim: expandtab:tabstop=4:shiftwidth=4
'''
Custom filters for use in openshift-master
'''
Expand Down
1 change: 0 additions & 1 deletion roles/os_firewall/library/os_firewall_manage_iptables.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# vim: expandtab:tabstop=4:shiftwidth=4
# pylint: disable=fixme, missing-docstring
import subprocess

Expand Down

0 comments on commit a0539d0

Please sign in to comment.