Laurent Monin
fac0ed5155
Add support for title to Option.add_if_missing()
2024-04-13 18:20:36 +02:00
Laurent Monin
006944294e
Add option.get_title() method
...
Similar to Option.get_default()
2024-04-13 14:09:30 +02:00
Laurent Monin
94189f8ecf
Option: Add support for an optional title
2024-04-13 14:09:30 +02:00
Laurent Monin
2364f9f979
Add Option.get_default() method and matching tests
2024-04-02 18:03:06 +02:00
Laurent Monin
7902ab9de3
Add more tests for Option
2024-04-02 17:59:13 +02:00
Philipp Wolfer
d450c8181f
PICARD-2331: Fixed picard.config.ListOption
...
QVariantList would now convert strings to lists, leading to unexpected behavior.
2023-10-13 07:13:25 +02:00
Laurent Monin
2f6479747d
Update headers
2022-02-07 09:41:57 +01:00
Philipp Wolfer
543709eab2
Various minor code cleanups
...
- Use generator comprehension where possible
- Prefer dict comprehension over dict([...])
- General code cleanup
2021-11-26 08:00:43 +01:00
Laurent Monin
14ce07756e
Update Copyright headers, with the help of fix-headers.py script
2021-11-10 21:38:54 +01:00
Philipp Wolfer
fe5970f25a
PICARD-2226: Removed config object per thread again
...
Syncing between those instances does not work as advertised, which causes missing updates on config changes.
2021-06-05 00:31:13 +02:00
Philipp Wolfer
275c0da805
PICARD-2174: Do not pass settings back from File.format_specific_metadata
...
Avoids problems with different implementations needing different settings.
2021-04-30 11:43:37 +02:00
Philipp Wolfer
8053e59eda
Refactor config.purge_config_instances
2020-12-25 17:06:32 +01:00
Philipp Wolfer
fb83a8e76b
Enable flake8 E265: Block comment should start with '# '
...
Most changes involve replacing non-breaking space with a simple space after the #.
2020-05-13 11:03:13 +02:00
Laurent Monin
6b5e852a60
Run fix-header on *.py
2020-02-24 10:25:09 +01:00
Laurent Monin
3f25bda3c8
Fix a bunch of flake8 warnings, mostly cosmetic changes
2020-02-21 21:43:40 +01:00
Laurent Monin
498c8eab1b
Add mktmpdir method to PicardTestCase, and use it more widely
2020-02-08 18:04:39 +01:00
Laurent Monin
b7389a6445
Tests: ensure temporary directories and files are removed after tests
...
- QSettings object needs special care, as file was re-created on exit
- Append a cleanup function as soon as possible to ensure temporary dirs & files are removed in any case
- prefer addCleanup() over tearDown(), keeping creation and cleanup together
2020-02-08 18:04:39 +01:00
Philipp Wolfer
0f1c4999fa
PICARD-1506: Provide empty config for tests
...
If there is no empty config file Qt seems to initialize the specified config file path with a copy of the application's config.
2019-06-03 14:12:07 +02:00
Philipp Wolfer
dd4da2aa47
Updated isort config to put test imports in separate section
2019-04-04 08:32:22 +02:00
Philipp Wolfer
05fc98c64a
Run isort over all files
2019-04-03 21:19:12 +02:00
Laurent Monin
a63cc6bdd1
Rework config and add tests for it
...
- get rid of useless ConfigSection.__config
- use name instead of full key (as section name is fixed)
- add support for qt type
- remove _convert_to_bool(), unneeded with qt type support
2019-04-03 09:46:52 +02:00
Philipp Wolfer
d0563fa5c4
Extended option test cases
2019-03-29 09:30:09 +01:00
Philipp Wolfer
0405f7acb5
Added tests for config options
2019-03-29 09:06:54 +01:00