# eric7.Plugins.CheckerPlugins.CodeStyleChecker.Miscellaneous.eradicate

Removes commented-out Python code.

### Global Attributes

__version__
detect_encoding

### Classes

Eradicator | Eradicate comments.

### Functions

main | Main entry point.

## Eradicator

Eradicate comments.

### Derived from

object

### Class Attributes

BRACKET_REGEX
CODE_INDICATORS
CODE_KEYWORDS
CODE_KEYWORDS_AGGR
CODING_COMMENT_REGEX
DEFAULT_WHITELIST
DEF_STATEMENT_REGEX
FOR_STATEMENT_REGEX
HASH_NUMBER
MULTILINE_ASSIGNMENT_REGEX
PARTIAL_DICTIONARY_REGEX
PRINT_RETURN_REGEX
WHITELIST_REGEX
WHITESPACE_HASH
WITH_STATEMENT_REGEX

### Class Methods

None

### Methods

comment_contains_code | Return True comment contains code.
commented_out_code_line_numbers | Yield line numbers of commented-out code.
detect_encoding | Return file encoding.
filter_commented_out_code | Yield code with commented out code removed.
fix_file | Run filter_commented_out_code() on file.
multiline_case | Return True if line is probably part of some multiline code.
open_with_encoding | Return opened file with a specific encoding.
update_whitelist | Updates the whitelist.

### Static Methods

None

#### Eradicator.comment_contains_code

comment_contains_code(line, aggressive=True)

Return True comment contains code.

#### Eradicator.commented_out_code_line_numbers

commented_out_code_line_numbers(source, aggressive=True)

Yield line numbers of commented-out code.

#### Eradicator.detect_encoding

detect_encoding(filename)

Return file encoding.

#### Eradicator.filter_commented_out_code

filter_commented_out_code(source, aggressive=True)

Yield code with commented out code removed.

#### Eradicator.fix_file

fix_file(filename, args, standard_out)

Run filter_commented_out_code() on file.

#### Eradicator.multiline_case

multiline_case(line, aggressive=True)

Return True if line is probably part of some multiline code.

#### Eradicator.open_with_encoding

open_with_encoding(filename, encoding, mode='r')

Return opened file with a specific encoding.

#### Eradicator.update_whitelist

update_whitelist(new_whitelist, extend_default=True)

Updates the whitelist.

Up

## main

main(argv=sys.argv, standard_out=sys.stdout, standard_error=sys.stderr)

Main entry point.

Up