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 (apache#5835)

* [AIRFLOW-5233] Fixed consistency in whitespace (tabs/eols) + common problems
  • Loading branch information
potiuk authored Aug 16, 2019
1 parent e2d76b9 commit 5cfe9c2
Show file tree
Hide file tree
Showing 41 changed files with 485 additions and 503 deletions.
18 changes: 12 additions & 6 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 All @@ -39,12 +41,6 @@ repos:
- license-templates/LICENSE.txt
files: >
\.properties$|\.cfg$|\.conf$|\.ini$|\.ldif$|\.readthedocs$|\.service$|^Dockerfile.*$
- repo: meta
hooks:
- id: check-hooks-apply
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.6
hooks:
- id: insert-license
name: Add licence for all JS files
files: \.js$
Expand All @@ -54,6 +50,16 @@ repos:
- "/**| *| */"
- --license-filepath
- license-templates/LICENSE.txt
- 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 @@ -701,6 +701,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 @@ -27,5 +27,3 @@ python-nvd3:
------------

* Copyright (c) 2013 Arezqui Belaid <[email protected]> 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 Down Expand Up @@ -37,7 +37,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 content %}
{{ 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/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/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/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 @@ -86,10 +86,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/howto/define_extra_link.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,3 @@ The following code shows how to add extra links to an operator:
You can also add a global operator extra link that will be available to
all the operators through airflow plugin. Learn more about it in the
:ref:`plugin example <plugin-example>`.

1 change: 0 additions & 1 deletion docs/howto/operator/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@ information.
gcp/index
papermill
python

Loading

0 comments on commit 5cfe9c2

Please sign in to comment.