Commit Graph

20 Commits

Author SHA1 Message Date
neofelis2X
6f2ca2b5e5 Docs: fix various minor sphinx parsing issues 2025-02-24 23:03:37 +01:00
Randy Döring
f7d1d8188c Fix NumPy 2.0 deprecations via running ruff (#2580)
* Fix NumPy 2.0 deprecations via running `ruff check --select NPY201 --fix --exclude docs/sphinx/rest_substitutions/snippets/python/converted`

See https://numpy.org/devdocs/numpy_2_0_migration_guide.html#numpy-2-0-migration-guide

* Use `numpy.any` instead of `any` because the latter does not work for multidimensional arrays.
2024-08-21 19:53:57 -04:00
Robin Dunn
d9725119d7 Merge pull request #2039 from swt2c/pygauge_py3.10
Fix a bunch of Python 3.10 issues with pure-Python classes and demos
2021-12-13 20:54:44 -08:00
Scott Talbert
173d079681 Fix a bunch of Python 3.10 issues with pure-Python classes and demos
In Python 3.10, a change[1] was implemented where extension functions
that take integer arguments will no longer silently accept non-integer
arguments (e.g., floats) that can only be converted to integers with a
loss of precision.  This PR fixes most of these issues in the pure-Python
classes and demos by explicitly converting the parameters to int before
passing them to wxWidgets.  There is loss of precision, but this was
happening before (automatically) anyway as most wxWidgets DeviceContext
functions operate using integers.

Additionally, the PR fixes a few sizing issues, mostly with SpinCtrls being
too small on GTK3.

This is an example of the relevant exception:
Traceback (most recent call last):
  File "/usr/lib64/python3.10/site-packages/wx/lib/agw/pygauge.py", line 355, in OnPaint
    r.width = w
TypeError: 'float' object cannot be interpreted as an integer

Fixes #2038.

[1] https://bugs.python.org/issue37999
2021-12-01 14:19:00 -05:00
Christian Clauss
25ba122168 Fix typos discovered by codespell 2021-08-07 18:55:49 +02:00
Robin Dunn
732ff6752b Revert "Spelling fixes in wx.lib"
This reverts commit c00b8950da.
The spelling changes were a bit too aggressive.
2020-08-31 13:01:31 -07:00
Robin Dunn
c00b8950da Spelling fixes in wx.lib 2020-07-14 12:53:31 -07:00
Robin Dunn
8f5bfd6484 Add option to the plot demo for toggling the scrollbars 2019-11-13 12:00:52 -08:00
Robin Dunn
9740c8e455 Use stock IDs for stock menu items 2019-11-12 11:45:42 -08:00
Metallicow
c76384d458 Trim trailing whitespace *.py files 2018-01-16 08:47:07 -06:00
Robin Dunn
e43ba1eec0 Suggest using pip to install numpy 2017-09-08 14:18:53 -07:00
Douglas Thor
d97731ed67 Added bottom-left and all to demo enableTicks 2016-11-28 16:59:18 -08:00
Robin Dunn
ce00fc06a5 * Slight refactoring in wx/lib/plot/examples/demo.py
* Add a __init__.py
* Update the PyPlot sample in the main wxPython demo to use the new plot demo
2016-08-10 10:48:54 -07:00
Robin Dunn
67242fb6b4 Add a message dlg explaining how to see the demo samples. 2016-07-16 08:59:38 -07:00
Douglas Thor
29d42604ab docstring updates. 2016-07-07 09:13:21 -07:00
Douglas Thor
3817c4e5e7 Updates to demo.py
+ renamed _test() to run_demo().
+ Renamed TestFrame to MainFrame, moved methods into logical blocks.
2016-07-07 09:13:21 -07:00
Douglas Thor
15a8b2d13b Documentation updates
+ Sphinx cross-references and pylint: disable
+ Added __docformat__ and import comments
2016-07-07 09:13:20 -07:00
Douglas Thor
81244b6a7e Renamed plot.py to polyobjects.py
+ Moved DisplaySide, scale_and_shift_point, and set_displayside to utils.py
  + renamed _DisplaySide to DisplaySide
  + renamed _set_displayside to set_displayside
+ updated imports to reflect package rename
+ changed format of imports in __init__.py to be more PEP8-like.
+ updated numpy import exception
+ whitespace cleanups.
2016-07-07 09:13:20 -07:00
Douglas Thor
047da1b885 Class and function renaming.
+ Renamed demo.__test() to demo._test()
  + Updated __main__ to reflect this change.
+ Renamed BoxPlot to PolyBoxPlot to maintain uniformity
  + Added backwards compat for PolyBoxPlot to __init__.py
+ Updated CHANGELOG.md
2016-07-07 09:13:20 -07:00
Douglas Thor
c34cc76cd6 Moved demos to ./examples 2016-07-07 09:13:20 -07:00