Skip to content

Commit

Permalink
💄 update coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
chfw committed Sep 4, 2020
1 parent f6a0dcd commit 737b671
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ lint:
yamllint -d "{extends: default, ignore: .moban.cd/changelog.yml}" .

format:
isort $(find moban -name "*.py"|xargs echo) $(find tests -name "*.py"|xargs echo)
git diff
black -l 79 moban
git diff
black -l 79 tests
git diff
bash format.sh

uml:
plantuml -tsvg -o ./images/ docs/*.uml
Expand Down
3 changes: 3 additions & 0 deletions format.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
isort $(find moban -name "*.py"|xargs echo) $(find tests -name "*.py"|xargs echo)
black -l 79 moban
black -l 79 tests
3 changes: 1 addition & 2 deletions moban/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from moban._version import __version__
from moban._version import __author__
from moban._version import __author__, __version__

__all__ = ("__author__", "__version__")
2 changes: 1 addition & 1 deletion moban/plugins/jinja2/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
from jinja2 import Environment
from lml.loader import scan_plugins_regex
from lml.plugin import PluginInfo, PluginManager
from jinja2_fsloader import FSLoader
from jinja2.exceptions import TemplateNotFound, TemplateSyntaxError

from moban import constants, exceptions
from jinja2_fsloader import FSLoader
from moban.externals import file_system

JINJA2_LIBRARIES = "^moban_jinja2_.+$"
Expand Down
2 changes: 1 addition & 1 deletion mobanfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ targets:
- min_requirements.txt: min_requirements.txt.jj2
- ".github/workflows/pythonpublish.yml": "pythonpublish.yml"
- "CONTRIBUTORS.rst": "CONTRIBUTORS.rst.jj2"

- format.sh: format.sh.jj2
1 change: 1 addition & 0 deletions tests/test_file_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ def test_mkdir_p():
@patch("subprocess.check_call")
def test_pip_install(fake_check_all):
import sys

from moban.deprecated import pip_install

pip_install(["package1", "package2"])
Expand Down
3 changes: 2 additions & 1 deletion tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ def test_handle_moban_file(self):
main.handle_moban_file(self.moban_file, {})

def test_check_none(self):
import moban.main as main
from ruamel.yaml import YAML

import moban.main as main

yaml = YAML()

invalid_data = [
Expand Down

0 comments on commit 737b671

Please sign in to comment.