Skip to content

Commit 0e32b49

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent eeafb21 commit 0e32b49

22 files changed

+88
-88
lines changed

src/coaster/assets.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@
3535

3636
# Version is not used here but is made available for others to import from
3737
__all__ = [
38-
'Version',
39-
'SimpleSpec',
40-
'VersionedAssets',
4138
'AssetNotFound',
4239
'AssetNotFoundError',
40+
'SimpleSpec',
41+
'Version',
42+
'VersionedAssets',
4343
'WebpackManifest',
4444
]
4545

src/coaster/auth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131
__all__ = [
3232
'CurrentAuth',
3333
'GetCurrentAuth',
34-
'add_auth_attribute',
3534
'add_auth_anchor',
36-
'request_has_auth',
35+
'add_auth_attribute',
3736
'current_auth',
37+
'request_has_auth',
3838
]
3939

4040

src/coaster/compat.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,31 +116,31 @@
116116
'SansIoRequest',
117117
'SansIoResponse',
118118
'abort',
119-
'app_ctx_object',
120119
'app_ctx',
120+
'app_ctx_object',
121121
'async_make_response',
122-
'async_render_template_string',
123122
'async_render_template',
123+
'async_render_template_string',
124124
'async_request',
125-
'current_app_object',
126125
'current_app',
126+
'current_app_object',
127127
'ensure_sync',
128128
'g',
129129
'has_app_context',
130130
'has_request_context',
131+
'json',
131132
'json_dump',
132133
'json_dumps',
133134
'json_load',
134135
'json_loads',
135-
'json',
136136
'jsonify',
137137
'make_response',
138138
'redirect',
139-
'render_template_string',
140139
'render_template',
140+
'render_template_string',
141+
'request',
141142
'request_ctx',
142143
'request_ctx',
143-
'request',
144144
'session',
145145
'sync_await',
146146
'url_for',

src/coaster/sqlalchemy/annotations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def get(cls, **kwargs):
5757

5858
from ..signals import coaster_signals
5959

60-
__all__ = ['annotations_configured', 'annotation_wrapper']
60+
__all__ = ['annotation_wrapper', 'annotations_configured']
6161

6262
# Global dictionary for temporary storage of annotations until the
6363
# mapper_configured events

src/coaster/sqlalchemy/comparators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
__all__ = [
1616
'SplitIndexComparator',
1717
'SqlSplitIdComparator',
18-
'SqlUuidHexComparator',
19-
'SqlUuidB64Comparator',
2018
'SqlUuidB58Comparator',
19+
'SqlUuidB64Comparator',
20+
'SqlUuidHexComparator',
2121
]
2222

2323

src/coaster/sqlalchemy/functions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
from .query import relationship
1616

1717
__all__ = [
18-
'make_timestamp_columns',
19-
'failsafe_add',
2018
'add_primary_relationship',
2119
'auto_init_default',
20+
'failsafe_add',
2221
'idfilters',
22+
'make_timestamp_columns',
2323
]
2424

2525
T = TypeVar('T')

src/coaster/sqlalchemy/immutable_annotation.py

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

1111
from .annotations import annotation_wrapper, annotations_configured
1212

13-
__all__ = ['immutable', 'cached', 'ImmutableColumnError']
13+
__all__ = ['ImmutableColumnError', 'cached', 'immutable']
1414

1515

1616
immutable = annotation_wrapper(

src/coaster/sqlalchemy/markdown.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
from ..utils import markdown as markdown_processor
1414

15-
__all__ = ['MarkdownComposite', 'MarkdownColumn', 'markdown_column']
15+
__all__ = ['MarkdownColumn', 'MarkdownComposite', 'markdown_column']
1616

1717

1818
class MarkdownComposite(MutableComposite):

src/coaster/sqlalchemy/mixins.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -81,24 +81,24 @@ class MyModel(BaseMixin[int], Model): # Integer serial primary key; alt: UUID
8181
from .roles import ActorType, RoleMixin, with_roles
8282

8383
__all__ = [
84-
'PkeyType',
85-
'IdentityOptions',
86-
'IdMixin',
87-
'TimestampMixin',
88-
'PermissionMixin',
89-
'UrlDict',
90-
'UrlForMixin',
91-
'NoIdMixin',
84+
'BaseIdNameMixin',
9285
'BaseMixin',
9386
'BaseNameMixin',
94-
'BaseScopedNameMixin',
95-
'BaseIdNameMixin',
9687
'BaseScopedIdMixin',
9788
'BaseScopedIdNameMixin',
89+
'BaseScopedNameMixin',
9890
'CoordinatesMixin',
99-
'UuidMixin',
100-
'RoleMixin',
91+
'IdMixin',
92+
'IdentityOptions',
93+
'NoIdMixin',
94+
'PermissionMixin',
95+
'PkeyType',
10196
'RegistryMixin',
97+
'RoleMixin',
98+
'TimestampMixin',
99+
'UrlDict',
100+
'UrlForMixin',
101+
'UuidMixin',
102102
]
103103

104104
PkeyType = TypeVar('PkeyType', int, UUID, default=int)

src/coaster/sqlalchemy/model.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,15 @@ class Other(Model): ...
9090
from flask_sqlalchemy import SQLAlchemy as FlaskSQLAlchemy
9191

9292
__all__ = [
93+
'DeclarativeBase', # From SQLAlchemy, re-exported for convenience
94+
'ModelBase',
9395
'bigint',
94-
'smallint',
9596
'int_pkey',
96-
'uuid4_pkey',
97+
'jsonb',
98+
'smallint',
9799
'timestamp',
98100
'timestamp_now',
99-
'jsonb',
100-
'ModelBase',
101-
'DeclarativeBase', # From SQLAlchemy, re-exported for convenience
101+
'uuid4_pkey',
102102
]
103103

104104
# --- SQLAlchemy type aliases ----------------------------------------------------------

src/coaster/sqlalchemy/pagination.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
MAX_PER_PAGE_DEFAULT: Final[int] = 100
2424

25-
__all__ = ['SelectPagination', 'QueryPagination']
25+
__all__ = ['QueryPagination', 'SelectPagination']
2626

2727

2828
class Pagination(Generic[_O]):

src/coaster/sqlalchemy/query.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@
3333
from .pagination import QueryPagination
3434

3535
__all__ = [
36+
'AppenderQuery',
3637
'BackrefWarning',
38+
'DynamicMapped',
3739
'ModelWarning',
3840
'Query',
39-
'AppenderQuery',
4041
'QueryProperty',
41-
'DynamicMapped',
4242
'Relationship',
43-
'relationship',
4443
'backref',
44+
'relationship',
4545
]
4646

4747
_T = TypeVar('_T', bound=Any)

src/coaster/sqlalchemy/registry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class MyView(ModelView): ...
5454

5555
from ..typing import ReturnDecorator, WrappedFunc
5656

57-
__all__ = ['Registry', 'InstanceRegistry', 'RegistryMixin']
57+
__all__ = ['InstanceRegistry', 'Registry', 'RegistryMixin']
5858

5959

6060
@final

src/coaster/sqlalchemy/roles.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -181,15 +181,15 @@ def roles_for(
181181

182182
__all__ = [
183183
'ActorType',
184-
'RoleGrantABC',
184+
'ConditionalRole',
185+
'DynamicAssociationProxy',
185186
'LazyRoleSet',
186187
'RoleAccessProxy',
187-
'DynamicAssociationProxy',
188+
'RoleGrantABC',
188189
'RoleMixin',
189190
'WithRoles',
190-
'ConditionalRole',
191-
'with_roles',
192191
'role_check',
192+
'with_roles',
193193
]
194194

195195
# Global dictionary for temporary storage of roles until the mapper_configured events
@@ -414,13 +414,13 @@ class LazyRoleSet(abc.MutableSet):
414414
"""Set that provides lazy evaluations for whether a role is present."""
415415

416416
__slots__ = (
417-
'obj',
418-
'actor',
419-
'anchors',
420-
'_present',
417+
'_contents_fully_evaluated',
421418
'_not_present',
419+
'_present',
422420
'_scanned_granted_by',
423-
'_contents_fully_evaluated',
421+
'actor',
422+
'anchors',
423+
'obj',
424424
)
425425

426426
def __init__(
@@ -695,7 +695,7 @@ class DynamicAssociationProxy(Generic[_V, _R]):
695695
when the relationship includes joins
696696
"""
697697

698-
__slots__ = ('rel', 'attr', 'qattr', 'name')
698+
__slots__ = ('attr', 'name', 'qattr', 'rel')
699699
name: Optional[str]
700700

701701
def __init__(
@@ -750,7 +750,7 @@ def __get__(
750750
class DynamicAssociationProxyBind(abc.Mapping, Generic[_T, _V, _R]):
751751
""":class:`DynamicAssociationProxy` bound to an instance."""
752752

753-
__slots__ = ('obj', 'rel', 'relattr', 'attr', 'qattr')
753+
__slots__ = ('attr', 'obj', 'qattr', 'rel', 'relattr')
754754
relattr: QueryBase
755755
qattr: Optional[QueryableAttribute]
756756

@@ -862,20 +862,20 @@ class RoleAccessProxy(abc.Mapping, Generic[RoleMixinType]):
862862
"""
863863

864864
__slots__ = (
865-
'_obj',
866-
'current_roles',
867-
'_roles',
868865
'_actor',
869866
'_anchors',
870-
'_datasets',
871-
'_dataset_attrs',
872867
'_call',
873-
'_read',
874-
'_write',
868+
'_dataset_attrs',
869+
'_datasets',
870+
'_dir_cache',
875871
'_no_call',
876872
'_no_read',
877873
'_no_write',
878-
'_dir_cache',
874+
'_obj',
875+
'_read',
876+
'_roles',
877+
'_write',
878+
'current_roles',
879879
)
880880
_obj: RoleMixinType
881881
current_roles: InspectableSet[Union[LazyRoleSet, set[str]]]
@@ -1481,7 +1481,7 @@ def __get__(
14811481
class ConditionalRoleBind(abc.Container, abc.Iterable, Generic[_CRM, _CRA]):
14821482
"""Wrapper for :class:`ConditionalRole` bound to an instance of the host class."""
14831483

1484-
__slots__ = ('__weakref__', '__self__', '_rolecheck')
1484+
__slots__ = ('__self__', '__weakref__', '_rolecheck')
14851485

14861486
def __init__(self, __cr: ConditionalRole[_CRM, _CRA], __obj: _CRM) -> None:
14871487
self._rolecheck = __cr

src/coaster/sqlalchemy/statemanager.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -249,18 +249,18 @@ class has more than one. All state managers must be in a valid ``from`` state fo
249249
from .roles import RoleAccessProxy, RoleMixin
250250

251251
__all__ = [
252-
'StateManager',
252+
'AbortTransition',
253253
'ManagedState',
254254
'ManagedStateGroup',
255-
'StateTransition',
256-
'StateManagerInstance',
257255
'ManagedStateInstance',
258-
'StateTransitionWrapper',
256+
'StateManager',
257+
'StateManagerInstance',
258+
'StateTransition',
259259
'StateTransitionError',
260-
'AbortTransition',
261-
'transition_error',
262-
'transition_before',
260+
'StateTransitionWrapper',
263261
'transition_after',
262+
'transition_before',
263+
'transition_error',
264264
'transition_exception',
265265
]
266266

src/coaster/utils/classes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424

2525
__all__ = [
2626
'DataclassFromType',
27-
'NameTitle',
28-
'LabeledEnum',
2927
'InspectableSet',
30-
'classproperty',
28+
'LabeledEnum',
29+
'NameTitle',
3130
'classmethodproperty',
31+
'classproperty',
3232
]
3333

3434
_T = TypeVar('_T')

src/coaster/utils/datetime.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
from pytz import BaseTzInfo, utc
1414

1515
__all__ = [
16-
'utcnow',
17-
'parse_isoformat',
18-
'parse_duration',
16+
'ParseError',
1917
'isoweek_datetime',
2018
'midnight_to_utc',
19+
'parse_duration',
20+
'parse_isoformat',
2121
'sorted_timezones',
22-
'ParseError',
22+
'utcnow',
2323
]
2424

2525

src/coaster/utils/markdown.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@
3535
)
3636

3737
__all__ = [
38-
'markdown',
3938
'MARKDOWN_HTML_TAGS',
40-
'default_markdown_extensions_html',
41-
'default_markdown_extensions',
4239
'default_markdown_extension_configs',
40+
'default_markdown_extensions',
41+
'default_markdown_extensions_html',
42+
'markdown',
4343
]
4444

4545

src/coaster/utils/text.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
from markupsafe import Markup
1717

1818
__all__ = [
19-
'VALID_TAGS',
20-
'LINKIFY_SKIP_TAGS',
2119
'LINKIFY_CALLBACKS',
20+
'LINKIFY_SKIP_TAGS',
21+
'VALID_TAGS',
2222
'compress_whitespace',
2323
'deobfuscate_email',
2424
'normalize_spaces',

0 commit comments

Comments
 (0)