Skip to content

Tutorial and documentation examples in general missing large amount of context #280

Closed
@catskul

Description

@catskul

The tutorial pulls code out from the middle of a test case which is great in that it should stay up to date, but bad in that it's missing a huge amount of context.

It starts out using object properties that are created off stage, and are extremely hard to find even when one goes digging:

"The first step is to create a git.Repo object to represent your repository.

    from git import Repo
    join = os.path.join

    # rorepo is a a Repo instance pointing to the git-python repository.
    # For all you know, the first argument to Repo is a path to the repository
    # you want to work with
    repo = Repo(self.rorepo.working_tree_dir)
    assert not repo.bare

"

As you can see, apart from trivial missing imports for os, reference to self.rorepo is without context, creating rorepo would be a logical step before this in such a tutorial.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions