Skip to content

Commit

Permalink
reorganize modules
Browse files Browse the repository at this point in the history
  • Loading branch information
perrinjerome committed Jun 22, 2024
1 parent 3aca533 commit 119a41c
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 8 deletions.
3 changes: 2 additions & 1 deletion server/buildoutls/buildout.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
section_header,
)

from . import aiohttp_session, jinja, recipes
from . import jinja, recipes
from .util import aiohttp_session

logger = logging.getLogger(__name__)

Expand Down
3 changes: 2 additions & 1 deletion server/buildoutls/code_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
UpdateMD5SumCommandParams,
)

from . import buildout, pypi
from .util import pypi
from . import buildout

logger = logging.getLogger(__name__)
converter = get_converter()
Expand Down
3 changes: 2 additions & 1 deletion server/buildoutls/diagnostic.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
from pygls.server import LanguageServer
from zc.buildout.configparser import MissingSectionHeaderError, ParsingError

from . import buildout, jinja, pypi, types
from . import buildout, jinja, types
from .util import pypi

# this is a function to be patched in unittest
from os.path import exists as os_path_exists
Expand Down
4 changes: 3 additions & 1 deletion server/buildoutls/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,14 @@
code_actions,
commands,
diagnostic,
md5sum,
profiling,
recipes,
types,
)

from .util import md5sum


server = LanguageServer(name="zc.buildout.languageserver", version="0.9.0")

server.command(commands.COMMAND_START_PROFILING)(profiling.start_profiling)
Expand Down
2 changes: 1 addition & 1 deletion server/buildoutls/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
_resolved_extends_cache,
parse,
)
from ..aiohttp_session import close_session
from ..util.aiohttp_session import close_session


@pytest.fixture(autouse=True)
Expand Down
Empty file.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
)
from pygls.server import LanguageServer

from . import aiohttp_session, buildout
from .types import UpdateMD5SumCommandParams
from . import aiohttp_session
from .. import buildout
from ..types import UpdateMD5SumCommandParams


async def update_md5sum(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import pkg_resources

from . import aiohttp_session
from .types import KnownVulnerability, VersionNotFound, ProjectNotFound
from ..types import KnownVulnerability, VersionNotFound, ProjectNotFound
import cattrs

converter = cattrs.Converter()
Expand Down

0 comments on commit 119a41c

Please sign in to comment.