Skip to content

Commit

Permalink
Vendoring dependencies Fix #301
Browse files Browse the repository at this point in the history
  • Loading branch information
rochacbruno committed May 22, 2020
1 parent 343628f commit d53463f
Show file tree
Hide file tree
Showing 85 changed files with 28,802 additions and 8 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ omit =
dynaconf/loaders/vault_loader.py
dynaconf/loaders/__init__.py
dynaconf/example/*
dynaconf/vendor/*
dynaconf/contrib/django_dynaconf/*
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,40 @@ repos:
- id: reorder-python-imports
language_version: python3
args: [--py3-plus]
exclude: ^dynaconf/vendor
- repo: https://github.com/ambv/black
rev: stable
hooks:
- id: black
args: [--line-length=79]
language_version: python3
exclude: ^dynaconf/vendor
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.0.0
hooks:
- id: trailing-whitespace
language_version: python3
exclude: ^dynaconf/vendor
- id: end-of-file-fixer
language_version: python3
exclude: ^dynaconf/vendor
- id: check-yaml
language_version: python3
exclude: ^dynaconf/vendor
- id: check-merge-conflict
language_version: python3
exclude: ^dynaconf/vendor
- id: debug-statements
language_version: python3
exclude: ^dynaconf/vendor
- id: fix-encoding-pragma
language_version: python3
exclude: ^dynaconf/vendor
args: [--remove]
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.0
hooks:
- id: flake8
args: ['--ignore=F403,W504,W503,F841,E401,F401,E402']
language_version: python3
exclude: ^dynaconf/vendor
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ test: pep8 test_only

install:
pip install --upgrade pip
python setup.py develop
pip install -r requirements_dev.txt
make setup-pre-commit

Expand All @@ -151,7 +150,7 @@ pep8:
# F841 (local variable assigned but never used, useful for debugging on exception)
# W504 (line break after binary operator, I prefer to put `and|or` at the end)
# F403 (star import `from foo import *` often used in __init__ files)
flake8 dynaconf --ignore=F403,W504,W503,F841,E401,F401,E402
flake8 dynaconf --ignore=F403,W504,W503,F841,E401,F401,E402 --exclude=dynaconf/vendor

dist: clean
@python setup.py sdist bdist_wheel
Expand Down
17 changes: 12 additions & 5 deletions dynaconf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
from dynaconf.base import LazySettings
from dynaconf.contrib import DjangoDynaconf
from dynaconf.contrib import FlaskDynaconf
from dynaconf.validator import ValidationError
from dynaconf.validator import Validator
import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), "vendor"))

from dynaconf.base import LazySettings # noqa
from dynaconf.contrib import DjangoDynaconf # noqav
from dynaconf.contrib import FlaskDynaconf # noqa
from dynaconf.validator import ValidationError # noqa
from dynaconf.validator import Validator # noqa

settings = LazySettings()
Dynaconf = LazySettings # noqa

__all__ = [
"settings",
"Dynaconf",
"LazySettings",
"Validator",
"FlaskDynaconf",
Expand Down
Empty file added dynaconf/vendor/__init__.py
Empty file.
6 changes: 6 additions & 0 deletions dynaconf/vendor/box/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## python-box

Vendored dep taken from: https://github.com/cdgriffith/Box
Licensed under MIT: https://github.com/cdgriffith/Box/blob/master/LICENSE

Current version: 4.2.3
12 changes: 12 additions & 0 deletions dynaconf/vendor/box/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env python
# -*- coding: UTF-8 -*-

__author__ = 'Chris Griffith'
__version__ = '4.2.3'

from box.box import Box
from box.box_list import BoxList
from box.config_box import ConfigBox
from box.shorthand_box import SBox
from box.exceptions import BoxError, BoxKeyError
from box.from_file import box_from_file
Loading

0 comments on commit d53463f

Please sign in to comment.