Skip to content

Add support for ignoring file extensions in codespell - #3889

Closed
erik-whiting wants to merge 1 commit into
biopython:masterfrom
erik-whiting:update-codespell-config
Closed

erik-whiting wants to merge 1 commit into
biopython:masterfrom
erik-whiting:update-codespell-config

Conversation

@erik-whiting

Copy link
Copy Markdown
Contributor
  • I hereby agree to dual licence this and any previous contributions under both
    the Biopython License Agreement AND the BSD 3-Clause License.

  • I have read the CONTRIBUTING.rst file, have run pre-commit
    locally, and understand that continuous integration checks will be used to
    confirm the Biopython unit tests and style checks pass with these changes.

  • I have added my name to the alphabetical contributors listings in the files
    NEWS.rst and CONTRIB.rst as part of this pull request, am listed
    already, or do not wish to be listed. (This acknowledgement is optional.)

Closes #3888 . I added a second regex flag for ignoring file extensions in codespell. Also left a comment to guide future devs if they need to ignore more file extensions.

@erik-whiting
erik-whiting force-pushed the update-codespell-config branch from 94768a3 to c35fcab Compare March 25, 2022 21:06
@codecov

codecov Bot commented Mar 25, 2022 •

Copy link
Copy Markdown

Codecov Report

Merging #3889 (c35fcab) into master (c9b089b) will decrease coverage by 5.45%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3889      +/-   ##
==========================================
- Coverage   84.31%   78.85%   -5.46%     
==========================================
  Files         322      302      -20     
  Lines       55095    51975    -3120     
==========================================
- Hits        46452    40984    -5468     
- Misses       8643    10991    +2348     
Impacted Files Coverage Δ
Bio/PDB/PICIO.py 5.00% <0.00%> (-82.30%) ⬇️
Bio/Phylo/CDAOIO.py 4.46% <0.00%> (-80.36%) ⬇️
Bio/PDB/internal_coords.py 10.69% <0.00%> (-76.66%) ⬇️
Bio/phenotype/pm_fitting.py 12.28% <0.00%> (-75.44%) ⬇️
Bio/PDB/SCADIO.py 11.84% <0.00%> (-68.43%) ⬇️
Bio/PDB/mmtf/__init__.py 28.57% <0.00%> (-61.91%) ⬇️
Bio/Graphics/__init__.py 25.00% <0.00%> (-58.34%) ⬇️
Bio/Phylo/CDAO.py 42.85% <0.00%> (-57.15%) ⬇️
Bio/Phylo/_utils.py 25.00% <0.00%> (-52.41%) ⬇️
Bio/codonalign/codonseq.py 44.16% <0.00%> (-44.31%) ⬇️
... and 37 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c9b089b...c35fcab. Read the comment docs.

@erik-whiting

Copy link
Copy Markdown
Contributor Author

To any reviewers: I think the codecov failure is a false-positive as I didn't update any files that can be tested

@peterjc

peterjc commented Mar 31, 2022

Copy link
Copy Markdown
Member

Yes, see #3752 - if no one can work out why that happens we may want to turn off the CodeCov PR check (it is already not required).

@peterjc

peterjc commented Mar 31, 2022

Copy link
Copy Markdown
Member

The usage in #3888 was not about filenames ending .aks but Python code referring to an attribute which would be accessed with .aks instead.

The regex is already complicated and I am unwilling to make it more complicated. While you can ignore words with the codespell regex setting (--ignore-regex), I think using -L would be far simpler here.

Also note . has a special meaning in a regex.

@peterjc peterjc closed this Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

codespell blocking documentation commit on attribute name

2 participants