Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format code with black #364

Merged
merged 1 commit into from Jul 11, 2019
Merged

Format code with black #364

merged 1 commit into from Jul 11, 2019

Conversation

jacebrowning
Copy link
Member

No description provided.

@sebhub
Copy link
Member

sebhub commented Jul 12, 2019

A make ci did some format changes in files unrelated to my patch:

diff --git a/doorstop/core/exporter.py b/doorstop/core/exporter.py
index a225d3c..4aef12d 100644
--- a/doorstop/core/exporter.py
+++ b/doorstop/core/exporter.py
@@ -7,9 +7,9 @@ import datetime
 import os
 from collections import defaultdict
 
-import openpyxl
 import yaml
 
+import openpyxl
 from doorstop import common, settings
 from doorstop.common import DoorstopError
 from doorstop.core.types import iter_documents, iter_items
diff --git a/doorstop/core/importer.py b/doorstop/core/importer.py
index fb4db93..77598b8 100644
--- a/doorstop/core/importer.py
+++ b/doorstop/core/importer.py
@@ -8,7 +8,6 @@ import re
 import warnings
 
 import openpyxl
-
 from doorstop import common, settings
 from doorstop.common import DoorstopError
 from doorstop.core.builder import _get_tree
diff --git a/doorstop/core/publisher.py b/doorstop/core/publisher.py
index 4f798f3..5e3dab8 100644
--- a/doorstop/core/publisher.py
+++ b/doorstop/core/publisher.py
@@ -6,11 +6,11 @@ import os
 import tempfile
 import textwrap
 
-import bottle
 import markdown
-from bottle import template as bottle_template
 from plantuml_markdown import PlantUMLMarkdownExtension
 
+import bottle
+from bottle import template as bottle_template
 from doorstop import common, settings
 from doorstop.common import DoorstopError
 from doorstop.core import Document
diff --git a/doorstop/core/tests/test_all.py b/doorstop/core/tests/test_all.py
index c86db94..8f90323 100644
--- a/doorstop/core/tests/test_all.py
+++ b/doorstop/core/tests/test_all.py
@@ -13,9 +13,9 @@ import tempfile
 import unittest
 from unittest.mock import Mock, patch
 
-import openpyxl
 import yaml
 
+import openpyxl
 from doorstop import common, core
 from doorstop.common import DoorstopError, DoorstopInfo, DoorstopWarning
 from doorstop.core.builder import _clear_tree, _get_tree
diff --git a/doorstop/server/main.py b/doorstop/server/main.py
index b422bd0..1d4fdb3 100644
--- a/doorstop/server/main.py
+++ b/doorstop/server/main.py
@@ -11,7 +11,6 @@ from collections import defaultdict
 
 import bottle
 from bottle import get, hook, post, request, response, template
-
 from doorstop import build, common, publisher, settings
 from doorstop.common import HelpFormatter
 from doorstop.core import vcs

My Python version is 3.6.5. It would be bad if the output of the formatter depends on the host operating system.

@jacebrowning
Copy link
Member Author

jacebrowning commented Jul 12, 2019

It shouldn't depend on the Python or OS version. Did you run $ make ci against the latest develop? We might have to explicitly tell isort that doorstop is 1st-party and openpyxl is 3rd-party.=, like this: 9b02bc5

@sebhub
Copy link
Member

sebhub commented Jul 12, 2019

It is quite strange, when I do the make ci on the lastest develop branch I get:

make ci
poetry run isort doorstop --recursive --apply
poetry run black doorstop || echo "black requires Python 3.6+"
All done! ✨ 🍰 ✨
59 files left unchanged.

When I do it on the extended-reviewed branch I get:

make ci
poetry run isort doorstop --recursive --apply
Fixing /scratch/git-doorstop/doorstop/core/importer.py
Fixing /scratch/git-doorstop/doorstop/core/exporter.py
Fixing /scratch/git-doorstop/doorstop/core/publisher.py
Fixing /scratch/git-doorstop/doorstop/core/tests/test_all.py
Fixing /scratch/git-doorstop/doorstop/server/main.py
poetry run black doorstop || echo "black requires Python 3.6+"
All done! ✨ 🍰 ✨
59 files left unchanged.

The patch doesn't touch any of the reformatted files. The extended-reviewed history is:

* commit 9a7b023561b1b32e5222ad622118e41425ac70e4 (HEAD -> extended-reviewed, ting/extended-reviewed)
| Author: Ting Peng <ting.peng@embedded-brains.de>
| Date:   Fri Jun 21 11:39:19 2019 +0200
| 
|     Optionally add extended attr to the fingerprint
|     
|     Add a document configuration option (via .doorstop.yml) to specify a
|     list of attributes those values will be included in the item
|     fingerprint.
|     
|     Close #337.
| 
* commit 1d6b50aa57f342d75cce677975d528da2bee4415
| Author: Jace Browning <jacebrowning@gmail.com>
| Date:   Thu Jul 11 17:31:40 2019 -0400
| 
|     Remove coverage pragmas in favor of pattern matching
|   
*   commit 39e5897094773ffbb70eff9f199dffa74483610a
|\  Merge: b0e386c a19818b
| | Author: Jace Browning <jacebrowning@gmail.com>
| | Date:   Thu Jul 11 11:36:03 2019 -0400
| | 
| |     Merge pull request #363 from sebhub/doc-level
| |     
| |     Mention implicit typing issues in level docs

@jacebrowning
Copy link
Member Author

Maybe you need to rebase your branch on develop?

@sebhub
Copy link
Member

sebhub commented Jul 12, 2019

Hm, sorry for the trouble. I thought that I did a rebase a couple of minutes ago, but apparently I missed the commit from today. Time to go into the weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants