Skip to content

Work in progress: Refactor #232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 32 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
259b119
Test for memory leaks as described in #198
dairiki Sep 24, 2022
387afb3
Possible fix for #198: memory leak
dairiki Sep 24, 2022
6416dc9
Optimization: avoid holding frame reference when locals == globals
dairiki Sep 25, 2022
fd04f8c
Get caller frame at decoration-time
dairiki Sep 25, 2022
9093446
Add ability to pass explicit localns (and globalns) to class_schema
dairiki Sep 25, 2022
e693bb0
test(mypy): move mypy config from setup.cfg to pyproject.toml
dairiki Jan 19, 2023
075b3a7
fix: mypy plugin loading under pre-commit
dairiki Jan 20, 2023
4312042
refactor: convert _SchemaContext to dataclass
dairiki Jan 16, 2023
0f113c5
refactor: move base_schema into _SchemaContext
dairiki Jan 16, 2023
d95e171
refactor: _field_for_generic_type: pass metadata without splat
dairiki Jan 16, 2023
01c71da
refactor: add _SchemaContext.get_type_mapping
dairiki Jan 18, 2023
f5cadbd
refactor: delete _field_by_type
dairiki Jan 16, 2023
449ef1a
feat: support generic dataclasses
dairiki Jan 16, 2023
84e7736
test(mypy): fix mypy errors in python <= 3.9
dairiki Jan 21, 2023
d25261a
fix: raise exception if generic class passed to decorator
dairiki Jan 19, 2023
8491d0c
test: check for frame leakage when decorators throw exceptions
dairiki Jan 19, 2023
e0aad11
refactor: delete _generic_type_add_any
dairiki Jan 17, 2023
39cfa30
refactor: disuse lru_cache in favor of an _LRUDict
dairiki Jan 17, 2023
769ebc6
feat: Do not auto-dataclassify non-dataclasses
dairiki Jan 17, 2023
d1d5249
fix: check for generic base classes
dairiki Jan 19, 2023
b4330b2
chore: remove workaround for bug in mypy < 0.990
dairiki Jan 18, 2023
3e2667c
chore(typing): fix type annotations for add_schema
dairiki Jan 18, 2023
00a9718
fix: lazy_class_attribute
dairiki Jan 19, 2023
ae08afd
feat: check type of metadata["marshmallow_field"]
dairiki Jan 18, 2023
484c2b3
feat(mypy plugin): add type annotation for Schema attribute to datacl…
dairiki Jan 19, 2023
6a0b05a
chore: clean up type annotations
dairiki Jan 19, 2023
76ccff5
test(mypy): turn on strict checking of marshmallow_dataclass
dairiki Jan 19, 2023
60d8f95
refactor: make context-dependent functions methods of the context
dairiki Jan 19, 2023
2a26a24
fix: type annotations for class_schema and field_for_schema
dairiki Jan 20, 2023
5642fe2
refactor: clean up generic alias parameter mapping
dairiki Jan 20, 2023
948c145
refactor: disuse homegrown _LRUDict in favor of cachetools
dairiki Jan 21, 2023
bf5975c
test(coverage): adjust exclusions from coverage reports
dairiki Jan 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ repos:
rev: v0.991
hooks:
- id: mypy
additional_dependencies: [marshmallow-enum,typeguard,marshmallow]
additional_dependencies:
- marshmallow
- marshmallow-enum
- pytest
- typeguard
- types-cachetools
- types-setuptools
- typing-inspect
args: [--show-error-codes]
- repo: https://github.com/asottile/blacken-docs
rev: v1.12.1
Expand Down
Loading