Skip to content

Commit

Permalink
Highlight that the code snippet will not work (#204)
Browse files Browse the repository at this point in the history
Highlight that the code snippet will not work. Users most of the time will
skim read the docs trying to spot snippets on how to use the code.

Since this is the only snippet on the welcome page, we might want to
highlight that it's an example that won't work.
  • Loading branch information
jonathanmach committed Dec 2, 2022
1 parent 1db1f56 commit 93fe2e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ The core values of Injector are:
a different configuration and each with different objects in different scopes. Code like this
won't work for this very reason::

# This will NOT work:

class MyClass:
@inject
def __init__(self, t: SomeType):
Expand Down

0 comments on commit 93fe2e8

Please sign in to comment.