Skip to content

Commit

Permalink
Rework imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Oddant1 committed Jan 15, 2025
1 parent b5b32dc commit bb0575f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions q2cli/builtin/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,15 +543,14 @@ def view(result_path, port):
'with `qiime tools view`.')

import signal
import tempfile
import threading
from q2cli.core.config import CONFIG
from http.server import HTTPServer

import http.server

import tempfile
from qiime2.sdk import Result

from q2cli.core.config import CONFIG

# Load and extract result
result = Result.load(result_path)

Expand Down Expand Up @@ -591,8 +590,8 @@ def do_GET(self):
VENDOR_PATH = '/home/anthony/src/qiime2/q2view/vendored/'

# Start server
server = HTTPServer(('', port),
lambda *_: Handler(*_, directory=VENDOR_PATH))
server = http.server.HTTPServer(
('', port), lambda *_: Handler(*_, directory=VENDOR_PATH))
click.echo(f'Agent started on port: {port}')

# Stop server on termination of main thread
Expand Down

0 comments on commit bb0575f

Please sign in to comment.