Skip to content

Commit

Permalink
fix: try avoid circular import while register plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
petrus-v committed Nov 25, 2022
1 parent 55ec676 commit 345fa6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
9 changes: 1 addition & 8 deletions src/uri_pathlib_factory/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import os

from .main import (
PathFactory,
PurePathFactory,
load_pathlib_monkey_patch,
load_uri_backends_from_plugins,
)
from .main import PathFactory, PurePathFactory, load_pathlib_monkey_patch

__version__ = "0.1.1"

Expand All @@ -16,8 +11,6 @@
]


load_uri_backends_from_plugins()

if os.environ.get("URI_PATHLIB_FACTORY_LOAD_PATHLIB_PATCH", "").lower() in [
"1",
"true",
Expand Down
3 changes: 3 additions & 0 deletions src/uri_pathlib_factory/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,6 @@ def unload_pathlib_monkey_patch():
"""
Path.__new__ = original_path_new
PurePath.__new__ = original_purepath_new


load_uri_backends_from_plugins()

0 comments on commit 345fa6e

Please sign in to comment.