-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
224 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.1.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
args: ['--maxkb=10000'] | ||
- id: check-case-conflict | ||
- id: check-json | ||
- id: mixed-line-ending | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black | ||
|
||
- repo: https://github.com/asottile/blacken-docs | ||
rev: v1.12.1 | ||
hooks: | ||
- id: blacken-docs | ||
additional_dependencies: [black] | ||
|
||
- repo: https://github.com/timothycrosley/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black", "--filter-files"] | ||
|
||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.9.2 | ||
hooks: | ||
- id: flake8 | ||
|
||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.31.0 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py37-plus] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
[bdist_wheel] | ||
universal = 1 | ||
|
||
[flake8] | ||
max-line-length=121 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import os | ||
from setuptools import setup, find_packages | ||
from distutils.core import Command | ||
|
||
from setuptools import find_packages, setup | ||
|
||
|
||
def read(fname): | ||
with open(os.path.join(os.path.dirname(__file__), fname)) as f: | ||
|
@@ -50,50 +51,49 @@ def finalize_options(self): | |
|
||
def run(self): | ||
from django.conf import settings | ||
|
||
settings.configure( | ||
DATABASES={ | ||
'default': { | ||
'NAME': ':memory:', | ||
'ENGINE': 'django.db.backends.sqlite3' | ||
} | ||
"default": {"NAME": ":memory:", "ENGINE": "django.db.backends.sqlite3"} | ||
}, | ||
MIDDLEWARE_CLASSES=(), | ||
INSTALLED_APPS=('yamlfield',) | ||
INSTALLED_APPS=("yamlfield",), | ||
) | ||
from django.core.management import call_command | ||
import django | ||
from django.core.management import call_command | ||
|
||
django.setup() | ||
call_command('test', 'yamlfield') | ||
call_command("test", "yamlfield") | ||
|
||
|
||
setup( | ||
name='django-yamlfield', | ||
author='Ben Welsh', | ||
author_email='[email protected]', | ||
name="django-yamlfield", | ||
author="Ben Welsh", | ||
author_email="[email protected]", | ||
url="http://django-yamlfield.readthedocs.io/", | ||
description='A Django database field for storing YAML data', | ||
description="A Django database field for storing YAML data", | ||
long_description=read("README.md"), | ||
long_description_content_type="text/markdown", | ||
packages=find_packages(), | ||
include_package_data=True, | ||
license="MIT", | ||
install_requires=( | ||
'PyYAML>=3.10' | ||
), | ||
install_requires=("PyYAML>=3.10"), | ||
classifiers=[ | ||
'Development Status :: 5 - Production/Stable', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.7', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3.10', | ||
'Framework :: Django', | ||
'Framework :: Django :: 3.1', | ||
'Framework :: Django :: 4.0', | ||
'License :: OSI Approved :: MIT License', | ||
"Development Status :: 5 - Production/Stable", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Framework :: Django", | ||
"Framework :: Django :: 3.1", | ||
"Framework :: Django :: 4.0", | ||
"License :: OSI Approved :: MIT License", | ||
], | ||
cmdclass={'test': TestCommand,}, | ||
cmdclass={ | ||
"test": TestCommand, | ||
}, | ||
setup_requires=["setuptools_scm"], | ||
use_scm_version={"version_scheme": version_scheme, "local_scheme": local_version}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
default_app_config = 'yamlfield.apps.YAMLFieldAppConfig' | ||
default_app_config = "yamlfield.apps.YAMLFieldAppConfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
|
||
|
||
class YAMLFieldAppConfig(AppConfig): | ||
name = 'yamlfield' | ||
name = "yamlfield" | ||
verbose_name = "YAML field" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.