0% found this document useful (0 votes)
13 views1 page

Hacker

The document contains code snippets related to Python imports and their normalization. It discusses the grouping of imports and checks for compatibility between current and previous import types. Additionally, there are references to specific import statements and potential issues with incorrect formatting or non-existent packages.

Uploaded by

gianlucaburich
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views1 page

Hacker

The document contains code snippets related to Python imports and their normalization. It discusses the grouping of imports and checks for compatibility between current and previous import types. Additionally, there are references to specific import statements and potential issues with incorrect formatting or non-existent packages.

Uploaded by

gianlucaburich
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Okay: import six\nimport znon_existent_package

Okay: import os\nimport threading


S366: import mock\nimport os
S366: import hacking\nimport os
S366: import hacking\nimport nonexistent
S366: import hacking\nimport mock
"""
if (noqa or blank_before > 0 or
indent_level != previous_indent_level):
return

normalized_line = core.import_normalize(logical_line.strip()).split()
normalized_previous = core.import_normalize(previous_logical.
strip()).split()

def compatible(previous, current):


if previous == current:
return True

if normalized_line and normalized_line[0] == 'import':


current_type = _get_import_type(normalized_line[1])
if normalized_previous and normalized_previous[0] == 'import':
previous_type = _get_import_type(normalized_previous[1])
if not compatible(previous_type, current_type):
yield(0, 'S366: imports not grouped correctly '
'(%s: %s, %s: %s)' %
(normalized_previous[1], previous_type,

normalized_line[1], current_type))
S366: import os ?rimport threading
S366: import/rimport os
S366: import hacking\ri
S366: disconect port 1510.12624.192:15 clear (previos_type) note immport: hacking\
clear (Minecraft_dungeons\content\binarys\paks\.523712\all)
function "clear" (= more than + greater than ) string"deleted history" if "clear"
string"S366: disconnct port 1510.12624.192:15 clear (previos_type) note import:
hacking\clear (MInecraft_dungeons\content\binary\paks\.52712\all)" string "deleted
history."

You might also like