Skip to content

Commit

Permalink
fix restructured text https://stackoverflow.com/a/39720161/1154966 do…
Browse files Browse the repository at this point in the history
…es not work
  • Loading branch information
delijati committed Nov 9, 2023
1 parent dce3a75 commit df6051d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:
strategy:
matrix:
py:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "pypy-3.8"
- "3.12"
- "pypy-3.10"
os:
- "ubuntu-latest"
- "windows-latest"
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: 3.11
architecture: x64
- name: Install requirements
run: |
Expand Down
5 changes: 2 additions & 3 deletions deform/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def __init__(
focus == "on"
and not focused
and type(child.typ) in Field.focusable_input_types
and type(child.widget) != Field.hidden_type
and type(child.widget) is not Field.hidden_type
and not self.have_first_input
):
first_input_index = child_count
Expand Down Expand Up @@ -331,7 +331,6 @@ def set_default_renderer(cls, renderer):

@classmethod
def set_default_resource_registry(cls, registry):

"""Set the callable that will act as a default
:term:`resource registry` for instances of the associated
class when no ``resource_registry`` argument is provided to
Expand Down Expand Up @@ -407,7 +406,7 @@ def widget(self):
self.schema.typ.__class__
)
if widget_maker is None:
for (cls, wgt) in schema.default_widget_makers.items():
for cls, wgt in schema.default_widget_makers.items():
if isinstance(self.schema.typ, cls):
widget_maker = wgt
break
Expand Down
4 changes: 2 additions & 2 deletions deform/tests/test_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ def choices_generator():
widget = self._makeOne(values=choices)
with self.assertRaises(TypeError) as e:
widget.serialize(field, None)
self.assertTrue(type(e.exception) == TypeError)
self.assertEqual(type(e.exception), TypeError)
self.assertEqual(
e.exception.args[0],
"Values must be a sequence type (list, tuple, or range).",
Expand Down Expand Up @@ -1195,7 +1195,7 @@ def choices_generator():
widget = self._makeOne(values=choices)
with self.assertRaises(TypeError) as e:
widget.serialize(field, None)
self.assertTrue(type(e.exception) == TypeError)
self.assertEqual(type(e.exception), TypeError)
self.assertEqual(
e.exception.args[0],
"Values must be a sequence type (list, tuple, or range).",
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def readfile(name):
"flake8-bugbear",
"flake8-builtins",
"isort",
"rstcheck",
"readme_renderer",
]

Expand Down
6 changes: 4 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
envlist =
lint,docs,
py37,py38,py39,py310,py311,pypy3,
py38,py39,py310,py311,py312,pypy3,
py311cover,coverage,
functional3

Expand All @@ -26,7 +26,9 @@ commands =
flake8 deform setup.py
isort --check-only --df deform setup.py
black --check --diff deform setup.py
python setup.py check -r -s -m
# XXX -r reports now warnings too so we fail
python setup.py check -s -m
rstcheck README.rst CHANGES.txt
check-manifest
extras =
lint
Expand Down

0 comments on commit df6051d

Please sign in to comment.