Skip to content

Commit 8116960

Browse files
committed
chore(uv): move to scottzach1 vendor namespace!
BREAKING-CHANGE: see README.md for instructions #2
1 parent cfd6e8e commit 8116960

15 files changed

+27
-27
lines changed

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ optimal as it reduces necessary computation for expensive services and reduces
3333
With this approach you can automatically inject functions at load time using the `@wiring.inject` decorator.
3434

3535
```python
36-
from pif import providers
37-
from pif import wiring
36+
from scottzach1.pif import providers
37+
from scottzach1.pif import wiring
3838

3939

4040
@wiring.inject # <- automatically injects providers.Provider default arguments!
@@ -51,8 +51,8 @@ if __name__ == "__main__":
5151
With this approach you can wire all methods in the specified modules.
5252

5353
```python
54-
from pif import providers
55-
from pif import wiring
54+
from scottzach1.pif import providers
55+
from scottzach1.pif import wiring
5656

5757

5858
def my_function(a: str = providers.ExistingSingleton("hello world")):
@@ -76,8 +76,8 @@ If you want to patch a value all you need to do is call `.override()` on the pro
7676
override an existing singleton you may call the convenience method `.override_existing()`.
7777

7878
```python
79-
from pif import providers
80-
from pif import wiring
79+
from scottzach1.pif import providers
80+
from scottzach1.pif import wiring
8181

8282
StringProvider = providers.ExistingSingleton("hello world")
8383

@@ -100,8 +100,8 @@ if __name__ == "__main__":
100100
If you want more control around the override lifecycles then you may use the `Override` context manager.
101101

102102
```python
103-
from pif import providers
104-
from pif import wiring
103+
from scottzach1.pif import providers
104+
from scottzach1.pif import wiring
105105

106106
StringProvider = providers.ExistingSingleton("hello world")
107107

examples/simple_service/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from pif import providers, wiring
1+
from scottzach1.pif import providers, wiring
22

33

44
class ApiClient:

src/pif/providers/__init__.py

-6
This file was deleted.
File renamed without changes.
File renamed without changes.
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# isort: skip_file
2+
from scottzach1.pif.providers.provider import Provider
3+
from scottzach1.pif.providers.blank import Blank
4+
from scottzach1.pif.providers.existing_singleton import ExistingSingleton
5+
from scottzach1.pif.providers.factory import Factory
6+
from scottzach1.pif.providers.singleton import Singleton

src/pif/providers/blank.py src/scottzach1/pif/providers/blank.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
#
99
# https://github.com/scottzach1/python-injector-framework
1010

11-
from pif import exceptions
12-
from pif.providers.provider import Provider
11+
from scottzach1.pif import exceptions
12+
from scottzach1.pif.providers.provider import Provider
1313

1414

1515
class Blank(Provider):

src/pif/providers/existing_singleton.py src/scottzach1/pif/providers/existing_singleton.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# https://github.com/scottzach1/python-injector-framework
1010
from typing import TypeVar
1111

12-
from pif.providers.provider import Provider
12+
from scottzach1.pif.providers.provider import Provider
1313

1414
__all__ = ("ExistingSingleton",)
1515

src/pif/providers/factory.py src/scottzach1/pif/providers/factory.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
from collections.abc import Callable
1313
from typing import TypeVar
1414

15-
from pif.providers.provider import Provider
16-
from pif.providers.util import intercept_args
15+
from scottzach1.pif.providers.provider import Provider
16+
from scottzach1.pif.providers.util import intercept_args
1717

1818
__all__ = ("Factory",)
1919

src/pif/providers/provider.py src/scottzach1/pif/providers/provider.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def override_existing(self, value: U) -> Override[Provider[U]]:
5252
"""
5353
Override the current provider with an existing singleton.
5454
"""
55-
from pif.providers.existing_singleton import ExistingSingleton
55+
from scottzach1.pif.providers.existing_singleton import ExistingSingleton
5656

5757
return self.override(ExistingSingleton(value))
5858

src/pif/providers/singleton.py src/scottzach1/pif/providers/singleton.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
from collections.abc import Callable
1313
from typing import TypeVar
1414

15-
from pif.providers.provider import Provider
16-
from pif.providers.util import intercept_args
15+
from scottzach1.pif.providers.provider import Provider
16+
from scottzach1.pif.providers.util import intercept_args
1717

1818
__all__ = ("Singleton",)
1919

src/pif/providers/util.py src/scottzach1/pif/providers/util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import functools
22

3-
from pif.providers.provider import Provider
3+
from scottzach1.pif.providers.provider import Provider
44

55

66
def intercept_args(func):

src/pif/wiring.py src/scottzach1/pif/wiring.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from collections.abc import Callable
1717
from typing import Any, TypeVar
1818

19-
from pif.providers.provider import Provider
19+
from scottzach1.pif.providers.provider import Provider
2020

2121
__all__ = ("intercept", "patch_args", "inject", "is_patched", "patch_method", "unpatch_method", "wire", "unwire")
2222

tests/test_providers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from collections import namedtuple
22

33
import pytest
4-
from pif import exceptions, providers
4+
from scottzach1.pif import exceptions, providers
55

66

77
def test_override_standard_shallow():

tests/test_wiring.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import inspect
22
from unittest.mock import MagicMock
33

4-
from pif import providers, wiring
4+
from scottzach1.pif import providers, wiring
55

66

77
def provide(s: str) -> providers.Singleton[str]:

0 commit comments

Comments
 (0)