Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Remove duplicate imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Dec 9, 2021
1 parent 52b810f commit 5b94d90
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 11 deletions.
1 change: 0 additions & 1 deletion build/pkgs/database_odlyzko_zeta/spkg-install.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os
from sage.all import save
from sage.env import SAGE_SHARE
import os

install_root = os.path.join(SAGE_SHARE, 'odlyzko')
target = os.path.join(install_root, 'zeros.sobj')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2271,7 +2271,6 @@ def _save_data_dig6(n, types='ClassicalExceptional', verbose=False):
data.update(_construct_exceptional_mutation_classes(n))

from sage.env import DOT_SAGE
import os
types_path = os.path.join(DOT_SAGE, 'cluster_algebra_quiver')
types_file = os.path.join(types_path, 'mutation_classes_%s.dig6' % n)
os.makedirs(types_path, exist_ok=True)
Expand Down
1 change: 0 additions & 1 deletion src/sage/databases/jones.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ def _init(self, path):
This takes about 5 seconds.
"""
import os
x = PolynomialRing(RationalField(), 'x').gen()
self.root = {}
self.root[tuple([])] = [x - 1]
Expand Down
1 change: 0 additions & 1 deletion src/sage/databases/sloane.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ def copy_gz_file(gz_source, bz_destination):
- ``bz_destination`` -- string. The name of the newly compressed file.
"""
import gzip
import os

# Read the gzipped input
try:
Expand Down
1 change: 0 additions & 1 deletion src/sage/interfaces/expect.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,6 @@ def _do_cleaner(self):
return False

def _start(self, alt_message=None, block_during_init=True):
import os
self.quit() # in case one is already running

self._session_number += 1
Expand Down
3 changes: 1 addition & 2 deletions src/sage/misc/cachefunc.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ cdef extern from "methodobject.h":
cdef int PyCFunction_GetFlags(object op) except -1

import os
from os.path import relpath,normpath,commonprefix
from os.path import relpath, normpath, commonprefix
from sage.misc.sageinspect import sage_getfile, sage_getsourcelines, sage_getargspec
from inspect import isfunction

Expand Down Expand Up @@ -3348,7 +3348,6 @@ class FileCache(object):
sage: FC[((),())]
1
"""
import os
if not dir or dir[-1] != '/':
dir += '/'
self._dir = dir
Expand Down
1 change: 0 additions & 1 deletion src/sage/misc/func_persist.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ class func_persist:
definition to cache values it computes to disk.
"""
def __init__(self, f, dir='func_persist'):
import os
self.__func = f
self.__dir = dir
os.makedirs(dir, exist_ok=True)
Expand Down
1 change: 0 additions & 1 deletion src/sage/misc/lazy_import.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,6 @@ def save_cache_file():
sage: import sage.misc.lazy_import
sage: sage.misc.lazy_import.save_cache_file()
"""
import os
from sage.misc.temporary_file import atomic_write

global star_imports
Expand Down
1 change: 0 additions & 1 deletion src/sage_docbuild/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@

import sage.all
from sage.misc.cachefunc import cached_method
import os
from sage.env import SAGE_DOC_SRC, SAGE_DOC, SAGE_SRC, DOT_SAGE

from .build_options import (LANGUAGES, SPHINXOPTS, PAPER, OMIT,
Expand Down
1 change: 0 additions & 1 deletion src/sage_docbuild/ext/multidocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
from sphinx.application import Sphinx
from sphinx.util.console import bold
from sage.env import SAGE_DOC
import os
from pathlib import Path

logger = sphinx.util.logging.getLogger(__name__)
Expand Down

0 comments on commit 5b94d90

Please sign in to comment.