python-apt:pu/type-fixes

Last commit made on 2018-06-05
Get this branch:
git clone -b pu/type-fixes https://git.launchpad.net/python-apt

Branch merges

Branch information

Name:
pu/type-fixes
Repository:
lp:python-apt

Recent commits

03308ab... by Julian Andres Klode

Fix some more type annotations for apt_pkg, complete apt.utils typing

70fb581... by Julian Andres Klode

Various type fixes

5a15e14... by Julian Andres Klode

Add all possible annotations that were FIXME

This requires adding a depends_list type hint for apt_pkg. We can't
fix VersionList.__getitem__ right now, it makes pyflakes unhappy.

5f578f3... by Julian Andres Klode

apt.package.Dependency: Fix __init__ type annotation

a87cbf8... by Julian Andres Klode

types: Don't make apt_pkg.Cache a dict, and fix apt.Cache.__contains__

apt.Cache.__contains__ might return False when __getitem__ returned
a package which seems suboptimal. Automatically converting to string
is bad too, though. Probably should make it Union[str, unicode] or
something.

b7b90c5... by Julian Andres Klode

Correctly handle missing candidate in Package.get_changelog

This would crash, but now it produces a useful output. Also adjust
the property to use @property.setter, so the type check works (that's
what made me find the bug).

9ed0988... by Julian Andres Klode

tests/test_pep484.py: Check everything

Include checks for apt_pkg types.

3e8c8dd... by Julian Andres Klode

apt: Fix typing error related to apt_pkg

8feb78a... by Julian Andres Klode

apt: Correctly annotate Optional types

A lot of values can be None, but did not have Optional types.

2df4704... by Julian Andres Klode

apt.Cache: Fix error in apt.Package caching

Add a type annotation for our weak dictionary, and fix the type
error where we forgot to convert the argument to a string.