docker / docker/docker-py

Incorrect documented return type for `Container.top()`

Open
#2,958 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.2k
Forks
1.7k
Avg merge
13d 8h
Merged PRs (30d)
2

Description

The documentation for Container.top() consistently claims that it returns a string. It does not; instead it returns a parsed JSON object which looks like this:

{
    "Processes": [
        [
            "centos",
            "65436",
            "65386",
            "0",
            "21:38",
            "?",
            "00:00:01",
            "python3 /home/foo/baz.py"
        ],
        [
            "centos",
            "65786",
            "65436",
            "0",
            "21:38",
            "?",
            "00:00:00",
            "/usr/local/bin/python3 /home/foo/bar.py"
        ]
    ],
    "Titles": ["UID", "PID", "PPID", "C", "STIME", "TTY", "TIME", "CMD"]
}

Note: I've only tested this in version 4.2.0, but it appears to remain true in the current version of the code.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the documentation entry for Container.top() and verify its current return value against the JSON object shown in the issue. Update the documented return type so it no longer claims to be a string, then confirm that the generated or source documentation consistently describes the parsed object.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.