Skip to content

Commit 7c2e9a0

Browse files
committed
Consolidate package config to pyproject.toml
1 parent 5300abd commit 7c2e9a0

File tree

105 files changed

+450
-380
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+450
-380
lines changed

.pre-commit-config.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
---
22
repos:
33

4-
- repo: https://github.com/miki725/importanize
5-
rev: '0.7'
6-
hooks:
7-
- id: importanize
8-
language_version: python3
9-
104
- repo: https://github.com/psf/black
115
rev: 22.6.0
126
hooks:
137
- id: black
148
language_version: python3
159

10+
11+
- repo: https://github.com/pycqa/isort
12+
rev: 5.10.1
13+
hooks:
14+
- id: isort
15+
name: isort (python)
16+
1617
- repo: https://github.com/asottile/pyupgrade
1718
rev: v2.37.3
1819
hooks:
1920
- id: pyupgrade
2021
args: [--py3-plus]
2122

2223
- repo: https://github.com/myint/docformatter
23-
rev: v1.4
24+
rev: v1.5.0-rc1
2425
hooks:
2526
- id: docformatter
2627

27-
- repo: https://github.com/PyCQA/flake8
28-
rev: 5.0.2
28+
- repo: https://github.com/flakeheaven/flakeheaven
29+
rev: 3.0.0
2930
hooks:
30-
- id: flake8
31-
exclude: deployment/roles
31+
- id: flakeheaven
3232
additional_dependencies:
3333
- flake8-bugbear
3434
- flake8-comprehensions

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ include *.txt
77
include *.yaml *.yml
88
include LICENSE
99
include Makefile
10-
include pytest.ini
1110
include tox.ini
1211
include Dockerfile
1312
exclude .*

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ next: # print next version
8080
@echo $(NEXT)
8181

8282
bump: history
83-
@sed -i 's/$(VERSION)/$(NEXT)/g' $(PACKAGE)/__version__.py
83+
@sed -i 's/$(VERSION)/$(NEXT)/g' $(PACKAGE)/__init__.py
8484
@sed -i 's/Next version (unreleased yet)/$(NEXT) ($(shell date +"%Y-%m-%d"))/g' HISTORY.rst
8585
@git add .
8686
@git commit -am "Bump version: $(VERSION)$(NEXT)"

django_sorcery/__init__.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
from .__version__ import (
2-
__author__,
3-
__author_email__,
4-
__description__,
5-
__version__,
6-
)
1+
__version__ = "0.12.0"
72

8-
9-
__all__ = [
10-
"__author__",
11-
"__author_email__",
12-
"__description__",
13-
"__version__",
14-
]
3+
VERSION = tuple(__version__.split("."))

django_sorcery/__version__.py

Lines changed: 0 additions & 4 deletions
This file was deleted.

django_sorcery/db/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,5 +141,4 @@
141141
from .sqlalchemy import SQLAlchemy # noqa
142142
from .utils import dbdict
143143

144-
145144
databases = dbdict()

django_sorcery/db/fields.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
from .url import DIALECT_MAP_TO_DJANGO
1212

13-
1413
__all__ = [
1514
"BigIntegerField",
1615
"BinaryField",

django_sorcery/db/meta/column.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import enum
55
from contextlib import suppress
66

7-
import sqlalchemy as sa
87
from dateutil.parser import parse
8+
import sqlalchemy as sa
99
from django import forms as djangoforms
1010
from django.conf import settings
1111
from django.core import validators as djangovalidators

django_sorcery/db/meta/model.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
"""Metadata for sqlalchemy models."""
2-
from collections import OrderedDict, namedtuple
2+
from collections import OrderedDict
3+
from collections import namedtuple
34
from functools import partial
45
from itertools import chain
56

67
import inflect
78
import sqlalchemy as sa
89
from django.apps import apps
9-
from django.core.exceptions import FieldDoesNotExist, ValidationError
10+
from django.core.exceptions import FieldDoesNotExist
11+
from django.core.exceptions import ValidationError
1012

1113
from ...exceptions import NestedValidationError
1214
from ...validators import ValidationRunner
@@ -15,7 +17,6 @@
1517
from .composite import composite_info
1618
from .relations import relation_info
1719

18-
1920
Identity = namedtuple("Key", ["model", "pk"])
2021
inflector = inflect.engine()
2122

django_sorcery/db/meta/relations.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ def formfield(self, form_class=None, **kwargs):
9595
return form_class(self.related_model, **field_kwargs)
9696

9797
def get_form_class(self):
98-
from ...fields import ModelChoiceField, ModelMultipleChoiceField
98+
from ...fields import ModelChoiceField
99+
from ...fields import ModelMultipleChoiceField
99100

100101
if self.uselist:
101102
return ModelMultipleChoiceField

0 commit comments

Comments
 (0)