Skip to content

Commit

Permalink
chore(format)
Browse files Browse the repository at this point in the history
  • Loading branch information
linhandev committed Sep 14, 2022
1 parent 728731a commit dc949de
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 19 deletions.
34 changes: 17 additions & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: no-commit-to-branch
- id: no-commit-to-branch
args: [--branch, stable]
- id: check-added-large-files
- id: check-added-large-files
args: [--maxkb=16]
- id: check-case-conflict
- id: check-yaml
- id: check-xml
- id: check-toml
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: mixed-line-ending
args: [--fix=lf ]
- id: end-of-file-fixer
- id: trailing-whitespace
- id: pretty-format-json
- id: check-case-conflict
- id: check-yaml
- id: check-xml
- id: check-toml
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: mixed-line-ending
args: [--fix=lf]
- id: end-of-file-fixer
- id: trailing-whitespace
- id: pretty-format-json
args: [--autofix, --indent=4, --no-ensure-ascii]

- repo: https://github.com/psf/black
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
- id: black
2 changes: 1 addition & 1 deletion paddlelabel/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def run():
logging.getLogger("PaddleLabel").setLevel(logging.DEBUG)

if args.debug:
logging.getLogger("werkzeug").setLevel(logging.ERROR)
logging.getLogger("werkzeug").setLevel(logging.INFO)
logging.getLogger("PaddleLabel").setLevel(logging.DEBUG)

logger.info("App starting")
Expand Down
6 changes: 5 additions & 1 deletion paddlelabel/serve.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os.path as osp
from importlib import resources

from flask_cors import CORS
import flask
Expand Down Expand Up @@ -26,10 +27,13 @@ def index():
from paddlelabel.config import basedir
from paddlelabel.api.controller.setting import init_site_settings

init_site_settings(osp.join(basedir, "default_setting.json"))
init_site_settings(resources.path("paddlelabel", "default_setting.json"))


# yml_path = resources.path("paddlelabel", "openapi.yml")
# print(dir(yml_path))
connexion_app.add_api(
# str(yml_path),
osp.join(curr_dir, "openapi.yml"),
resolver=Resolver("paddlelabel.api", collection_endpoint_name="get_all"),
# request with undefined param returns error, dont enforce body
Expand Down

0 comments on commit dc949de

Please sign in to comment.