mirror of
https://github.com/bndr/pipreqs.git
synced 2025-06-07 03:55:22 +00:00
update deprecated warn(), py 3 strings, whitespace
tests all pass (eventually)
This commit is contained in:
parent
a593d27e3d
commit
2728f2e7a4
16
docs/conf.py
16
docs/conf.py
@ -55,8 +55,8 @@ source_suffix = '.rst'
|
|||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
# General information about the project.
|
# General information about the project.
|
||||||
project = u'pipreqs'
|
project = 'pipreqs'
|
||||||
copyright = u'2015, Vadim Kravcenko'
|
copyright = '2015, Vadim Kravcenko'
|
||||||
|
|
||||||
# The version info for the project you're documenting, acts as replacement
|
# The version info for the project you're documenting, acts as replacement
|
||||||
# for |version| and |release|, also used in various other places throughout
|
# for |version| and |release|, also used in various other places throughout
|
||||||
@ -209,8 +209,8 @@ latex_elements = {
|
|||||||
# [howto/manual]).
|
# [howto/manual]).
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
('index', 'pipreqs.tex',
|
('index', 'pipreqs.tex',
|
||||||
u'pipreqs Documentation',
|
'pipreqs Documentation',
|
||||||
u'Vadim Kravcenko', 'manual'),
|
'Vadim Kravcenko', 'manual'),
|
||||||
]
|
]
|
||||||
|
|
||||||
# The name of an image file (relative to this directory) to place at
|
# The name of an image file (relative to this directory) to place at
|
||||||
@ -240,8 +240,8 @@ latex_documents = [
|
|||||||
# (source start file, name, description, authors, manual section).
|
# (source start file, name, description, authors, manual section).
|
||||||
man_pages = [
|
man_pages = [
|
||||||
('index', 'pipreqs',
|
('index', 'pipreqs',
|
||||||
u'pipreqs Documentation',
|
'pipreqs Documentation',
|
||||||
[u'Vadim Kravcenko'], 1)
|
['Vadim Kravcenko'], 1)
|
||||||
]
|
]
|
||||||
|
|
||||||
# If true, show URL addresses after external links.
|
# If true, show URL addresses after external links.
|
||||||
@ -255,8 +255,8 @@ man_pages = [
|
|||||||
# dir menu entry, description, category)
|
# dir menu entry, description, category)
|
||||||
texinfo_documents = [
|
texinfo_documents = [
|
||||||
('index', 'pipreqs',
|
('index', 'pipreqs',
|
||||||
u'pipreqs Documentation',
|
'pipreqs Documentation',
|
||||||
u'Vadim Kravcenko',
|
'Vadim Kravcenko',
|
||||||
'pipreqs',
|
'pipreqs',
|
||||||
'One line description of project.',
|
'One line description of project.',
|
||||||
'Miscellaneous'),
|
'Miscellaneous'),
|
||||||
|
@ -124,7 +124,7 @@ def get_all_imports(
|
|||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
if ignore_errors:
|
if ignore_errors:
|
||||||
traceback.print_exc(exc)
|
traceback.print_exc(exc)
|
||||||
logging.warn("Failed on file: %s" % file_name)
|
logging.warning("Failed on file: %s" % file_name)
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
logging.error("Failed on file: %s" % file_name)
|
logging.error("Failed on file: %s" % file_name)
|
||||||
@ -206,7 +206,7 @@ def get_locally_installed_packages(encoding=None):
|
|||||||
package = root.split(os.sep)[-1].split("-")
|
package = root.split(os.sep)[-1].split("-")
|
||||||
try:
|
try:
|
||||||
package_import = f.read().strip().split("\n")
|
package_import = f.read().strip().split("\n")
|
||||||
except: # NOQA
|
except Exception: # NOQA
|
||||||
# TODO: What errors do we intend to suppress here?
|
# TODO: What errors do we intend to suppress here?
|
||||||
continue
|
continue
|
||||||
for i_item in package_import:
|
for i_item in package_import:
|
||||||
|
@ -145,7 +145,7 @@ class TestPipreqs(unittest.TestCase):
|
|||||||
Test that we can save requirements.txt correctly
|
Test that we can save requirements.txt correctly
|
||||||
to a different path
|
to a different path
|
||||||
"""
|
"""
|
||||||
pipreqs.init({'<path>': self.project, '--savepath': self.alt_requirement_path,
|
pipreqs.init({'<path>': self.project, '--savepath': self.alt_requirement_path,
|
||||||
'--use-local': None, '--proxy':None, '--pypi-server':None, '--print': False,
|
'--use-local': None, '--proxy':None, '--pypi-server':None, '--print': False,
|
||||||
'--diff': None, '--clean': None, '--mode': None})
|
'--diff': None, '--clean': None, '--mode': None})
|
||||||
assert os.path.exists(self.alt_requirement_path) == 1
|
assert os.path.exists(self.alt_requirement_path) == 1
|
||||||
@ -163,7 +163,7 @@ class TestPipreqs(unittest.TestCase):
|
|||||||
"""
|
"""
|
||||||
with open(self.requirements_path, "w") as f:
|
with open(self.requirements_path, "w") as f:
|
||||||
f.write("should_not_be_overwritten")
|
f.write("should_not_be_overwritten")
|
||||||
pipreqs.init({'<path>': self.project, '--savepath': None, '--use-local': None,
|
pipreqs.init({'<path>': self.project, '--savepath': None, '--use-local': None,
|
||||||
'--force': None, '--proxy':None, '--pypi-server':None, '--print': False,
|
'--force': None, '--proxy':None, '--pypi-server':None, '--print': False,
|
||||||
'--diff': None, '--clean': None, '--mode': None})
|
'--diff': None, '--clean': None, '--mode': None})
|
||||||
assert os.path.exists(self.requirements_path) == 1
|
assert os.path.exists(self.requirements_path) == 1
|
||||||
@ -203,7 +203,7 @@ class TestPipreqs(unittest.TestCase):
|
|||||||
Test --ignore parameter
|
Test --ignore parameter
|
||||||
"""
|
"""
|
||||||
pipreqs.init(
|
pipreqs.init(
|
||||||
{'<path>': self.project_with_ignore_directory, '--savepath': None,
|
{'<path>': self.project_with_ignore_directory, '--savepath': None,
|
||||||
'--print': False, '--use-local': None, '--force': True,
|
'--print': False, '--use-local': None, '--force': True,
|
||||||
'--proxy':None, '--pypi-server':None,
|
'--proxy':None, '--pypi-server':None,
|
||||||
'--ignore':'.ignored_dir,.ignore_second',
|
'--ignore':'.ignored_dir,.ignore_second',
|
||||||
@ -222,7 +222,7 @@ class TestPipreqs(unittest.TestCase):
|
|||||||
Test --mode=no-pin
|
Test --mode=no-pin
|
||||||
"""
|
"""
|
||||||
pipreqs.init(
|
pipreqs.init(
|
||||||
{'<path>': self.project_with_ignore_directory, '--savepath': None,
|
{'<path>': self.project_with_ignore_directory, '--savepath': None,
|
||||||
'--print': False, '--use-local': None, '--force': True,
|
'--print': False, '--use-local': None, '--force': True,
|
||||||
'--proxy': None, '--pypi-server': None,
|
'--proxy': None, '--pypi-server': None,
|
||||||
'--diff': None,
|
'--diff': None,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user