Skip to content

Commit 178932f

Browse files
committed
Stop skipping E722, remove dead logic guards. Update contributing docs about testing
1 parent bd723d8 commit 178932f

4 files changed

Lines changed: 8 additions & 10 deletions

File tree

.github/workflows/python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
3636
- name: Pre-Tests code smell validation
3737
run: |
38-
pycodestyle -v --ignore=E501,E722 bitmath/__init__.py tests/
38+
pycodestyle -v --ignore=E501 bitmath/__init__.py tests/
3939
flake8 --select=F bitmath/__init__.py tests/
4040
4141
- name: Run Unit Tests

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ ci-pycodestyle:
207207
@echo "#############################################"
208208
@echo "# Running PEP8 Compliance Tests in virtualenv"
209209
@echo "#############################################"
210-
. $(NAME)env3/bin/activate && pycodestyle -v --ignore=E501,E722 bitmath/__init__.py tests/*.py
210+
. $(NAME)env3/bin/activate && pycodestyle -v --ignore=E501 bitmath/__init__.py tests/*.py
211211

212212
ci-flake8:
213213
@echo ""

bitmath/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1663,10 +1663,7 @@ def parse_string(s: str | numbers.Number, system: int = NIST, strict: bool = Tru
16631663
val = float(val)
16641664
except ValueError:
16651665
raise
1666-
try:
1667-
return unit_class(val)
1668-
except: # pragma: no cover
1669-
raise ValueError(f"Can't parse string {s} into a bitmath object")
1666+
return unit_class(val)
16701667

16711668
else:
16721669
# strict=False path (formerly parse_string_unsafe)

docsite/source/contributing.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,13 @@ Two static analysis checks run on every pull request as part of the
4343
GitHub Actions CI workflow, and locally via ``make ci``:
4444

4545
* ``pycodestyle`` — checks code style, with **E501** (line too long)
46-
and **E722** (bare ``except``) ignored.
46+
ignored.
4747
* ``flake8 --select=F`` — runs pyflakes error checks only (undefined
4848
names, unused imports, etc.). Style checks are disabled.
4949

50-
A PR cannot be merged until both pass. Run ``make ci`` locally to
51-
check before submitting.
50+
A PR cannot be merged until both pass. If you want to save time you
51+
can run ``make ci`` locally to check before submitting and waiting on
52+
the GitHub runners to report back.
5253

5354

5455
.. _contributing_commit_messages:
@@ -102,7 +103,7 @@ This means the minimum supported version tracks the oldest Python still
102103
included in a supported EPEL target:
103104

104105
* **RHEL 10 / EPEL 10** — Python 3.12
105-
* **RHEL 9 / EPEL 9** — Python 3.9, 3.11
106+
* **RHEL 9 / EPEL 9** — Python 3.9, 3.10, 3.11
106107

107108
The CI matrix tests all versions in this range. When a RHEL major
108109
release reaches end-of-life and is dropped from EPEL, the corresponding

0 commit comments

Comments
 (0)