Skip to content

Commit

Permalink
Apply codespell, ignoring "heterogenous"
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmbland committed Oct 24, 2024
1 parent 126371f commit b33485d
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .codespell_ignore.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tabl
heterogenous
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,8 @@ repos:
hooks:
- id: markdownlint-fix
args: [--disable, MD013, MD033, MD036, MD041, MD040, --]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args: [-I, .codespell_ignore.txt]
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
identity and expression, level of experience, education, socioeconomic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

Expand Down
2 changes: 1 addition & 1 deletion docs/config_tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ the HTML is generated from each source without having to define exact matches fo
The second example identifies all `header` elements ranging from `<h3>` to `<h6>`. Auto-CORPus will process all matching
headers at the same time.

Within the first example, notice the use of "\\\d" instead of the usual "\d" for identifying any digit. This is due to the regex pattern being defined within the config which is a JSON file. For further informaion about escapaing special characters within JSON have a look at [this guide by tutorials point](https://www.tutorialspoint.com/json_simple/json_simple_escape_characters.htm).
Within the first example, notice the use of "\\\d" instead of the usual "\d" for identifying any digit. This is due to the regex pattern being defined within the config which is a JSON file. For further information about escapaing special characters within JSON have a look at [this guide by tutorials point](https://www.tutorialspoint.com/json_simple/json_simple_escape_characters.htm).

<h3><a name="submit">Submitting/editing config files</a></h3>

Expand Down
2 changes: 1 addition & 1 deletion src/IAO_dicts/IAO_FINAL_MAPPING.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ experimental design methods section / materials section
experimental methods methods section
experimental procedures methods section
experimental section methods section
extented data supplementary material section
extended data supplementary material section
figures and tables supplementary material section
financial support funding source declaration section
footnotes footnote section
Expand Down
2 changes: 1 addition & 1 deletion src/abbreviation.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __conditions(self, candidate):
viable = False
if len(candidate.split()) > 2:
viable = False
if candidate.islower(): # customize funcition discard all lower case candidate
if candidate.islower(): # customize function discard all lower case candidate
viable = False
if not re2.search(r"\p{L}", candidate): # \p{L} = All Unicode letter
viable = False
Expand Down
2 changes: 1 addition & 1 deletion src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def handle_defined_by(config, soup):
if new_matches:
new_matches = [x for x in new_matches if x.text]
if "xpath" in bsAttrs:
if type(bsAttrs["xpath"]) is list:
if isinstance(bsAttrs["xpath"], list):
for path in bsAttrs["xpath"]:
xpath_matches = fromstring(str(soup)).xpath(path)
if xpath_matches:
Expand Down

0 comments on commit b33485d

Please sign in to comment.