Skip to content

Commit

Permalink
Merge pull request #625 from jelmer/typing
Browse files Browse the repository at this point in the history
Fix typing
  • Loading branch information
jelmer authored Sep 1, 2023
2 parents b58a146 + 7813e12 commit f03b806
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 19 deletions.
31 changes: 17 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "janitor"
version = "0.0.0"
authors = ["Jelmer Vernooij <[email protected]>"]
edition = "2021"
description = "Config for the janitor"
description = "Automated VCS change management platform"
license = "GPL-3.0+"
repository = "https://github.com/jelmer/janitor.git"
homepage = "https://github.com/jelmer/janitor"
Expand All @@ -12,7 +12,7 @@ build = "build.rs"
[dependencies]
breezyshim = { workspace = true }
chrono = { workspace = true, features = ["serde"] }
clap = { version = "4", features = ["derive", "env"], optional = true }
clap = { workspace = true, features = ["derive", "env"], optional = true }
env_logger = { workspace = true }
log = { workspace = true }
protobuf = "3"
Expand All @@ -33,6 +33,8 @@ serde = "1.0"
serde_json = "1.0"
url = "2.4"
chrono = "0.4"
# clap >= 4.3 requires rustc 1.70, which is not yet in Debian unstable
clap = { version = "<4.3" }

[build-dependencies]
protobuf-codegen = "3"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile_differ
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM docker.io/debian:testing-slim AS build
MAINTAINER Jelmer Vernooij <[email protected]>

ARG DEBIAN_FRONTEND=noninteractive
RUN apt -y update && apt -y install --no-install-recommends auto-apt-proxy && apt -y upgrade && apt satisfy --no-install-recommends -y git cargo rustc libpython3-dev python3-wheel python3-wheel-whl make protobuf-compiler python3-setuptools python3-setuptools-rust python3-setuptools-protobuf ca-certificates python3-pip libgpgme-dev swig rustc cargo gcc mypy-protobuf libpcre3-dev python3-gpg libssl-dev pkg-config
RUN apt -y update && apt -y install --no-install-recommends auto-apt-proxy && apt -y upgrade && apt satisfy --no-install-recommends -y git rustc libpython3-dev python3-wheel python3-wheel-whl make protobuf-compiler python3-setuptools python3-setuptools-rust python3-setuptools-protobuf ca-certificates python3-pip libgpgme-dev swig rustc cargo gcc mypy-protobuf libpcre3-dev python3-gpg libssl-dev pkg-config

COPY . /code
RUN pip3 install --break-system-packages --upgrade "/code[gcp]" && rm -rf /code
Expand Down
5 changes: 5 additions & 0 deletions janitor/_worker.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ async def gce_external_ip() -> str: ...
class EmptyQueue(Exception): ...
class AssignmentFailure(Exception): ...
class ResultUploadFailure(Exception): ...
class LintianOutputInvalid(Exception): ...

async def abort_run(client: Client, run_id: str, metadata: Any, description: str) -> None: ...

Expand All @@ -17,3 +18,7 @@ class Client(object):
campaign: str | None) -> Any: ...

async def upload_results(self, run_id: str, metadata: Any, output_directory: str | None = None) -> Any: ...


def run_lintian(output_directory: str, changes_names: list[str], profile: str | None, suppress_tags: list[str] | None) -> Any: ...

4 changes: 3 additions & 1 deletion janitor/debian/lintian.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

__all__ = ['LintianOutputInvalid', 'run_lintian']

from .. import _worker

LintianOutputInvalid = _worker.LintianOutputInvalid
run_lintian = _worker.LintianOutputInvalid
run_lintian = _worker.run_lintian
1 change: 0 additions & 1 deletion janitor/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

import argparse
import asyncio
import errno
import json
Expand Down

0 comments on commit f03b806

Please sign in to comment.