Skip to content

Commit

Permalink
Prevent usage of shadow includes if we can successfully import the ot…
Browse files Browse the repository at this point in the history
…hers
  • Loading branch information
MaddyGuthridge committed Jan 30, 2022
1 parent 4594c2d commit ab408f9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions include/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@

import sys

directory = __file__.removesuffix("\\__init__.py")
try:
import typing
import abc
except ImportError:
directory = __file__.removesuffix("\\__init__.py")

# Add right to the start of the path
sys.path.insert(0, directory)
# Add right to the start of the path
sys.path.insert(0, directory)

0 comments on commit ab408f9

Please sign in to comment.