Skip to content

Commit

Permalink
More editing
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Aug 9, 2023
1 parent 2686907 commit c3fc954
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
*svcs* (pronounced *services*) is a **dependency container** for Python.
It gives you a central place to register factories for types/interfaces and then imperatively request instances of those types with **automatic cleanup** and **health checks**.

It's a flexible Inversion-of-Control container that can be used for **dependency injection** or **service location**, but doesn't require global state, decorators, or mangling of function signatures.
It's a flexible Inversion-of-Control container suitable for **dependency injection** or **service location**, while not requiring global state, decorators, or mangling of function signatures.

<!-- begin benefits -->
Benefits:
Expand Down
2 changes: 1 addition & 1 deletion docs/typing-caveats.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

If you try to `get()` an abstract class like an `Protocol` or an *abstract base classes* you'll get a Mypy error like this:

```
```text
error: Only concrete class can be given where "type[P]" is expected [type-abstract]
```

Expand Down
3 changes: 2 additions & 1 deletion docs/why.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

A {term}`service locator` like *svcs* allows you to configure and manage all your {term}`service`s in *one central place*, access them in a *consistent* way without worrying about *cleaning them up* and achieve *loose coupling*.

---

## Modus Operandi

In practice, that means that you say "*Give me a database connection*!" at runtime, and *svcs* will give you whatever you've configured to return when asked for a database connection.
That can be an actual database connection, or it can be a mock object for testing.
Expand Down

0 comments on commit c3fc954

Please sign in to comment.