Commit 16fadfe
Enable Ruff pre-commit hooks (#1957)
* Initial plan
* Enable Ruff pre-commit hooks in .pre-commit-config.yaml
Co-authored-by: crcrpar <[email protected]>
* run pre-commit
Signed-off-by: Masaki Kozuki <[email protected]>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add Ruff configuration to pyproject.toml with line-length 100
Co-authored-by: crcrpar <[email protected]>
* Add ruff ignore rules with occurrence statistics to pyproject.toml
Configure ruff to ignore common code style violations that are
present throughout the codebase. Added occurrence counts for each
ignored rule, sorted by count (ascending) to help prioritize
which violations to fix first. This allows the ruff pre-commit
hook to pass while providing visibility into the scope of each
violation type.
Ignored rules include:
- E731 (6 occurrences) - lambda assignment
- E721, E741 (8 occurrences) - type comparison, ambiguous names
- E712, F403 (9 occurrences) - comparison to True/False, star imports
- E701, E711 (10-11 occurrences) - multiple statements, None comparison
- F821, E722 (14-15 occurrences) - undefined names, bare except
- E402, F401 (41-45 occurrences) - import issues
- F841, F405 (52-80 occurrences) - unused variables, star imports
Signed-off-by: Masaki Kozuki <[email protected]>
---------
Signed-off-by: Masaki Kozuki <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: crcrpar <[email protected]>
Co-authored-by: Masaki Kozuki <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>1 parent 27e0e89 commit 16fadfe
177 files changed
Lines changed: 11624 additions & 6465 deletions
File tree
- apex
- contrib
- bottleneck
- clip_grad
- conv_bias_relu
- csrc/group_norm_v2
- cudnn_gbn
- examples
- gpu_direct_storage
- multihead_attn
- nccl_allocator
- fmha
- focal_loss
- gpu_direct_storage
- group_norm
- groupbn
- index_mul_2d
- layer_norm
- multihead_attn
- nccl_allocator
- openfold_triton
- optimizers
- peer_memory
- sparsity
- permutation_search_kernels
- permutation_tests
- test
- test
- bottleneck
- clip_grad
- conv_bias_relu
- cudnn_gbn
- fmha
- focal_loss
- fused_dense
- group_norm
- index_mul_2d
- layer_norm
- multihead_attn
- openfold_triton
- optimizers
- peer_memory
- transducer
- xentropy
- torchsched
- inductor
- ops
- transducer
- xentropy
- fused_dense
- mlp
- multi_tensor_apply
- normalization
- optimizers
- transformer
- _data
- amp
- functional
- layers
- pipeline_parallel
- schedules
- tensor_parallel
- testing
- docs/source
- tests
- L0
- run_fused_layer_norm
- run_mlp
- run_optimizers
- run_transformer
- L1
- common
- transformer
- distributed
- DDP
- amp_master_params
- synced_batchnorm
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | | - | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
| 44 | + | |
38 | 45 | | |
39 | 46 | | |
40 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
0 commit comments