48 Commits

Author SHA1 Message Date
Benjamin Drung
d7362d9ed8 Use Python f-strings
```
flynt -ll 99 -tc -tj -a pbuilder-dist pm-helper running-autopkgtests ubuntu-build ubuntutools
```
2024-11-02 17:49:20 +01:00
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
069a6926c0 Implement conventions found by pylint
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-31 17:28:33 +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
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
Benjamin Drung
096d5612e7 sponsor-patch: Use --skip-patches when extract source package
Use `--skip-patches` when extract source packages with `dpkg-source`.
`--no-preparation` is a source package build option and `--skip-patches`
is the correct extract option.

Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2022-11-16 18:37:56 +01:00
Dan Streetman
90e8fe81e1 replace ubuntutools.logger with standard python logging 2019-11-25 10:10:06 -05:00
Stefano Rivera
301569e809 Pull out Python 2 support hacks 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
3a6cd3ac66 Fix pylint3 error (for Python 2 support code) 2017-04-30 23:49:18 +02:00
Dimitri John Ledkov
509b612b0f fix sp/sp 2014-12-18 21:03:05 +00:00
Dimitri John Ledkov
8c6371a416 sp/sp 2014-12-18 20:56:13 +00:00
Brian Murray
0ee01ef534 ubuntutools/sponsor_patch/sponsor_patch.py: correct grammar regarding
which task for the patch, cache bug.id instead of retrieving it up more
than once .
2013-08-22 08:22:55 -07:00
Benjamin Drung
c2aa97dba2 Move devscripts.logger to ubuntutools.logger. 2013-03-19 00:18:02 +01:00
Stefano Rivera
a9c0df9627 sponsor-patch: Handle staging environment branch URLs 2012-11-06 23:51:59 +02:00
Stefano Rivera
d826cd20e0 Comment typo 2012-10-29 09:05:28 +01:00
Stefano Rivera
e30a6e51a7 sponsor-patch: Don't fall over bugs targetted at the development release
(LP: #936014)
2012-08-17 22:44:21 +02:00
Stefano Rivera
93fbe4c71c Update sponsor-patch to use the new API resulting from this change
(LP: #1002999)
2012-05-25 12:15:33 +01:00
Stefano Rivera
f363b745ff pbuilder and cowbuilder live in sbin 2012-02-15 16:21:00 +02:00
Stefano Rivera
30da459114 Check for dependencies that the package doesn't Depend on. Recommend
dput, lintian, patch, quilt. (LP: #846385)
2012-02-15 16:10:43 +02:00
Stefano Rivera
948032d8a3 Support syncs from a non-default series (LP: #931644) 2012-02-15 15:16:30 +02:00
Stefano Rivera
a0a25fc6ea sponsor-patch: Determine the task from the UDD branch. 2012-01-09 22:03:28 +02:00
Benjamin Drung
3f6eb545e2 sponsor-patch: Check if the sponsored bug is marked as duplicate (LP: #896733). 2011-12-21 21:44:22 +01:00
Benjamin Drung
58e6dfbbdb sponsor-patch: Use syncpackage instead of subscribing ubuntu-archive for sync requests, because syncpackage supports sponsorship now. 2011-12-10 12:51:53 +01:00
Stefano Rivera
d0f707f33d sponsor-patch: Build a source package for lintian to run on, when not
test-building syncs.
2011-11-27 17:20:58 +02:00
Benjamin Drung
da18852892 Refactor code. 2011-10-28 13:18:57 +02:00
Stefano Rivera
e899e83543 sponsor-patch: Compare new sync version to the current Ubuntu version,
rather than itself (LP: #878499)
2011-10-28 10:03:06 +02:00
Benjamin Drung
ba472b71d9 sponsor-patch: Check version of sponsored sync request too. 2011-09-20 00:31:51 +02:00
Benjamin Drung
663cb5214f sponsor-patch: Check if the version of a sync request is mentioned in the bug title. 2011-09-15 13:37:22 +02:00
Benjamin Drung
5942694e6f sponsor-patch: Use old Archive Admin way for sync requests until bug #827555 is fixed. 2011-09-15 13:08:06 +02:00
Benjamin Drung
6fdef19b2c sponsor-patch: Support sync requests and make ack-sync obsolete (LP: #764763). 2011-09-10 22:55:08 +02:00
Benjamin Drung
1e126f74d1 sponsor-patch: More refactoring. 2011-09-10 21:28:28 +02:00
Benjamin Drung
d52393da1b sponsor-patch: Refactor code. 2011-09-10 19:59:35 +02:00
Stefano Rivera
8bb4628586 sponsor-patch: Perform strict validation on the first changelog entry. 2011-09-10 01:21:07 +02:00
Benjamin Drung
4f043a34e0 sponsor-patch: Default to not upload the package. 2011-09-06 13:16:09 +02:00
Stefano Rivera
c9a2b9ac2b Reorder output 2011-09-04 01:05:29 +02:00
Stefano Rivera
7196ad55f1 More whitespace around the important post-build blocks 2011-09-04 01:04:13 +02:00
Stefano Rivera
7c994cefee Run harvest in sponsor-patch --fixes lp:833699 2011-09-04 00:44:50 +02:00
Evan Broder
19c33e5e32 * ubuntutools.subprocess:
- New drop-in replacement wrapper module around subprocess that
    backports the restore_signals kwarg and defaults close_fds=True
  - Switch everything previously using subprocess to use
    ubuntutools.subprocess instead (LP: #785854)
2011-06-24 16:32:07 +02:00
Stefano Rivera
dcad51ec87 sponsor-patch: Use dch --release instead of --edit to work with
DEBCHANGE_RELEASE_HEURISTIC=changelog.
2011-06-03 19:18:38 +02:00
Evan Broder
d82e65e0e2 * ubuntutools.subprocess:
- New drop-in replacement wrapper module around subprocess that
    backports the restore_signals kwarg and defaults close_fds=True
  - Switch everything previously using subprocess to use
    ubuntutools.subprocess instead (LP: #785854)
2011-05-24 20:22:37 +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
a5691d4cd1 sponsor-patch: Fix assertion error if a relative working directory
is specified.
2011-05-16 00:57:57 +02:00
Benjamin Drung
99f78224ac sponsor_patch.py: Fix bug task selection and put it in separate function. 2010-12-28 20:44:22 +01:00
Benjamin Drung
39e6306364 sponsor_patch.py: Refactor long function. 2010-12-27 16:50:55 +01:00
Benjamin Drung
0c8520ee8c Make pylint a little bit happier. 2010-12-27 15:20:49 +01:00