Skip to content

Commit

Permalink
[AIRFLOW-5233] Fixed consistency in whitespace (tabs/eols) + common p…
Browse files Browse the repository at this point in the history
…roblems (#5835)

* [AIRFLOW-5233] Fixed consistency in whitespace (tabs/eols) + common problems

(cherry picked from commit 5cfe9c2)
  • Loading branch information
potiuk committed Aug 16, 2019
1 parent 1f6cbd0 commit b73c815
Show file tree
Hide file tree
Showing 35 changed files with 38 additions and 50 deletions.
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.6
hooks:
- id: forbid-tabs
exclude: ^airflow/_vendor/.*$|^docs/Makefile$
- id: insert-license
name: Add licence for all SQL files
files: \.sql$
Expand Down Expand Up @@ -51,6 +53,13 @@ repos:
- repo: meta
hooks:
- id: check-hooks-apply
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-merge-conflict
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
- repo: local
hooks:
- id: lint-dockerfile
Expand Down
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,11 @@ lint-dockerfile Lint dockerfile
mypy Run mypy
pylint Run pylint
flake8 Run flake8
forbid-tabs Fails if tabs are used in the project
check-merge-conflict Checks if merge conflict is being committed
detect-private-key Detects if private key is added to the repository
end-of-file-fixer Make sure that there is an empty line at the end
mixed-line-ending Detects if mixed line ending is used (\r vs. \r\n)
```
## Using pre-commit hooks

Expand Down
1 change: 0 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -262,4 +262,3 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
(BSD 3 License) d3js v3.5.17 (https://d3js.org)
(BSD 3 License) parallel-coordinates v0.7.0 (http://syntagmatic.github.com/parallel-coordinates/)
(BSD 3 License) scikit-learn v0.19.1 (https://github.com/scikit-learn/scikit-learn)

2 changes: 0 additions & 2 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,3 @@ python-nvd3:
------------

* Copyright (c) 2013 Arezqui Belaid <areski@gmail.com> and other contributors


1 change: 0 additions & 1 deletion airflow/_vendor/nvd3/templates/cumulativelinechart.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@
{{super()}}

{% endblock body %}

1 change: 0 additions & 1 deletion airflow/_vendor/nvd3/templates/linechart.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,3 @@
{% endblock close %}

{% endblock body %}

1 change: 0 additions & 1 deletion airflow/_vendor/nvd3/templates/lineplusbarchart.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,3 @@
{% endblock close %}

{% endblock body %}

8 changes: 5 additions & 3 deletions airflow/config_templates/default_webserver_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

"""Default configuration for the Airflow webserver"""
import os
from airflow import configuration as conf
from flask_appbuilder.security.manager import AUTH_DB
# from flask_appbuilder.security.manager import AUTH_LDAP
# from flask_appbuilder.security.manager import AUTH_OAUTH
# from flask_appbuilder.security.manager import AUTH_OID
# from flask_appbuilder.security.manager import AUTH_REMOTE_USER

from airflow import configuration as conf

basedir = os.path.abspath(os.path.dirname(__file__))

# The SQLAlchemy connection string.
Expand Down Expand Up @@ -62,7 +64,7 @@
# When using OAuth Auth, uncomment to setup provider(s) info
# Google OAuth example:
# OAUTH_PROVIDERS = [{
# 'name':'google',
# 'name':'google',
# 'whitelist': ['@YOU_COMPANY_DOMAIN'], # optional
# 'token_key':'access_token',
# 'icon':'fa-google',
Expand Down
1 change: 0 additions & 1 deletion airflow/www/templates/airflow/circles.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,3 @@ <h1>Airflow 404 = lots of circles</h1>
toggle();

</script>

6 changes: 3 additions & 3 deletions airflow/www/templates/airflow/task_instance.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
Expand All @@ -36,7 +36,7 @@ <h4>
{{ task_id }}
<input type="hidden" value="{{ dag.dag_id }}" name="dag_id">
</span>
{{ form.execution_date(class_="form-control") | safe }}
{{ form.execution_date(class_="form-control") | safe }}

</div>
</form>
Expand Down
8 changes: 4 additions & 4 deletions airflow/www/templates/airflow/version.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
Expand All @@ -23,13 +23,13 @@
{% block body %}
{{ super() }}
<h2>{{ title }}</h2>
{% set version_label = 'Version' %}
{% set version_label = 'Version' %}
{% if airflow_version %}
<h4>{{ version_label }} : <a href="https://pypi.python.org/pypi/apache-airflow/{{ airflow_version }}">{{ airflow_version }}</a></h4>
{% else %}
<h4>{{ version_label }} : Not Available</h4>
{% endif %}
<h4>Git Version :{% if git_version %} {{ git_version }} {% else %} Not Available {% endif %}</h4>
<h4>Git Version :{% if git_version %} {{ git_version }} {% else %} Not Available {% endif %}</h4>
<hr>

{% endblock %}
2 changes: 1 addition & 1 deletion airflow/www_rbac/templates/appbuilder/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
limitations under the License.

#}
{% extends "airflow/dag.html" %}
{% extends "airflow/dag.html" %}
1 change: 0 additions & 1 deletion airflow/www_rbac/templates/appbuilder/navbar_menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,3 @@
{% endif %}
{% endif %}
{% endfor %}

1 change: 0 additions & 1 deletion airflow/www_rbac/templates/appbuilder/navbar_right.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,3 @@
<li><a href="{{appbuilder.get_url_for_login}}">
<i class="fa fa-fw fa-sign-in"></i>{{_("Login")}}</a></li>
{% endif %}

8 changes: 4 additions & 4 deletions dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ Users can configure this automatically by running `airflow-pr setup_git_remotes`

```bash
$ git remote -v
github https://github.com/apache/airflow.git (fetch)
github https://github.com/apache/airflow.git (push)
origin https://github.com/<USER>/airflow (fetch)
origin https://github.com/<USER>/airflow (push)
github https://github.com/apache/airflow.git (fetch)
github https://github.com/apache/airflow.git (push)
origin https://github.com/<USER>/airflow (fetch)
origin https://github.com/<USER>/airflow (push)
```

#### JIRA
Expand Down
1 change: 0 additions & 1 deletion dev/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ click>=6.6,<7
jira>=1.0.7,<2
keyring==10.1
gitpython

1 change: 0 additions & 1 deletion docs/howto/check-health.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,3 @@ To check the health status of your Airflow instance, you can simply access the e

Please keep in mind that the HTTP response code of ``/health`` endpoint **should not** be used to determine the health
status of the application. The return code is only indicative of the state of the rest call (200 for success).

2 changes: 1 addition & 1 deletion docs/howto/connection/grpc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ Scopes (comma separated) (Optional)
A list of comma-separated `Google Cloud scopes
<https://developers.google.com/identity/protocols/googlescopes>`_ to
authenticate with.
Only for `OATH_GOOGLE` type connection
Only for `OATH_GOOGLE` type connection
1 change: 0 additions & 1 deletion docs/scheduler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,3 @@ Here are some of the ways you can **unblock tasks**:
or for instance when the fix has been applied outside of Airflow.
* The ``airflow backfill`` CLI subcommand has a flag to ``--mark_success`` and allows selecting
subsections of the DAG as well as specifying date ranges.

1 change: 0 additions & 1 deletion docs/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -589,4 +589,3 @@ DAG Level Role
``Admin`` can create a set of roles which are only allowed to view a certain set of dags. This is called DAG level access. Each dag defined in the dag model table
is treated as a ``View`` which has two permissions associated with it (``can_dag_read`` and ``can_dag_edit``). There is a special view called ``all_dags`` which
allows the role to access all the dags. The default ``Admin``, ``Viewer``, ``User``, ``Op`` roles can all access ``all_dags`` view.
1 change: 0 additions & 1 deletion docs/timezone.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,3 @@ Time deltas
For schedules with time deltas Airflow assumes you always will want to run with the specified interval. So if you
specify a timedelta(hours=2) you will always want to run to hours later. In this case day light savings time will
be taken into account.

1 change: 0 additions & 1 deletion licenses/LICENSE-bootstrap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

1 change: 0 additions & 1 deletion licenses/LICENSE-d3-tip.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONIN
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

3 changes: 0 additions & 3 deletions licenses/LICENSE-d3js.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,3 @@ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.



2 changes: 0 additions & 2 deletions licenses/LICENSE-dagre-d3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


1 change: 0 additions & 1 deletion licenses/LICENSE-datatables.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONIN
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

2 changes: 1 addition & 1 deletion licenses/LICENSE-elasticmock.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
1 change: 0 additions & 1 deletion licenses/LICENSE-flask-kerberos.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

3 changes: 0 additions & 3 deletions licenses/LICENSE-webgl-2d.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,3 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.



4 changes: 2 additions & 2 deletions scripts/ci/kubernetes/docker/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@

if [[ "$1" = "webserver" ]]
then
exec airflow webserver
exec airflow webserver
fi

if [[ "$1" = "scheduler" ]]
then
exec airflow scheduler
exec airflow scheduler
fi
1 change: 0 additions & 1 deletion scripts/ci/minikdc.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ max.ticket.lifetime=86400000
max.renewable.lifetime=604800000
transport=TCP
debug=true

1 change: 0 additions & 1 deletion scripts/systemd/airflow
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@
#
# AIRFLOW_CONFIG=
# AIRFLOW_HOME=

2 changes: 1 addition & 1 deletion scripts/systemd/airflow-flower.service
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target
2 changes: 1 addition & 1 deletion scripts/systemd/airflow-kerberos.service
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target
2 changes: 1 addition & 1 deletion scripts/systemd/airflow-worker.service
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ Restart=on-failure
RestartSec=10s

[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target

0 comments on commit b73c815

Please sign in to comment.