Skip to content
This repository has been archived by the owner on Jan 25, 2025. It is now read-only.

Declare properties as class attributes rather than via methods #141

Merged
merged 26 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e2c92ee
Reorganized properties as descriptors designed to be used from a data…
HalfWhitt Feb 21, 2024
3f49287
Copied over tests for new API
HalfWhitt Feb 27, 2024
745a682
Added more docstrings/comments, plus deprecation warnings
HalfWhitt Feb 27, 2024
f865269
Added commented-out list_property back
HalfWhitt Feb 27, 2024
35aa240
Added changenote
HalfWhitt Feb 27, 2024
09dfafe
Fixed name format in error message
HalfWhitt Feb 27, 2024
bf4f638
made error correctly mimic what would happen without the shim
HalfWhitt Feb 27, 2024
4678f93
Switched .items and .keys to use comprehensions
HalfWhitt Feb 27, 2024
344acf6
The hidden attributes can never be None, but they could be falsey
HalfWhitt Feb 27, 2024
49b9dc5
Change _applicator to property
HalfWhitt Feb 27, 2024
1db918a
Merged in main
HalfWhitt Feb 27, 2024
13ddcbf
Simplify param doc
HalfWhitt Feb 27, 2024
d5f1966
Removed duplicated filterwarnings, underscored _create_direcitons, an…
HalfWhitt Feb 27, 2024
8869ec9
Renamed new/old test files
HalfWhitt Feb 27, 2024
9deec51
Fixed import due to name change
HalfWhitt Feb 27, 2024
f6eaeb0
Updated to tests to pytest, and from 12-dev to 12 in CI.
HalfWhitt Feb 28, 2024
123a61c
Fixed search-and-replace error in directional assertions
HalfWhitt Feb 28, 2024
7ed1658
Parametrized old/new class definitions in test_declaration
HalfWhitt Feb 28, 2024
01b8270
Parametrized test_choices as well
HalfWhitt Feb 28, 2024
e19e09d
Added test: __init__ doesn't take positional args
HalfWhitt Feb 28, 2024
ef73563
Match param doc format in directional_property
HalfWhitt Feb 28, 2024
dea9107
Added trailing comma, re-added assert_property, reordered decorators
HalfWhitt Feb 29, 2024
84a8be5
Removed BadStyle from test_invalid_style
HalfWhitt Feb 29, 2024
adc015b
Removed brains from directional properties
HalfWhitt Mar 1, 2024
601e206
More accurate type hint for directional prop in test style
HalfWhitt Mar 1, 2024
6c26418
Removed debug prints
HalfWhitt Mar 4, 2024
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
5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12-dev" ]
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
include:
- experimental: false

- python-version: "3.12-dev"
experimental: true

steps:
- name: Checkout
uses: actions/checkout@v4.1.1
Expand Down
1 change: 1 addition & 0 deletions changes/141.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Validated properties of styles can now be defined as dataclass class attributes.
Loading