Commit Graph

72 Commits

Author SHA1 Message Date
Ladislav Michl
99f86bd40a Base, Gui: remove lefovers from xml -> pyi conversion 2025-04-25 11:57:24 +02:00
Jacob Oursland
5c251e73ac python: apply const method annotations to impls. 2025-04-16 20:32:04 -07:00
Benjamin Nauck
cb51f3fd2c Base: Add #include <limits> where used 2025-03-31 23:50:30 +02:00
Benjamin Nauck
3253f2c2de Base: Use std::numeric_limits and std::numbers instead of defines 2025-03-29 13:32:37 +01:00
tritao
2145b742eb Base: Standardize on Py::Long type for Python bindings. 2025-02-08 13:14:22 +00:00
Ladislav Michl
0b3adee2ab Base: Quantity: return std::string 2024-12-23 17:48:42 +01:00
Ladislav Michl
379d7ea9d5 Base: Units: return std::string 2024-12-23 17:48:42 +01:00
Ladislav Michl
839cd947c7 Base: Replace if else with switch statement 2024-01-21 16:14:12 +01:00
Ladislav Michl
3a25a66a05 Base: Do not use else before return 2024-01-21 16:14:12 +01:00
wmayer
a602003747 fix readability-isolate-declarations 2023-11-16 01:22:08 +01:00
wmayer
276bbcad6e fix readability-*:
* readability-uppercase-literal-suffix
* readability-named-parameter
2023-11-16 01:22:08 +01:00
wmayer
985def3416 Base: apply clang format 2023-11-13 12:01:26 -05:00
mosfet80
cb607ffe1e [BASE] Removed dead code (#10330) 2023-08-28 10:41:20 -05:00
wmayer
097d5d6fee Base: C++ core guidelines: init variables 2023-08-24 18:48:52 +02:00
wmayer
59760c723f Base: modernize C++: return braced init list 2023-08-18 00:36:24 +02:00
wmayer
b485f7943c Base: expose enum NumberFormat to Python 2022-08-15 11:12:53 +02:00
wmayer
f5235a8057 cppcoreguidelines-pro-type-union-access
According to https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md using union for type-punning is undefined behaviour.
 Replace it with std::memcpy
2022-06-24 14:29:50 +02:00
wmayer
bec323b793 Base: cosmetic changes 2022-05-12 17:49:55 +02:00
wmayer
4183c45a01 Base: modernize C++11
* use nullptr
2022-03-23 16:57:25 +01:00
wmayer
4a343ab31e Base/App: fix warnings from code analysers:
* convert old-style-casts to explicit C++ casts where possible
* make some implicit conversions explicit
2022-03-06 23:49:30 +01:00
Uwe
686a025416 [Base] Quantity, Rotation, Stream: remove unused includes 2022-03-01 11:27:54 +01:00
wmayer
cad0d01883 Base: modernize C++11
* remove redundant void-arg
* use nullptr
* replace deprecated headers
2022-01-25 20:21:30 +01:00
wmayer
3945dc0f74 Base: only handle Base::ParserError exceptions for quantity expressions 2022-01-22 01:15:12 +01:00
wmayer
07bb92e004 Base: extend Python wrapper to allow to create a quantity with Units.Quantity(1, 'm') and add a unit test 2022-01-21 14:57:49 +01:00
luz paz
59b7e9fdd0 Base: remove Py2 code 2021-04-26 09:23:58 +02:00
wmayer
a61c930aaa Py: fix memory leak 2021-04-12 00:06:00 +02:00
luz paz
01b21e0d06 Base: Fix header uniformity, whitespace, and doxygen
[skip ci]
2020-11-22 18:12:16 +01:00
wmayer
9415e7b6da Base: [skip ci] implement method Quantity.toStr() to control string representation 2020-02-29 22:51:55 +01:00
wmayer
ea6ed77b3e Base: [skip ci] improve repr() for quantity
https://forum.freecadweb.org/viewtopic.php?f=10&t=43718
https://forum.freecadweb.org/viewtopic.php?f=10&t=43431&p=369556#p369575
2020-02-29 00:20:21 +01:00
wmayer
f9cc8b143a Base: [skip ci] support of __round__ of QuantityPy 2020-02-16 21:50:06 +01:00
luz.paz
011e5aedfa src/Base: [skip ci] fix header uniformity
This PR fixes header uniformity across all `src/Base` files
2019-12-25 11:38:58 +01:00
Zheng, Lei
8426ebe2ba Fix various Py::Object leak 2019-10-08 17:53:20 +02:00
Zheng, Lei
f16c265f00 App: fix QuantityPy __add__ and __sub__ 2019-09-28 15:32:12 +02:00
Zheng, Lei
1efadc928e Base: improve base python object number protocol 2019-09-28 15:30:23 +02:00
wmayer
9a5a7a8866 disable commit 34264408 2019-02-19 22:28:46 +01:00
wmayer
d1ff2b7dce use format options when using repr() on a quantity 2019-02-19 13:46:22 +01:00
wmayer
fb27265934 Expose some standard units and quantities to Python 2019-02-12 15:12:19 +01:00
wmayer
1106404b1e implement true divide handler of the number protocol for Quantity 2018-10-27 15:27:27 +02:00
wmayer
9e8be1aa23 extend QuantityFormat to set denominator independent of user settings 2018-09-17 12:38:46 +02:00
wmayer
881059fd61 missing call to clear error indicator 2018-06-04 17:48:10 +02:00
wmayer
8e0a6cb832 fix conversion factors for psi and ksi 2018-03-31 15:43:16 +02:00
wmayer
2da18e49aa fix warning 2017-11-14 21:47:56 +01:00
wmayer
dd66a9c9fc add method toFormat to get number format from character 2017-08-20 18:50:13 +02:00
wmayer
07261b161d fix Py3 issue 2017-07-25 01:07:09 +02:00
wmayer
e32c37598b add attribute to control format of a quantity via Python 2017-07-24 22:47:10 +02:00
Yorik van Havre
0bc16d353b py3: Base: files I-R ported to python3
PyObjectBase.cpp and PyObjectBase.h not included
issue 0000995
2017-05-18 16:00:05 +02:00
wmayer
47b41a7883 fixes #0002460: Use keyword 'explicit' for Quantity constructor 2016-11-05 23:21:42 +01:00
wmayer
39e589a4d7 fix -Wextra in FreeCADBase 2016-09-21 15:02:02 +02:00
wmayer
bb342d88a3 + fixes #0002554: Py Quantity Constructor Angles 2016-05-14 19:30:43 +02:00
Mateusz Skowroński
05f95c0506 Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00