Commit b8adcea
committed
fix: F841 (unused variables)
After deleting variables, some bare expressions were deleted:
Bare expressions deleted (no side effects — entire line removed):
File: brain_observatory/circle_plots.py
Deleted expression: r * np.cos(angle), r * np.sin(angle)
Why: Pure arithmetic
────────────────────────────────────────
File: brain_observatory/ecephys/.../view_blocks.py
Deleted expression: recorded_blocks[0] → pass
Why: Bare index in else clause
────────────────────────────────────────
File: brain_observatory/eye_tracking/.../DLC_Ellipse_Fitting.py
Deleted expression: 1-frac_completed
Why: Pure arithmetic
────────────────────────────────────────
File: internal/brain_observatory/demix_report.py
Deleted expression: np.zeros(mask.shape)
Why: Array allocated and discarded
────────────────────────────────────────
File: internal/brain_observatory/frame_stream.py
Deleted expression: np.prod(self.frame_shape)
Why: Pure computation
────────────────────────────────────────
File: internal/brain_observatory/roi_filter.py
Deleted expression: create_feature_array(...) → pass
Why: Returns value, no mutation
────────────────────────────────────────
File: internal/ephys/plot_qc_figures.py
Deleted expression: cell_features["long_squares"]["sweeps"]
Why: Dict lookup
────────────────────────────────────────
File: internal/ephys/plot_qc_figures3.py
Deleted expression: cell_features["long_squares"]["sweeps"]
Why: Dict lookup
────────────────────────────────────────
File: internal/model/GLM.py
Deleted expression: kbasprs['b']
Why: Dict lookup
────────────────────────────────────────
File: internal/model/biophysical/fit_stage_1.py
Deleted expression: neuronal_model_data['specimen_id']
Why: Dict lookup
────────────────────────────────────────
File: internal/model/biophysical/make_deap_fit_json.py
Deleted expression: os.path.realpath(os.curdir)
Why: Pure path op
────────────────────────────────────────
File: internal/model/biophysical/passive_fitting/preprocess.py
Deleted expression: down_idxs[1] - down_idxs[0]
Why: Pure arithmetic
────────────────────────────────────────
File: internal/model/glif/error_functions.py
Deleted expression: input_data['subthreshold_long_square_voltage_variance'], np.arange(...)*experiment.neuron.dt, [e.data['interpolated_ISI']] (dead code after raise)
Why: Dict lookup, pure computation, unreachable
────────────────────────────────────────
File: internal/model/glif/preprocess_neuron.py
Deleted expression: sweep_index[...][RESTING_POTENTIAL]*1e-3, long_square_config['all'], long_square_config['subthreshold'], np.mean(El_test_list)
Why: Dict lookups, pure computation
────────────────────────────────────────
File: internal/model/glif/spike_cutting.py
Deleted expression: np.var(xdata)
Why: Pure computation
────────────────────────────────────────
File: internal/pipeline_modules/IVSCC/ephys_nwb/qc.py
Deleted expression: sweep_data['response'], sweep_data['sampling_rate']
Why: Dict lookups
────────────────────────────────────────
File: internal/pipeline_modules/run_neuropil_correction.py
Deleted expression: np.array([...]).mean()
Why: Pure computation
────────────────────────────────────────
File: internal/pipeline_modules/run_observatory_container_thumbnails.py
Deleted expression: input_file['output_json']
Why: Dict lookup
────────────────────────────────────────
File: model/glif/glif_neuron_methods.py
Deleted expression: tcs['voltage'][-1]
Why: Dict/index lookup
────────────────────────────────────────
File: brain_observatory/behavior/swdb/summary_figures.py
Deleted expression: int(session.metadata['ophys_frame_rate'])
Why: Pure type conversion
Bare expressions kept (have side effects):
┌────────────────────────────────────────────────────────┬──────────────────────────────────┐
│ Expression │ Why kept │
├────────────────────────────────────────────────────────┼──────────────────────────────────┤
│ hero_sweep.sweep_feature("adapt"/"latency"/"mean_isi") │ Forces lazy feature caching │
├────────────────────────────────────────────────────────┼──────────────────────────────────┤
│ swp.sweep_feature("v_baseline") │ Same caching pattern │
├────────────────────────────────────────────────────────┼──────────────────────────────────┤
│ i_vec.as_numpy() │ NEURON vector conversion │
├────────────────────────────────────────────────────────┼──────────────────────────────────┤
│ subprocess.check_output([...]) (3 calls) │ Runs external fitting processes │
├────────────────────────────────────────────────────────┼──────────────────────────────────┤
│ p.map(func, types) │ Multiprocessing execution │
├────────────────────────────────────────────────────────┼──────────────────────────────────┤
│ description.manifest.get_path(...) │ Manifest path resolution │
├────────────────────────────────────────────────────────┼──────────────────────────────────┤
│ plt.subplot2grid(...) │ Creates subplot in figure layout │
├────────────────────────────────────────────────────────┼──────────────────────────────────┤
│ All allensdk/test/ expressions │ Smoke tests exercising APIs │
└────────────────────────────────────────────────────────┴──────────────────────────────────┘1 parent a1e1084 commit b8adcea
74 files changed
Lines changed: 180 additions & 258 deletions
File tree
- allensdk
- api/queries
- brain_observatory
- behavior
- swdb
- sync
- ecephys/stimulus_table/visualization
- eye_tracking/stage_2
- ephys
- internal
- brain_observatory
- ephys
- model
- biophysical
- passive_fitting
- glif
- pipeline_modules
- IVSCC/ephys_nwb
- model
- biophysical
- glif
- test
- api
- cloud_cache
- brain_observatory
- ecephys
- stimulus_table
- extract_running_speed
- receptive_field_analysis
- core
- ephys
- internal
- api
- biophysical
- mouse_connectivity/test_projection_thumbnail
- mouse_connectivity/grid
- scripts/brain_observatory
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 | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
| 333 | + | |
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| |||
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
386 | | - | |
| 386 | + | |
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
| |||
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | 448 | | |
452 | 449 | | |
453 | 450 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
670 | 670 | | |
671 | 671 | | |
672 | 672 | | |
673 | | - | |
| 673 | + | |
674 | 674 | | |
675 | 675 | | |
676 | 676 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
611 | 611 | | |
612 | 612 | | |
613 | 613 | | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | 614 | | |
618 | 615 | | |
619 | 616 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | 64 | | |
66 | 65 | | |
67 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | 74 | | |
76 | 75 | | |
77 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
141 | | - | |
142 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
400 | | - | |
401 | 400 | | |
402 | 401 | | |
403 | 402 | | |
| |||
0 commit comments