No encoding specified for file
Reports a missing encoding comment in Python 2.
Example:
class Book(object):
def __init__(self):
pass
When the quick-fix is applied, the missing comment is added:
# coding=utf-8
class Book(object):
def __init__(self):
pass
Inspection options
Option | Type | Default |
---|---|---|
Enable in Python 3+ | Checkbox | false |
Select default encoding | Dropdown | utf-8 |
Encoding comment format | Dropdown | # coding=[encoding name] |
Inspection Details | |
---|---|
Available in: | DataSpell 2023.3, PyCharm 2023.3 |
Plugin: | Python Community Edition, 233.SNAPSHOT |
Last modified: 13 July 2023