Skip to content

Commit

Permalink
Adjust imports
Browse files Browse the repository at this point in the history
  • Loading branch information
deathaxe committed Dec 30, 2024
1 parent 83bdb06 commit 55bb8bc
Show file tree
Hide file tree
Showing 69 changed files with 680 additions and 651 deletions.
2 changes: 1 addition & 1 deletion latextools/auto_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sublime
import sublime_plugin

from .latextools_utils.settings import get_setting
from .utils.settings import get_setting

__all__ = [
"LatextoolsAutoInsertLabelCommand",
Expand Down
4 changes: 2 additions & 2 deletions latextools/biblatex_name_completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import sublime
import sublime_plugin

from .external.bibtex.names import Name
from .external.bibtex.tex import tokenize_list
from .libs.bibtex.names import Name
from .libs.bibtex.tex import tokenize_list

__all__ = ["BiblatexNameCompletions"]

Expand Down
2 changes: 1 addition & 1 deletion latextools/biblatex_snippet_completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import sublime
import sublime_plugin

from .latextools_utils.logging import logger
from .utils.logging import logger

__all__ = ["SnippetCompletions"]

Expand Down
2 changes: 1 addition & 1 deletion latextools/biblatex_syntax_listener.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sublime_plugin

from .latextools_utils.settings import get_setting
from .utils.settings import get_setting

__all__ = ["BibLaTeXSyntaxListener"]

Expand Down
10 changes: 5 additions & 5 deletions latextools/context_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

from functools import partial

from .latextools_utils import analysis
from .latextools_utils.logging import logger
from .latextools_utils.selectors import build_ast
from .latextools_utils.selectors import match_selector
from .latextools_utils.settings import get_setting
from .utils import analysis
from .utils.logging import logger
from .utils.selectors import build_ast
from .utils.selectors import match_selector
from .utils.settings import get_setting

__all__ = ["LatextoolsContextListener"]

Expand Down
12 changes: 6 additions & 6 deletions latextools/delete_temp_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

from .deprecated_command import deprecate

from .latextools_utils import cache
from .latextools_utils.logging import logger
from .latextools_utils.output_directory import get_aux_directory
from .latextools_utils.output_directory import get_output_directory
from .latextools_utils.settings import get_setting
from .latextools_utils.tex_directives import get_tex_root
from .utils import cache
from .utils.logging import logger
from .utils.output_directory import get_aux_directory
from .utils.output_directory import get_output_directory
from .utils.settings import get_setting
from .utils.tex_directives import get_tex_root

__all__ = [
"LatextoolsClearCacheCommand",
Expand Down
2 changes: 1 addition & 1 deletion latextools/deprecated_command.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sublime
import sublime_plugin

from .latextools_utils.logging import logger
from .utils.logging import logger

__all__ = ["deprecate", "LatextoolsFindDeprecatedCommandsCommand"]

Expand Down
8 changes: 4 additions & 4 deletions latextools/detect_spellcheck.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import sublime_plugin

from .deprecated_command import deprecate
from .latextools_utils.logging import logger
from .latextools_utils.settings import get_setting
from .latextools_utils.tex_directives import get_tex_root
from .latextools_utils.tex_directives import parse_tex_directives
from .utils.logging import logger
from .utils.settings import get_setting
from .utils.tex_directives import get_tex_root
from .utils.tex_directives import parse_tex_directives

try: # check whether the dictionaries package is installed
import Dictionaries
Expand Down
14 changes: 7 additions & 7 deletions latextools/jumpto_anywhere.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
import sublime_plugin

from .deprecated_command import deprecate
from .latextools_utils import analysis
from .latextools_utils import ana_utils
from .latextools_utils import quickpanel
from .latextools_utils import utils
from .latextools_utils.logging import logger
from .latextools_utils.tex_directives import get_tex_root
from .latextools_utils.tex_directives import TEX_DIRECTIVE
from .utils import analysis
from .utils import ana_utils
from .utils import quickpanel
from .utils import utils
from .utils.logging import logger
from .utils.tex_directives import get_tex_root
from .utils.tex_directives import TEX_DIRECTIVE
from .latex_cite_completions import NEW_STYLE_CITE_REGEX
from .latex_glossary_completions import ACR_LINE_RE
from .latex_glossary_completions import GLO_LINE_RE
Expand Down
19 changes: 9 additions & 10 deletions latextools/jumpto_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,17 @@

from .deprecated_command import deprecate
from .latextools_plugin import add_plugin_path
from .latextools_plugin import add_whitelist_module
from .latextools_plugin import get_plugin
from .latextools_plugin import NoSuchPluginException
from .latextools_utils.is_tex_file import is_tex_file
from .latextools_utils.output_directory import get_jobname
from .latextools_utils.output_directory import get_output_directory
from .latextools_utils.logging import logger
from .latextools_utils.settings import get_setting
from .latextools_utils.sublime_utils import focus_st
from .latextools_utils.tex_directives import get_tex_root

__all__ = ["LatextoolsJumptoPdfCommand", "LatextoolsViewPdfCommand", "plugin_loaded"]
from .utils.is_tex_file import is_tex_file
from .utils.logging import logger
from .utils.output_directory import get_jobname
from .utils.output_directory import get_output_directory
from .utils.settings import get_setting
from .utils.sublime_utils import focus_st
from .utils.tex_directives import get_tex_root

__all__ = ["LatextoolsJumptoPdfCommand", "LatextoolsViewPdfCommand"]

SUBLIME_VERSION = re.compile(r"Build (\d{4})", re.UNICODE)
DEFAULT_VIEWERS = {"linux": "evince", "osx": "skim", "windows": "sumatra"}
Expand Down
12 changes: 6 additions & 6 deletions latextools/jumpto_tex_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
import sublime_plugin

from .deprecated_command import deprecate
from .latextools_utils import analysis
from .latextools_utils import utils
from .latextools_utils.external_command import external_command
from .latextools_utils.logging import logger
from .latextools_utils.settings import get_setting
from .latextools_utils.tex_directives import get_tex_root
from .utils import analysis
from .utils import utils
from .utils.external_command import external_command
from .utils.logging import logger
from .utils.settings import get_setting
from .utils.tex_directives import get_tex_root

__all__ = ["LatextoolsJumptoFileCommand"]

Expand Down
16 changes: 8 additions & 8 deletions latextools/latex_cite_completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
import traceback

from .latex_fill_all import FillAllHelper
from .latextools_utils import analysis
from .latextools_utils import bibformat
from .latextools_utils import cache
from .latextools_utils.external_command import CalledProcessError
from .latextools_utils.external_command import check_output
from .latextools_utils.logging import logger
from .latextools_utils.settings import get_setting
from .latextools_utils.tex_directives import get_tex_root
from .utils import analysis
from .utils import bibformat
from .utils import cache
from .utils.external_command import CalledProcessError
from .utils.external_command import check_output
from .utils.logging import logger
from .utils.settings import get_setting
from .utils.tex_directives import get_tex_root
from . import latextools_plugin


Expand Down
16 changes: 8 additions & 8 deletions latextools/latex_cwl_completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
from .latex_own_command_completions import get_own_env_completion
from .latex_ref_completions import NEW_STYLE_REF_REGEX
from .latex_ref_completions import OLD_STYLE_REF_REGEX
from .latextools_utils import analysis
from .latextools_utils import utils
from .latextools_utils.logging import logger
from .latextools_utils.parser_utils import command_to_snippet
from .latextools_utils.settings import get_setting
from .latextools_utils.tex_directives import get_tex_root

__all__ = ["LatexCwlCompletion", "plugin_loaded"]
from .utils import analysis
from .utils import utils
from .utils.parser_utils import command_to_snippet
from .utils.logging import logger
from .utils.settings import get_setting
from .utils.tex_directives import get_tex_root

__all__ = ["LatexCwlCompletion"]

ST_VER = int(sublime.version())

Expand Down
2 changes: 1 addition & 1 deletion latextools/latex_directive_completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from . import detect_spellcheck
from .latex_fill_all import FillAllHelper
from .latextools_utils.settings import get_setting
from .utils.settings import get_setting

try:
installed_locales = sorted(detect_spellcheck._dictionary_mappings.keys())
Expand Down
4 changes: 2 additions & 2 deletions latextools/latex_doc_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import sublime_plugin

from .deprecated_command import deprecate
from .latextools_utils.distro_utils import using_miktex
from .latextools_utils.external_command import external_command
from .utils.distro_utils import using_miktex
from .utils.external_command import external_command

__all__ = ["LatextoolsPkgDocCommand", "LatextoolsViewDocCommand"]

Expand Down
2 changes: 1 addition & 1 deletion latextools/latex_env_completions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .latex_fill_all import FillAllHelper
from .latextools_utils.settings import get_setting
from .utils.settings import get_setting
from .latex_cwl_completions import BEGIN_END_BEFORE_REGEX
from .latex_cwl_completions import get_cwl_completions
from .latex_cwl_completions import is_cwl_available
Expand Down
16 changes: 11 additions & 5 deletions latextools/latex_fill_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@
from .deprecated_command import deprecate
from .latextools_plugin import _classname_to_internal_name
from .latextools_plugin import get_plugins_by_type
from .latextools_utils.logging import logger
from .latextools_utils.settings import get_setting
from .latextools_utils.internal_types import FillAllHelper
from .latextools_utils.input_quickpanel import show_input_quick_panel

from .utils.logging import logger
from .utils.settings import get_setting
from .utils.internal_types import FillAllHelper
from .utils.input_quickpanel import show_input_quick_panel

__all__ = [
"LatexFillAllEventListener",
"LatextoolsFillAllCommand",
"LatexToolsFillAllCompleteBracket",
"LatexToolsReplaceWord",
]

def reraise(tp, value, tb=None):
if value is None:
Expand Down
8 changes: 4 additions & 4 deletions latextools/latex_glossary_completions.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import re

from .latex_fill_all import FillAllHelper
from .latextools_utils import analysis
from .latextools_utils import cache
from .latextools_utils.settings import get_setting
from .latextools_utils.tex_directives import get_tex_root
from .utils import analysis
from .utils import cache
from .utils.settings import get_setting
from .utils.tex_directives import get_tex_root


GLO_LINE_RE = re.compile(r"([^{}\[\]]*)\{*?(?:lp|lobmys)?sl(?:G|g)\\")
Expand Down
14 changes: 7 additions & 7 deletions latextools/latex_input_completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
import sublime

from .latex_fill_all import FillAllHelper
from .latextools_utils import analysis
from .latextools_utils.is_tex_file import get_tex_extensions
from .latextools_utils.logging import logger
from .latextools_utils.output_directory import get_aux_directory
from .latextools_utils.output_directory import get_output_directory
from .latextools_utils.settings import get_setting
from .latextools_utils.tex_directives import get_tex_root
from .utils import analysis
from .utils.is_tex_file import get_tex_extensions
from .utils.output_directory import get_aux_directory
from .utils.output_directory import get_output_directory
from .utils.logging import logger
from .utils.settings import get_setting
from .utils.tex_directives import get_tex_root


def _filter_invalid_entries(entries):
Expand Down
6 changes: 3 additions & 3 deletions latextools/latex_installed_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
import sublime_plugin

from .deprecated_command import deprecate
from .latextools_utils.external_command import CalledProcessError
from .latextools_utils.external_command import check_output
from .latextools_utils.logging import logger
from .utils.external_command import CalledProcessError
from .utils.external_command import check_output
from .utils.logging import logger

__all__ = ["LatextoolsGenPkgCacheCommand"]

Expand Down
8 changes: 4 additions & 4 deletions latextools/latex_own_command_completions.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .latextools_utils import analysis
from .latextools_utils import cache
from .latextools_utils.parser_utils import command_to_snippet
from .latextools_utils.tex_directives import get_tex_root
from .utils import analysis
from .utils import cache
from .utils.parser_utils import command_to_snippet
from .utils.tex_directives import get_tex_root


class NoArgs(Exception):
Expand Down
8 changes: 4 additions & 4 deletions latextools/latex_ref_completions.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from .latex_fill_all import FillAllHelper
from .latextools_utils import analysis
from .latextools_utils.logging import logger
from .latextools_utils.settings import get_setting
from .latextools_utils.tex_directives import get_tex_root
from .utils import analysis
from .utils.logging import logger
from .utils.settings import get_setting
from .utils.tex_directives import get_tex_root

import re

Expand Down
12 changes: 6 additions & 6 deletions latextools/latextools_cache_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

from .latex_cite_completions import find_bib_files
from .latex_cite_completions import run_plugin_command
from .latextools_utils import analysis
from .latextools_utils.activity_indicator import ActivityIndicator
from .latextools_utils.cache import LocalCache
from .latextools_utils.logging import logger
from .latextools_utils.settings import get_setting
from .latextools_utils.tex_directives import get_tex_root
from .utils import analysis
from .utils.activity_indicator import ActivityIndicator
from .utils.cache import LocalCache
from .utils.logging import logger
from .utils.settings import get_setting
from .utils.tex_directives import get_tex_root

__all__ = [
"LatextoolsCacheUpdateListener",
Expand Down
Loading

0 comments on commit 55bb8bc

Please sign in to comment.