|
18 | 18 | from __future__ import print_function |
19 | 19 | from __future__ import unicode_literals |
20 | 20 |
|
21 | | -import codecs |
22 | 21 | import logging |
23 | 22 | import os |
24 | 23 | from os.path import exists, join |
|
28 | 27 | # silence unicode literals warnings |
29 | 28 | click.disable_unicode_literals_warning = True |
30 | 29 |
|
31 | | -import attributecode |
32 | | -from attributecode import CRITICAL |
33 | | -from attributecode import ERROR |
34 | | -from attributecode import INFO |
35 | | -from attributecode import NOTSET |
36 | | -from attributecode import WARNING |
37 | 30 | from attributecode import __about_spec_version__ |
38 | 31 | from attributecode import __version__ |
39 | 32 | from attributecode import attrib |
40 | | -from attributecode import Error |
41 | 33 | from attributecode import gen |
42 | 34 | from attributecode import model |
43 | | -from attributecode.model import About |
44 | 35 | from attributecode import severities |
45 | 36 | from attributecode.util import extract_zip |
46 | 37 | from attributecode.util import to_posix |
@@ -147,7 +138,7 @@ def inventory(location, output, quiet, format): |
147 | 138 | # accept zipped ABOUT files as input |
148 | 139 | location = extract_zip(location) |
149 | 140 |
|
150 | | - errors, abouts = attributecode.model.collect_inventory(location) |
| 141 | + errors, abouts = model.collect_inventory(location) |
151 | 142 |
|
152 | 143 | write_errors = model.write_output(abouts, output, format) |
153 | 144 | for err in write_errors: |
@@ -209,7 +200,7 @@ def gen(location, output, mapping, license_notice_text_location, fetch_license, |
209 | 200 |
|
210 | 201 | click.echo('Generating .ABOUT files...') |
211 | 202 |
|
212 | | - errors, abouts = attributecode.gen.generate( |
| 203 | + errors, abouts = gen.generate( |
213 | 204 | location=location, base_dir=output, use_mapping=mapping, |
214 | 205 | license_notice_text_location=license_notice_text_location, |
215 | 206 | fetch_license=fetch_license) |
@@ -274,7 +265,7 @@ def attrib(location, output, template, mapping, inventory, quiet): |
274 | 265 | location = extract_zip(location) |
275 | 266 |
|
276 | 267 | inv_errors, abouts = model.collect_inventory(location) |
277 | | - no_match_errors = attributecode.attrib.generate_and_save( |
| 268 | + no_match_errors = attrib.generate_and_save( |
278 | 269 | abouts=abouts, output_location=output, |
279 | 270 | use_mapping=mapping, template_loc=template, |
280 | 271 | inventory_location=inventory) |
@@ -316,7 +307,7 @@ def check(location, show_all): |
316 | 307 | click.echo('Running aboutcode-toolkit version ' + __version__) |
317 | 308 | click.echo('Checking ABOUT files...') |
318 | 309 |
|
319 | | - errors, abouts = attributecode.model.collect_inventory(location) |
| 310 | + errors, abouts = model.collect_inventory(location) |
320 | 311 |
|
321 | 312 | msg_format = '%(sever)s: %(message)s' |
322 | 313 | print_errors = [] |
|
0 commit comments