Benjamin Drung
aa556af89d
Use f-strings
...
pylint complains about C0209: Formatting a regular string which could be
a f-string (consider-using-f-string)
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-31 19:32:58 +01:00
Benjamin Drung
444b319c12
Implement refactorings found by pylint
...
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-31 16:58:24 +01:00
Benjamin Drung
4449cf2437
Fix warnings found by pylint
...
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-31 15:51:29 +01:00
Benjamin Drung
b1bc7e1cdc
Address pylint complaints
...
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-30 23:10:31 +01:00
Benjamin Drung
4e27045f49
style: Sort Python imports with isort
...
```
isort -l 99 --profile=black .
```
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-30 21:28:47 +01:00
Benjamin Drung
3354b526b5
style: Format Python code with black
...
```
PYTHON_SCRIPTS=$(grep -l -r '^#! */usr/bin/python3$' .)
black -C -l 99 . $PYTHON_SCRIPTS
```
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-30 19:45:36 +01:00
Dan Streetman
12c2e6bf42
test: remove unneeded stuff in test/__init__.py
...
Signed-off-by: Dan Streetman <ddstreet@canonical.com>
2021-02-02 06:25:12 -05:00
Dan Streetman
48c7130008
test: remove dep on mock, use unittest.mock instead
...
Signed-off-by: Dan Streetman <ddstreet@canonical.com>
2021-02-02 06:25:12 -05:00
Dan Streetman
90e8fe81e1
replace ubuntutools.logger with standard python logging
2019-11-25 10:10:06 -05:00
Stefano Rivera
7b2f1a713b
Remove more Python 2 fallback imports
2019-09-05 09:49:41 -03:00
Stefano Rivera
301569e809
Pull out Python 2 support hacks
2019-09-04 19:24:44 -03:00
Mattia Rizzolo
edb49c652c
Fix test failures with newer flake8 and pylint.
...
Closes : #891721
Signed-off-by: Mattia Rizzolo <mattia@debian.org>
2018-03-08 12:56:36 +01:00
Benjamin Drung
cc7170eccb
Fix all flake8 issues
2017-05-01 00:20:03 +02:00
Dimitri John Ledkov
99eb51b4e1
Fix test_config to skip Unicode environment variable test, when python
...
interpreter is not running in an unicode capable locale.
2015-01-19 15:21:00 +00:00
Dimitri John Ledkov
1bab644191
Conf fixes
2014-12-18 21:53:00 +00:00
Dimitri John Ledkov
a7f4fc202b
fix test_config
2014-12-18 21:06:44 +00:00
Dimitri John Ledkov
8b5db046be
t/t_config
2014-12-18 21:03:27 +00:00
Dimitri John Ledkov
522030be12
don't keep unused mocks
2014-12-15 03:47:59 +00:00
Dimitri John Ledkov
7d70b6b3a3
Dropping mox
2014-12-15 03:25:41 +00:00
Loïc Minier
658946c214
Encode the developer name in the current locale to run the test; thanks
...
Stefano Rivera.
2013-05-15 02:18:50 +02:00
Loïc Minier
0aaa0f1f4a
Decode name from environment or from gecos with the locale's encoding and add
...
corresponding regression test; fixes handling of non-ascii developer name like
mine with e.g. syncpackage using it with dpkg-genchanges -e.
2013-05-13 13:58:15 +02:00
Benjamin Drung
c2aa97dba2
Move devscripts.logger to ubuntutools.logger.
2013-03-19 00:18:02 +01:00
Benjamin Drung
ce2f96bc0d
Make pylint happier and code more PEP-8 compliant.
2011-08-20 11:31:02 +02:00
Benjamin Drung
aa96842c84
Remove trailing spaces.
2011-05-23 23:44:45 +02:00
Benjamin Drung
e8b3a18c45
Move suspicious-source and wrap-and-sort from ubuntu-dev-tools into devscripts.
2011-05-23 23:41:00 +02:00
Benjamin Drung
f2d17d73a5
test_config.py: Move config_files and fake_open into ConfigTestCase.
2010-12-27 13:43:13 +01:00
Benjamin Drung
45a341dfd1
test_config.py: Use mox.
2010-12-27 13:37:40 +01:00
Stefano Rivera
30df1c0ec8
- Support this in many u-d-t scripts, and update manpages.
...
- Deprecate old configuration environment variables.
2010-12-22 21:33:58 +01:00
Stefano Rivera
8cee545568
Migrate to ubuntutools.logger
2010-12-22 21:24:35 +02:00
Stefano Rivera
2c2aaf90b3
Migrate to logging
2010-12-22 02:09:04 +02:00
Stefano Rivera
0184a10c21
Prefix replacement in warning
2010-12-22 00:14:28 +02:00
Stefano Rivera
c43e9775e0
- Support this in many u-d-t scripts, and update manpages.
...
- Deprecate old configuration environment variables.
2010-12-22 00:07:48 +02:00
Stefano Rivera
2c1e1c8727
Add boolean as a get_value argument
2010-12-21 01:51:10 +02:00
Stefano Rivera
4f7a5232a2
Script-specific variables win over package variables no matter which store they come from
2010-12-21 00:28:31 +02:00
Stefano Rivera
0a272cab3f
Support the notion of non-package-wide variables
2010-12-21 00:13:39 +02:00
Stefano Rivera
2a1a48ae56
Tone down ubu_email magic
2010-12-20 23:56:54 +02:00
Stefano Rivera
3d03dcdb3f
Switch to using shlex for config file parsing
2010-12-20 23:36:17 +02:00
Stefano Rivera
680a4698d7
Some more ubu_email test-cases
2010-12-20 22:38:36 +02:00
Stefano Rivera
254be7bb5d
Configuration system uses a class, add test suite
2010-12-20 22:08:12 +02:00