3
0
mirror of https://git.launchpad.net/ubuntu-dev-tools synced 2025-03-12 23:51:08 +00:00

18 Commits

Author SHA1 Message Date
Benjamin Drung
909d945af4 Replace deprecated optparse with argparse
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-31 13:33:18 +01:00
Benjamin Drung
f6fde2e217 fix: Use lazy % formatting in logging functions
pylint complains about W1201: Use lazy % formatting in logging functions
(logging-not-lazy) and W1203: Use lazy % formatting in logging functions
(logging-fstring-interpolation).

Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-31 11:13:07 +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
0eeb93ee0c logging: update ubuntutools.getLogger() to output to stdout/stderr correctly
Python logging by default sends all output to stderr, but that's not what
normal programs usually do and is not expected for these scripts.

Change the ubuntutools.getLogger() method to return a logger with handlers
correctly set up to send INFO level (or lower) logs to stdout and WARNING
level (or higher; technically INFO+1 level or higher) logs to stderr.

This results in normally logged output going to stdout and warnings/errors
going to stderr, as expected.
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
2a0bffc2a0 Port bitesize to python3 2019-09-04 19:24:44 -03:00
Benjamin Drung
cc7170eccb Fix all flake8 issues 2017-05-01 00:20:03 +02:00
Benjamin Drung
c2aa97dba2 Move devscripts.logger to ubuntutools.logger. 2013-03-19 00:18:02 +01:00
Benjamin Drung
3a91cf964d Fix indentation. 2011-05-23 23:41:30 +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
Daniel Holbach
29307e4566 on an error saving, error out properly 2011-05-23 17:51:18 +02:00
Daniel Holbach
4e8a631483 remove 'E:', not needed 2011-05-23 17:29:32 +02:00
Daniel Holbach
f8abc5b881 * bitesize:
- display error message properly. 
  - error out if bug is already marked as 'bitesize'.
  - rephrase bug comment and subscribe person who adds the comment.
  - work-around LP:336866 and LP:254901.
2011-05-23 15:49:06 +02:00
Daniel Holbach
aecd1169fd fix problems mentioned in review 2011-05-10 12:08:59 +02:00
Daniel Holbach
7a45eede4a add lpinstance/no-conf options, fix manpage 2011-05-09 15:35:23 +02:00
Daniel Holbach
d94994b1f4 fix leftover 'lp-set-dup 2011-05-09 14:57:28 +02:00
Daniel Holbach
eee6501a18 add 'bitesize' script 2011-05-09 14:48:54 +02:00