/opt/imh/python3.13/lib/python3.13/idlelib/__pycache__
Edit: /opt/imh/python3.13/lib/python3.13/idlelib/__pycache__/format.cpython-313.pyc (20571B)
e= S r SSKrSSKJr SSKJr SSKJr " S S5 r\R 5 S r
S rS
rS r
S rS
r\R " S5 rS r " S S5 r " S S5 r " S S5 r\S:X a SSKJr \" SSSS9 gg)zFormat all or a selected region (line slice) of text.
Region formatting options: paragraph, comment block, indent, deindent,
comment, uncomment, tabify, and untabify.
File renamed from paragraph.py with functions added from editor.py.
N)askyesno)
askinteger)idleConfc > \ rS rSrSrS r\S 5 rS rS S jr Sr
g)
FormatParagraph a Format a paragraph, comment block, or selection to a max width.
Does basic, standard text formatting, and also understands Python
comment blocks. Thus, for editing Python source code, this
extension is really only suitable for reformatting these comment
blocks or triple-quoted strings.
Known problems with comment reformatting:
* If there is a selection marked, and the first line of the
selection is not complete, the block will probably not be detected
as comments, and will have the normal "text formatting" rules
applied.
* If a comment block has leading whitespace that mixes tabs and
spaces, they will not be considered part of the same block.
* Fancy comments, like this bulleted list, aren't handled :-)
c Xl g Neditwinselfr s 4/opt/imh/python3.13/lib/python3.13/idlelib/format.py__init__FormatParagraph.__init__ c > [ R " SSSSSS9U l g )N
extensionsr z max-widthintH )typedefault)r GetOption max_width)clss r reloadFormatParagraph.reload" s! **<9J+6UBP
r c S U l g r
r r s r closeFormatParagraph.close' s r Nc x Uc U R OUnU R R nU R R 5 u pEU( a$ U( a UR XE5 n[ U5 nO[
X3R S5 5 u pEpvU( a
[ XbU5 nO[ Xb5 nUR SSS5 X:w aU UR SU5 UR 5 UR XE5 UR XH5 UR 5 OUR SU5 UR! S5 g)a Formats paragraph to a max width specified in idleConf.
If text is selected, format_paragraph_event will start breaking lines
at the max width, starting from the beginning selection.
If no text is selected, format_paragraph_event uses the current
cursor location to determine the paragraph (lines of text surrounded
by blank lines) and formats it.
The length limit parameter is for testing with a known value.
insertsel1.0endbreak)r r textget_selection_indicesgetget_comment_headerfind_paragraphindexreformat_commentreformat_paragraph
tag_removemark_setundo_block_startdeleter$ undo_block_stopsee) r eventlimitr) firstlastdatacomment_headernewdatas r format_paragraph_event&FormatParagraph.format_paragraph_event* s #(-U|| ll88:T88E(D/5N #4H)=>
.E&tNCG(5Gue,?MM(E*!!#KK$KK' "MM(D)r r r
)__name__
__module____qualname____firstlineno____doc__r classmethodr r! r> __static_attributes__ r r r r s, P P$r r c [ [ UR S5 5 u p#U R SU- SU- 5 nU R SU- SS5 ( aZ [ U5 ( aJ US- nU R SU- SU- 5 nU R SU- SS5 ( a [ U5 ( a MJ Un[
U5 n[ U5 n[
U5 U:X aR [ XGS 5 ( d@ US- nU R SU- SU- 5 n[
U5 U:X a [ XGS 5 ( d M@ SU- nUS-
nU R SU- SU- 5 nUS: ag [
U5 U:X aX [ XGS 5 ( dF US-
nU R SU- SU- 5 nUS: a# [
U5 U:X a [ XGS 5 ( d MF SUS- - n XX`R X5 4$ ) zReturns the start/stop indices enclosing the paragraph that mark is in.
Also returns the comment format string, if any, and paragraph of text
between the start/stop indices.
.z%d.0z%d.end