Skip to content
Permalink
Browse files

Set up pre commit hook for black (#1048)

  • Loading branch information...
mgasner committed Mar 27, 2019
1 parent 11a1241 commit 69a6d269737663c09e70d2f9866db7d7ac3d7cb9
@@ -1,4 +1,8 @@
- repo: https://github.com/pre-commit/mirrors-yapf
sha: v0.22.0
- repo: "https://github.com/ambv/black"
rev: "18.9b0"
hooks:
- id: yapf
- id: black
args: ["--fast", "-v", "-S", "-N", "."]
language_version: "python3.6"
pass_filenames: false
always_run: true
@@ -1,2 +1,20 @@
[tool.black]
line-length = 100
exclude = '''
/(
build
| buck-out
| dist
| _build
| \.eggs
| \.git
| \.hg
| \.mypy_cache
| \.nox
| \.tox
| \.venv
| python_modules/dagster/dagster/tutorials
| snapshots
| python_modules/dagster-airflow/dagster_airflow_tests/test_project
)/
'''
@@ -43,6 +43,16 @@ take a few minutes.

Have fun coding!

6. Set up pre-commit hooks

We use black to enforce a consistent code style. To set up a pre-commit hook, just run:

.. code-block:: console

$ pre-commit install

(The `pre-commit` package is installed in dagster's dev-requirements.)

Running dagit webapp in development
-------------------------------------
For development, run the dagit GraphQL server on a different port than the
@@ -345,6 +345,14 @@
</li>
</ol>
<p>Have fun coding!</p>
<ol class="arabic simple" start="6">
<li>Set up pre-commit hooks</li>
</ol>
<p>We use black to enforce a consistent code style. To set up a pre-commit hook, just run:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> pre-commit install
</pre></div>
</div>
<p>(The <cite>pre-commit</cite> package is installed in dagster’s dev-requirements.)</p>
<div class="section" id="running-dagit-webapp-in-development">
<h3>Running dagit webapp in development<a class="headerlink" href="#running-dagit-webapp-in-development" title="Permalink to this headline">¶</a></h3>
<p>For development, run the dagit GraphQL server on a different port than the
@@ -1938,6 +1946,16 @@
Have fun coding!
6. Set up pre-commit hooks
We use black to enforce a consistent code style. To set up a pre-commit hook, just run:
.. code-block:: console
$ pre-commit install
(The `pre-commit` package is installed in dagster's dev-requirements.)
Running dagit webapp in development
-------------------------------------
For development, run the dagit GraphQL server on a different port than the

0 comments on commit 69a6d26

Please sign in to comment.
You can’t perform that action at this time.