Skip to content

Commit

Permalink
Use absolute imports in sphinx
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Jul 15, 2024
1 parent 2a30bb6 commit 51a964c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sphinx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@

import os
import warnings
from os import path

from .deprecation import RemovedInNextVersionWarning

# by default, all DeprecationWarning under sphinx package will be emit.
# Users can avoid this by using environment variable: PYTHONWARNINGS=
if 'PYTHONWARNINGS' not in os.environ:
from sphinx.deprecation import RemovedInNextVersionWarning

warnings.filterwarnings('default', category=RemovedInNextVersionWarning)
warnings.filterwarnings(
'ignore', 'The frontend.Option class .*', DeprecationWarning, module='docutils.frontend'
Expand All @@ -30,7 +29,7 @@
#: Before version 1.2, check the string ``sphinx.__version__``.
version_info = (7, 4, 0, 'beta', 0)

package_dir = path.abspath(path.dirname(__file__))
package_dir = os.path.abspath(os.path.dirname(__file__))

_in_development = True
if _in_development:
Expand Down

0 comments on commit 51a964c

Please sign in to comment.