no-defaults 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,22 @@
1
+ name: Bug report
2
+ description: Report incorrect diagnostics, fixes, crashes, or configuration behavior.
3
+ title: "Bug: "
4
+ labels: [bug]
5
+ body:
6
+ - type: textarea
7
+ attributes:
8
+ label: Reproduction
9
+ description: Include minimal Python, pyproject.toml, and the exact command.
10
+ validations:
11
+ required: true
12
+ - type: input
13
+ attributes:
14
+ label: no-defaults version
15
+ placeholder: no-defaults 1.0.0
16
+ validations:
17
+ required: true
18
+ - type: textarea
19
+ attributes:
20
+ label: Expected and actual behavior
21
+ validations:
22
+ required: true
@@ -0,0 +1,5 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Security vulnerability
4
+ url: https://github.com/adamtheturtle/no-defaults/security/advisories/new
5
+ about: Report security issues privately.
@@ -0,0 +1,13 @@
1
+ name: Feature request
2
+ description: Suggest a rule, configuration, output, or integration improvement.
3
+ title: "Feature: "
4
+ labels: [enhancement]
5
+ body:
6
+ - type: textarea
7
+ attributes:
8
+ label: Problem and proposed behavior
9
+ validations:
10
+ required: true
11
+ - type: textarea
12
+ attributes:
13
+ label: Alternatives considered
@@ -0,0 +1,14 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: cargo
4
+ directory: /
5
+ schedule:
6
+ interval: weekly
7
+ cooldown:
8
+ default-days: 7
9
+ - package-ecosystem: github-actions
10
+ directory: /
11
+ schedule:
12
+ interval: weekly
13
+ cooldown:
14
+ default-days: 7
@@ -0,0 +1,29 @@
1
+ name: Typeshed benchmark
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ schedule:
6
+ - cron: '17 4 * * 1'
7
+
8
+ permissions: {}
9
+
10
+ jobs:
11
+ typeshed:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
15
+ with:
16
+ persist-credentials: false
17
+ - uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
18
+ - uses: Swatinem/rust-cache@42dc69e1aa15d09112580998cf2ef0119e2e91ae # v2
19
+ - name: Build optimized binary
20
+ run: cargo build --locked --release
21
+ - name: Check out pinned Typeshed
22
+ uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
23
+ with:
24
+ repository: python/typeshed
25
+ ref: a75102fa81ec49fcac4facc98ea6cd5e32567983
26
+ path: benchmark/typeshed
27
+ persist-credentials: false
28
+ - name: Run real-project benchmark
29
+ run: bash scripts/benchmark-typeshed.sh benchmark/typeshed 10
@@ -0,0 +1,28 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ permissions: {}
10
+
11
+ jobs:
12
+ test:
13
+ strategy:
14
+ matrix:
15
+ os: [ubuntu-latest, macos-latest, windows-latest]
16
+ runs-on: ${{ matrix.os }}
17
+ steps:
18
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
19
+ with:
20
+ persist-credentials: false
21
+ - uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
22
+ with:
23
+ components: rustfmt, clippy
24
+ - uses: Swatinem/rust-cache@42dc69e1aa15d09112580998cf2ef0119e2e91ae # v2
25
+ - run: cargo test --locked
26
+ - run: cargo fmt --check
27
+ - run: cargo clippy --locked --all-targets -- -D warnings
28
+ - run: cargo build --locked --release
@@ -0,0 +1,90 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags: ['v*']
6
+ workflow_dispatch:
7
+ inputs:
8
+ tag:
9
+ description: Existing tag to publish
10
+ required: true
11
+ type: string
12
+
13
+ permissions: {}
14
+
15
+ jobs:
16
+ wheels:
17
+ strategy:
18
+ matrix:
19
+ os: [ubuntu-latest, macos-latest, windows-latest]
20
+ runs-on: ${{ matrix.os }}
21
+ steps:
22
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
23
+ with:
24
+ ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref }}
25
+ persist-credentials: false
26
+ - uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
27
+ - uses: astral-sh/setup-uv@94527f2e458b27549849d47d273a16bec83a01e9 # v7
28
+ with:
29
+ enable-cache: false
30
+ - name: Build wheel
31
+ run: uvx maturin build --locked --release --out dist
32
+ - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
33
+ with:
34
+ name: wheel-${{ matrix.os }}
35
+ path: dist/*.whl
36
+ if-no-files-found: error
37
+
38
+ sdist:
39
+ runs-on: ubuntu-latest
40
+ steps:
41
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
42
+ with:
43
+ ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref }}
44
+ persist-credentials: false
45
+ - uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
46
+ - uses: astral-sh/setup-uv@94527f2e458b27549849d47d273a16bec83a01e9 # v7
47
+ with:
48
+ enable-cache: false
49
+ - name: Build source distribution
50
+ run: uvx maturin sdist --out dist
51
+ - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
52
+ with:
53
+ name: sdist
54
+ path: dist/*.tar.gz
55
+ if-no-files-found: error
56
+
57
+ github-release:
58
+ needs: [wheels, sdist]
59
+ runs-on: ubuntu-latest
60
+ permissions:
61
+ contents: write
62
+ steps:
63
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
64
+ with:
65
+ pattern: '*'
66
+ path: dist
67
+ merge-multiple: true
68
+ - name: Create GitHub Release
69
+ env:
70
+ GH_TOKEN: ${{ github.token }}
71
+ TAG: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name }}
72
+ run: gh release create "$TAG" dist/* --generate-notes --verify-tag
73
+
74
+ pypi:
75
+ needs: [wheels, sdist]
76
+ runs-on: ubuntu-latest
77
+ environment:
78
+ name: pypi
79
+ url: https://pypi.org/p/no-defaults
80
+ permissions:
81
+ id-token: write
82
+ steps:
83
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
84
+ with:
85
+ pattern: '*'
86
+ path: dist
87
+ merge-multiple: true
88
+ - uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1
89
+ with:
90
+ packages-dir: dist
@@ -0,0 +1,4 @@
1
+ /target
2
+ /dist
3
+ /.venv
4
+ *.pyc
@@ -0,0 +1,7 @@
1
+ - id: no-defaults
2
+ name: no-defaults
3
+ description: Forbid function and dataclass defaults.
4
+ entry: no-defaults
5
+ language: python
6
+ types: [python]
7
+ require_serial: true
@@ -0,0 +1,26 @@
1
+ # Changelog
2
+
3
+ All notable changes follow [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and releases follow semantic versioning.
4
+
5
+ ## 1.0.0 - 2026-08-05
6
+
7
+ ### Added
8
+
9
+ - Ruff-style closest-configuration discovery and per-file enforcement.
10
+ - Ruff-style full, concise, JSON, and GitHub Actions output.
11
+ - `--fix`, `--diff`, `--show-settings`, inline `noqa`, and file-level `ruff: noqa` support.
12
+ - Atomic fixes that preserve non-default dataclass `field(...)` metadata.
13
+ - A pinned Typeshed benchmark and real-project integration fixture.
14
+ - Cross-platform wheel, GitHub Release, and trusted PyPI publishing automation.
15
+
16
+ ### Changed
17
+
18
+ - Unannotated dataclass class attributes are no longer treated as fields.
19
+
20
+ ## 0.2.0 - 2026-08-05
21
+
22
+ - Added per-file enforcement, private modules, Ruff-like summaries, and automatic fixes.
23
+
24
+ ## 0.1.0 - 2026-08-05
25
+
26
+ - Initial public release.
@@ -0,0 +1,23 @@
1
+ # Contributing
2
+
3
+ Issues and pull requests are welcome.
4
+
5
+ ## Development
6
+
7
+ Install stable Rust, then run the same checks as CI:
8
+
9
+ ```console
10
+ cargo test --locked
11
+ cargo fmt --check
12
+ cargo clippy --locked --all-targets -- -D warnings
13
+ cargo build --locked --release
14
+ ```
15
+
16
+ Use `cargo run -- path/to/project` to exercise a development build. Add regression tests for behavior changes and run `scripts/benchmark-typeshed.sh` when changing parsing, traversal, configuration discovery, or diagnostic generation.
17
+
18
+ ## Pull requests
19
+
20
+ - Keep each pull request focused.
21
+ - Document user-visible behavior in `README.md` and `CHANGELOG.md`.
22
+ - Do not weaken the zero-warning Clippy gate.
23
+ - Add a `noqa` or declined fix only when the behavior is intentional and explained.