pyflyby 1.10.4__cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyflyby/__init__.py +61 -0
- pyflyby/__main__.py +9 -0
- pyflyby/_autoimp.py +2228 -0
- pyflyby/_cmdline.py +591 -0
- pyflyby/_comms.py +221 -0
- pyflyby/_dbg.py +1383 -0
- pyflyby/_dynimp.py +154 -0
- pyflyby/_fast_iter_modules.cpython-312-x86_64-linux-gnu.so +0 -0
- pyflyby/_file.py +771 -0
- pyflyby/_flags.py +230 -0
- pyflyby/_format.py +186 -0
- pyflyby/_idents.py +227 -0
- pyflyby/_import_sorting.py +165 -0
- pyflyby/_importclns.py +658 -0
- pyflyby/_importdb.py +535 -0
- pyflyby/_imports2s.py +643 -0
- pyflyby/_importstmt.py +723 -0
- pyflyby/_interactive.py +2113 -0
- pyflyby/_livepatch.py +793 -0
- pyflyby/_log.py +107 -0
- pyflyby/_modules.py +646 -0
- pyflyby/_parse.py +1396 -0
- pyflyby/_py.py +2165 -0
- pyflyby/_saveframe.py +1145 -0
- pyflyby/_saveframe_reader.py +471 -0
- pyflyby/_util.py +458 -0
- pyflyby/_version.py +8 -0
- pyflyby/autoimport.py +20 -0
- pyflyby/etc/pyflyby/canonical.py +10 -0
- pyflyby/etc/pyflyby/common.py +27 -0
- pyflyby/etc/pyflyby/forget.py +10 -0
- pyflyby/etc/pyflyby/mandatory.py +10 -0
- pyflyby/etc/pyflyby/numpy.py +156 -0
- pyflyby/etc/pyflyby/std.py +335 -0
- pyflyby/importdb.py +19 -0
- pyflyby/libexec/pyflyby/colordiff +34 -0
- pyflyby/libexec/pyflyby/diff-colorize +148 -0
- pyflyby/share/emacs/site-lisp/pyflyby.el +112 -0
- pyflyby-1.10.4.data/scripts/collect-exports +76 -0
- pyflyby-1.10.4.data/scripts/collect-imports +58 -0
- pyflyby-1.10.4.data/scripts/find-import +38 -0
- pyflyby-1.10.4.data/scripts/prune-broken-imports +34 -0
- pyflyby-1.10.4.data/scripts/pyflyby-diff +34 -0
- pyflyby-1.10.4.data/scripts/reformat-imports +27 -0
- pyflyby-1.10.4.data/scripts/replace-star-imports +37 -0
- pyflyby-1.10.4.data/scripts/saveframe +299 -0
- pyflyby-1.10.4.data/scripts/tidy-imports +170 -0
- pyflyby-1.10.4.data/scripts/transform-imports +47 -0
- pyflyby-1.10.4.dist-info/METADATA +605 -0
- pyflyby-1.10.4.dist-info/RECORD +53 -0
- pyflyby-1.10.4.dist-info/WHEEL +6 -0
- pyflyby-1.10.4.dist-info/entry_points.txt +4 -0
- pyflyby-1.10.4.dist-info/licenses/LICENSE.txt +19 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import matplotlib
|
|
2
|
+
from matplotlib import pyplot
|
|
3
|
+
import matplotlib.colors
|
|
4
|
+
from matplotlib.colors import ColorConverter
|
|
5
|
+
from matplotlib.font_manager import FontProperties
|
|
6
|
+
from matplotlib.patches import Rectangle
|
|
7
|
+
from matplotlib.pyplot import (clf, draw, figure, gca, gcf, ioff,
|
|
8
|
+
legend, plot, savefig, scatter, show,
|
|
9
|
+
subplot, title, xlabel, ylabel, ylim)
|
|
10
|
+
from matplotlib.ticker import (Formatter, Locator, NullFormatter,
|
|
11
|
+
NullLocator)
|
|
12
|
+
import numexpr
|
|
13
|
+
import numpy as np, numpy as npy, numpy
|
|
14
|
+
from numpy import (Inf, NAN, NaN, abs as aabs, absolute,
|
|
15
|
+
add, all as aall, allclose, alltrue,
|
|
16
|
+
amax, amin, angle, any as aany,
|
|
17
|
+
append as aappend, apply_along_axis,
|
|
18
|
+
apply_over_axes, arange, arccos,
|
|
19
|
+
arccosh, arcsin, arcsinh, arctan,
|
|
20
|
+
arctan2, arctanh, argmax, argmin,
|
|
21
|
+
argsort, argwhere, around, array,
|
|
22
|
+
array2string, array_equal, array_equiv,
|
|
23
|
+
array_repr, array_split, array_str,
|
|
24
|
+
asanyarray, asarray, asarray_chkfinite,
|
|
25
|
+
ascontiguousarray, asfarray,
|
|
26
|
+
asfortranarray, asmatrix, asscalar,
|
|
27
|
+
atleast_1d, atleast_2d, atleast_3d,
|
|
28
|
+
average, bartlett, base_repr,
|
|
29
|
+
binary_repr, bincount, bitwise_and,
|
|
30
|
+
bitwise_not, bitwise_or, bitwise_xor,
|
|
31
|
+
blackman, bmat, bool8, bool_,
|
|
32
|
+
broadcast, broadcast_arrays, byte,
|
|
33
|
+
byte_bounds, c_, can_cast, cdouble,
|
|
34
|
+
ceil, cfloat, character, chararray,
|
|
35
|
+
choose, clip, clongdouble, clongfloat,
|
|
36
|
+
column_stack, common_type,
|
|
37
|
+
compare_chararrays, compat, complex128,
|
|
38
|
+
complex64, complex_, complexfloating,
|
|
39
|
+
concatenate, conj, conjugate, convolve,
|
|
40
|
+
copy, copysign, corrcoef, correlate,
|
|
41
|
+
cos, cosh, cov, cross, csingle,
|
|
42
|
+
ctypeslib, cumprod, cumproduct, cumsum,
|
|
43
|
+
deg2rad, degrees, diag, diag_indices,
|
|
44
|
+
diag_indices_from, diagflat, diagonal,
|
|
45
|
+
diff, digitize, disp, divide, dot,
|
|
46
|
+
double, dsplit, dstack, dtype, ediff1d,
|
|
47
|
+
einsum, emath, empty, empty_like,
|
|
48
|
+
equal, exp, exp2, expand_dims, expm1,
|
|
49
|
+
extract, eye, fabs,
|
|
50
|
+
fastCopyAndTranspose, fill_diagonal,
|
|
51
|
+
find_common_type, fix, flatiter,
|
|
52
|
+
flatnonzero, fliplr, flipud, float32,
|
|
53
|
+
float64, float_, floating, floor,
|
|
54
|
+
floor_divide, fmax, fmin, fmod, frexp,
|
|
55
|
+
frombuffer, fromfile, fromfunction,
|
|
56
|
+
fromiter, frompyfunc, fromregex,
|
|
57
|
+
fromstring, gradient, greater,
|
|
58
|
+
greater_equal, hamming, hanning,
|
|
59
|
+
heaviside, histogram, histogram2d,
|
|
60
|
+
histogramdd, hsplit, hstack, hypot,
|
|
61
|
+
i0, identity, iinfo, imag, in1d,
|
|
62
|
+
index_exp, indices, inexact, inf,
|
|
63
|
+
inner, int0, int16, int32, int64,
|
|
64
|
+
int8, int_, intc, integer, interp,
|
|
65
|
+
intersect1d, intp, invert, ipmt, irr,
|
|
66
|
+
iscomplex, iscomplexobj, isfinite,
|
|
67
|
+
isfortran, isinf, isnan, isneginf,
|
|
68
|
+
isposinf, isreal, isrealobj, isscalar,
|
|
69
|
+
issctype, issubclass_, issubdtype,
|
|
70
|
+
issubsctype, iterable, ix_, kaiser,
|
|
71
|
+
kron, ldexp, left_shift, less,
|
|
72
|
+
less_equal, lexsort, linalg, linspace,
|
|
73
|
+
little_endian, loadtxt, log,
|
|
74
|
+
log as logarithm, log10, log1p, log2,
|
|
75
|
+
logaddexp, logaddexp2, logical_and,
|
|
76
|
+
logical_not, logical_or, logical_xor,
|
|
77
|
+
logspace, longcomplex, longdouble,
|
|
78
|
+
longfloat, longlong, mafromtxt,
|
|
79
|
+
mask_indices, mat, matrix, maximum,
|
|
80
|
+
mean, median, memmap, meshgrid, mgrid,
|
|
81
|
+
minimum, mintypecode, mirr, mod, modf,
|
|
82
|
+
msort, multiply, nan, nan_to_num,
|
|
83
|
+
nanargmax, nanargmin, nanmax, nanmin,
|
|
84
|
+
nansum, nbytes, ndarray, ndenumerate,
|
|
85
|
+
ndim, ndindex, negative, newaxis,
|
|
86
|
+
newbuffer, nextafter, nonzero,
|
|
87
|
+
not_equal, nper, npv, number, object0,
|
|
88
|
+
object_, ogrid, ones, ones_like,
|
|
89
|
+
outer, packbits, pi, piecewise,
|
|
90
|
+
pkgload, place, pmt, poly, poly1d,
|
|
91
|
+
polyadd, polyder, polydiv, polyfit,
|
|
92
|
+
polyint, polymul, polynomial, polysub,
|
|
93
|
+
polyval, power, ppmt, prod, product,
|
|
94
|
+
ptp, putmask, pv, r_, rad2deg,
|
|
95
|
+
radians, rank, rate, ravel, real,
|
|
96
|
+
real_if_close, recarray, recfromcsv,
|
|
97
|
+
recfromtxt, reciprocal, record,
|
|
98
|
+
remainder, repeat, reshape, resize,
|
|
99
|
+
restoredot, right_shift, rint, roll,
|
|
100
|
+
rollaxis, roots, rot90, round, round_,
|
|
101
|
+
row_stack, s_, searchsorted,
|
|
102
|
+
select as aselect, setbufsize,
|
|
103
|
+
setdiff1d, setxor1d, shape, short,
|
|
104
|
+
show_config, sign, signbit,
|
|
105
|
+
signedinteger, sin, sinc, single,
|
|
106
|
+
singlecomplex, sinh, size as asize,
|
|
107
|
+
sometrue, sort as asort, sort,
|
|
108
|
+
sort_complex, spacing, split, sqrt,
|
|
109
|
+
square, squeeze, std, str_, string0,
|
|
110
|
+
string_, subtract, sum, swapaxes, take,
|
|
111
|
+
tan, tanh, tensordot, testing, tile,
|
|
112
|
+
trace, transpose, trapz, tri, tril,
|
|
113
|
+
tril_indices, tril_indices_from,
|
|
114
|
+
trim_zeros, triu, triu_indices,
|
|
115
|
+
triu_indices_from, true_divide, trunc,
|
|
116
|
+
ubyte, ufunc, uint, uint0, uint16,
|
|
117
|
+
uint32, uint64, uint8, uintc, uintp,
|
|
118
|
+
ulonglong, unicode0, unicode_, union1d,
|
|
119
|
+
unique, unpackbits, unravel_index,
|
|
120
|
+
unsignedinteger, unwrap, ushort,
|
|
121
|
+
vander, var, vdot, vectorize, void,
|
|
122
|
+
void0, vsplit, vstack, where, zeros,
|
|
123
|
+
zeros_like)
|
|
124
|
+
from numpy.core.umath_tests import inner1d
|
|
125
|
+
from numpy.fft import (fft, fft2, fftn, ifft, ifft2, ifftn,
|
|
126
|
+
irfft, irfft2, irfftn, rfft, rfft2,
|
|
127
|
+
rfftn)
|
|
128
|
+
from numpy.lib import recfunctions as recf, recfunctions
|
|
129
|
+
from numpy.lib.stride_tricks import as_strided
|
|
130
|
+
import numpy.linalg
|
|
131
|
+
from numpy.linalg import cholesky, det, eigh, inv, pinv, svd
|
|
132
|
+
from numpy.random import (normal, rand, randint, randn,
|
|
133
|
+
random as arandom, shuffle)
|
|
134
|
+
import numpy.testing
|
|
135
|
+
import numpy.version
|
|
136
|
+
import pandas, pandas as pd
|
|
137
|
+
from pandas import DataFrame, Series, TimeSeries
|
|
138
|
+
import pylab as pl, pylab
|
|
139
|
+
import scipy
|
|
140
|
+
from scipy import integrate, optimize, special, stats
|
|
141
|
+
import scipy.cluster.hierarchy
|
|
142
|
+
import scipy.integrate
|
|
143
|
+
import scipy.interpolate
|
|
144
|
+
from scipy.interpolate import InterpolatedUnivariateSpline, interp1d
|
|
145
|
+
import scipy.linalg
|
|
146
|
+
import scipy.optimize
|
|
147
|
+
from scipy.optimize import (curve_fit, fmin_l_bfgs_b, fsolve,
|
|
148
|
+
leastsq)
|
|
149
|
+
from scipy.optimize.zeros import bisect
|
|
150
|
+
import scipy.special
|
|
151
|
+
from scipy.special import gamma, gammainc, gammaincinv, ndtri
|
|
152
|
+
import scipy.stats
|
|
153
|
+
from scipy.stats import (chisqprob, distributions,
|
|
154
|
+
scoreatpercentile, uniform)
|
|
155
|
+
from scipy.stats.distributions \
|
|
156
|
+
import norm
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import UserDict
|
|
2
|
+
from UserDict import DictMixin
|
|
3
|
+
from UserList import UserList
|
|
4
|
+
from _strptime import TimeRE
|
|
5
|
+
import abc
|
|
6
|
+
import argparse
|
|
7
|
+
import ast
|
|
8
|
+
import atexit
|
|
9
|
+
import base64
|
|
10
|
+
from base64 import b64decode, b64encode
|
|
11
|
+
import binascii
|
|
12
|
+
from binascii import hexlify, unhexlify
|
|
13
|
+
import bisect
|
|
14
|
+
import bootstrap
|
|
15
|
+
import bz2
|
|
16
|
+
import cProfile
|
|
17
|
+
import cgi
|
|
18
|
+
import collections
|
|
19
|
+
from collections import defaultdict, deque, namedtuple
|
|
20
|
+
import collections.abc
|
|
21
|
+
from collections.abc import Collection, Iterable, Iterator, Sequence
|
|
22
|
+
import commands
|
|
23
|
+
import contextlib
|
|
24
|
+
from contextlib import closing, contextmanager, nested
|
|
25
|
+
import copy
|
|
26
|
+
import csv
|
|
27
|
+
import ctypes
|
|
28
|
+
from ctypes import CDLL
|
|
29
|
+
import datetime
|
|
30
|
+
import decimal
|
|
31
|
+
from decimal import Decimal
|
|
32
|
+
import decorator
|
|
33
|
+
import difflib
|
|
34
|
+
from difflib import SequenceMatcher, context_diff
|
|
35
|
+
import dis
|
|
36
|
+
import email
|
|
37
|
+
from email import encoders
|
|
38
|
+
from email.encoders import encode_base64
|
|
39
|
+
from email.message import Message
|
|
40
|
+
from email.mime.audio import MIMEAudio
|
|
41
|
+
from email.utils import COMMASPACE, formatdate
|
|
42
|
+
import errno
|
|
43
|
+
from errno import (E2BIG, EACCES, EADDRINUSE,
|
|
44
|
+
EADDRNOTAVAIL, EAFNOSUPPORT, EAGAIN,
|
|
45
|
+
EALREADY, EBADF, EBADMSG, EBUSY,
|
|
46
|
+
ECHILD, ECONNABORTED, ECONNREFUSED,
|
|
47
|
+
ECONNRESET, EDEADLK, EDESTADDRREQ,
|
|
48
|
+
EDOM, EDQUOT, EEXIST, EFAULT, EFBIG,
|
|
49
|
+
EHOSTDOWN, EHOSTUNREACH, EIDRM, EILSEQ,
|
|
50
|
+
EINPROGRESS, EINTR, EINVAL, EIO,
|
|
51
|
+
EISCONN, EISDIR, ELOOP, EMFILE, EMLINK,
|
|
52
|
+
EMSGSIZE, EMULTIHOP, ENAMETOOLONG,
|
|
53
|
+
ENETDOWN, ENETRESET, ENETUNREACH,
|
|
54
|
+
ENFILE, ENOBUFS, ENODATA, ENODEV,
|
|
55
|
+
ENOENT, ENOEXEC, ENOLCK, ENOLINK,
|
|
56
|
+
ENOMEM, ENOMSG, ENOPROTOOPT, ENOSPC,
|
|
57
|
+
ENOSR, ENOSTR, ENOSYS, ENOTBLK,
|
|
58
|
+
ENOTCONN, ENOTDIR, ENOTEMPTY, ENOTSOCK,
|
|
59
|
+
ENOTSUP, ENOTTY, ENXIO, EOPNOTSUPP,
|
|
60
|
+
EOVERFLOW, EPERM, EPFNOSUPPORT, EPIPE,
|
|
61
|
+
EPROTO, EPROTONOSUPPORT, EPROTOTYPE,
|
|
62
|
+
ERANGE, EREMOTE, EROFS, ESHUTDOWN,
|
|
63
|
+
ESOCKTNOSUPPORT, ESPIPE, ESRCH, ESTALE,
|
|
64
|
+
ETIME, ETIMEDOUT, ETOOMANYREFS,
|
|
65
|
+
ETXTBSY, EUSERS, EWOULDBLOCK, EXDEV)
|
|
66
|
+
import exceptions
|
|
67
|
+
import fcntl
|
|
68
|
+
import filecmp
|
|
69
|
+
import fileinput
|
|
70
|
+
import functional
|
|
71
|
+
import functools
|
|
72
|
+
from functools import (partial, reduce, total_ordering,
|
|
73
|
+
update_wrapper, wraps)
|
|
74
|
+
import gc
|
|
75
|
+
import getpass
|
|
76
|
+
from getpass import getuser
|
|
77
|
+
import glob
|
|
78
|
+
import grp
|
|
79
|
+
from grp import getgrall, getgrgid, getgrnam
|
|
80
|
+
import gzip
|
|
81
|
+
import h5py
|
|
82
|
+
import hashlib
|
|
83
|
+
from hashlib import (md5, sha1, sha224, sha256, sha384,
|
|
84
|
+
sha512)
|
|
85
|
+
import heapq
|
|
86
|
+
import imp
|
|
87
|
+
import inspect
|
|
88
|
+
from inspect import ArgSpec, getargspec
|
|
89
|
+
import io
|
|
90
|
+
import itertools
|
|
91
|
+
from itertools import (chain, count, groupby, islice, product,
|
|
92
|
+
repeat, tee)
|
|
93
|
+
import json
|
|
94
|
+
from keyword import iskeyword
|
|
95
|
+
import linecache
|
|
96
|
+
import locale
|
|
97
|
+
import logging
|
|
98
|
+
from lxml import etree
|
|
99
|
+
import marshal
|
|
100
|
+
import math
|
|
101
|
+
import matplotlib
|
|
102
|
+
import mimetypes
|
|
103
|
+
import misc.double
|
|
104
|
+
import mmap
|
|
105
|
+
import new
|
|
106
|
+
import numbers
|
|
107
|
+
from numbers import (Complex, Integral, Number, Rational,
|
|
108
|
+
Real)
|
|
109
|
+
import operator
|
|
110
|
+
from operator import add, indexOf, itemgetter, mul
|
|
111
|
+
import optparse
|
|
112
|
+
from optparse import (BadOptionError, OptParseError,
|
|
113
|
+
OptionParser, OptionValueError)
|
|
114
|
+
import os
|
|
115
|
+
from os import (chmod, close, getcwd, getenv, geteuid,
|
|
116
|
+
getpid, getuid, makedirs, mkdir,
|
|
117
|
+
mkfifo, path, remove, rename, system,
|
|
118
|
+
unlink)
|
|
119
|
+
import os.path
|
|
120
|
+
from os.path import (abspath, basename, dirname, exists,
|
|
121
|
+
getsize, isfile, normpath, realpath)
|
|
122
|
+
import parser
|
|
123
|
+
import pdb
|
|
124
|
+
import pickle
|
|
125
|
+
from pickle import PickleError, UnpicklingError
|
|
126
|
+
import pickletools
|
|
127
|
+
import pkg_resources
|
|
128
|
+
from pkg_resources import load_entry_point
|
|
129
|
+
import pkgutil
|
|
130
|
+
import pprint
|
|
131
|
+
import psutil
|
|
132
|
+
import pwd
|
|
133
|
+
from pwd import getpwall, getpwnam, getpwuid
|
|
134
|
+
import random
|
|
135
|
+
from random import shuffle
|
|
136
|
+
import re
|
|
137
|
+
import resource
|
|
138
|
+
import select
|
|
139
|
+
import shlex
|
|
140
|
+
import shutil
|
|
141
|
+
from shutil import (copyfile, copyfileobj, copystat,
|
|
142
|
+
copytree, rmtree)
|
|
143
|
+
import signal
|
|
144
|
+
import six
|
|
145
|
+
from io import StringIO
|
|
146
|
+
from six.moves import (builtins, cPickle, configparser,
|
|
147
|
+
copyreg, email_mime_base,
|
|
148
|
+
email_mime_image, email_mime_multipart,
|
|
149
|
+
email_mime_text, http_client, map,
|
|
150
|
+
queue, zip)
|
|
151
|
+
from urllib.parse import urlencode
|
|
152
|
+
from six.moves.urllib.request import urlopen
|
|
153
|
+
import smtplib
|
|
154
|
+
from smtplib import (SMTP, SMTPAuthenticationError,
|
|
155
|
+
SMTPConnectError, SMTPDataError,
|
|
156
|
+
SMTPException, SMTPHeloError,
|
|
157
|
+
SMTPRecipientsRefused,
|
|
158
|
+
SMTPResponseException,
|
|
159
|
+
SMTPSenderRefused,
|
|
160
|
+
SMTPServerDisconnected, SMTP_SSL)
|
|
161
|
+
import socket
|
|
162
|
+
from socket import (AF_APPLETALK, AF_ASH, AF_ATMPVC,
|
|
163
|
+
AF_ATMSVC, AF_AX25, AF_BRIDGE,
|
|
164
|
+
AF_DECnet, AF_ECONET, AF_INET,
|
|
165
|
+
AF_INET6, AF_IPX, AF_IRDA, AF_KEY,
|
|
166
|
+
AF_LLC, AF_NETBEUI, AF_NETLINK,
|
|
167
|
+
AF_NETROM, AF_PACKET, AF_PPPOX,
|
|
168
|
+
AF_ROSE, AF_ROUTE, AF_SECURITY, AF_SNA,
|
|
169
|
+
AF_TIPC, AF_UNIX, AF_UNSPEC,
|
|
170
|
+
AF_WANPIPE, AF_X25, AI_ADDRCONFIG,
|
|
171
|
+
AI_ALL, AI_CANONNAME, AI_NUMERICHOST,
|
|
172
|
+
AI_NUMERICSERV, AI_PASSIVE,
|
|
173
|
+
AI_V4MAPPED, CAPI, EAI_ADDRFAMILY,
|
|
174
|
+
EAI_AGAIN, EAI_BADFLAGS, EAI_FAIL,
|
|
175
|
+
EAI_FAMILY, EAI_MEMORY, EAI_NODATA,
|
|
176
|
+
EAI_NONAME, EAI_OVERFLOW, EAI_SERVICE,
|
|
177
|
+
EAI_SOCKTYPE, EAI_SYSTEM,
|
|
178
|
+
INADDR_ALLHOSTS_GROUP, INADDR_ANY,
|
|
179
|
+
INADDR_BROADCAST, INADDR_LOOPBACK,
|
|
180
|
+
INADDR_MAX_LOCAL_GROUP, INADDR_NONE,
|
|
181
|
+
INADDR_UNSPEC_GROUP, IPPORT_RESERVED,
|
|
182
|
+
IPPORT_USERRESERVED, IPPROTO_AH,
|
|
183
|
+
IPPROTO_DSTOPTS, IPPROTO_EGP,
|
|
184
|
+
IPPROTO_ESP, IPPROTO_FRAGMENT,
|
|
185
|
+
IPPROTO_GRE, IPPROTO_HOPOPTS,
|
|
186
|
+
IPPROTO_ICMP, IPPROTO_ICMPV6,
|
|
187
|
+
IPPROTO_IDP, IPPROTO_IGMP, IPPROTO_IP,
|
|
188
|
+
IPPROTO_IPIP, IPPROTO_IPV6,
|
|
189
|
+
IPPROTO_NONE, IPPROTO_PIM, IPPROTO_PUP,
|
|
190
|
+
IPPROTO_RAW, IPPROTO_ROUTING,
|
|
191
|
+
IPPROTO_RSVP, IPPROTO_TCP, IPPROTO_TP,
|
|
192
|
+
IPPROTO_UDP, IPV6_CHECKSUM,
|
|
193
|
+
IPV6_DSTOPTS, IPV6_HOPLIMIT,
|
|
194
|
+
IPV6_HOPOPTS, IPV6_JOIN_GROUP,
|
|
195
|
+
IPV6_LEAVE_GROUP, IPV6_MULTICAST_HOPS,
|
|
196
|
+
IPV6_MULTICAST_IF, IPV6_MULTICAST_LOOP,
|
|
197
|
+
IPV6_NEXTHOP, IPV6_PKTINFO,
|
|
198
|
+
IPV6_RECVDSTOPTS, IPV6_RECVHOPLIMIT,
|
|
199
|
+
IPV6_RECVHOPOPTS, IPV6_RECVPKTINFO,
|
|
200
|
+
IPV6_RECVRTHDR, IPV6_RECVTCLASS,
|
|
201
|
+
IPV6_RTHDR, IPV6_RTHDRDSTOPTS,
|
|
202
|
+
IPV6_RTHDR_TYPE_0, IPV6_TCLASS,
|
|
203
|
+
IPV6_UNICAST_HOPS, IPV6_V6ONLY,
|
|
204
|
+
IP_ADD_MEMBERSHIP,
|
|
205
|
+
IP_DEFAULT_MULTICAST_LOOP,
|
|
206
|
+
IP_DEFAULT_MULTICAST_TTL,
|
|
207
|
+
IP_DROP_MEMBERSHIP, IP_HDRINCL,
|
|
208
|
+
IP_MAX_MEMBERSHIPS, IP_MULTICAST_IF,
|
|
209
|
+
IP_MULTICAST_LOOP, IP_MULTICAST_TTL,
|
|
210
|
+
IP_OPTIONS, IP_RECVOPTS,
|
|
211
|
+
IP_RECVRETOPTS, IP_RETOPTS, IP_TOS,
|
|
212
|
+
IP_TTL, MSG_CTRUNC, MSG_DONTROUTE,
|
|
213
|
+
MSG_DONTWAIT, MSG_EOR, MSG_OOB,
|
|
214
|
+
MSG_PEEK, MSG_TRUNC, MSG_WAITALL,
|
|
215
|
+
NETLINK_DNRTMSG, NETLINK_FIREWALL,
|
|
216
|
+
NETLINK_IP6_FW, NETLINK_NFLOG,
|
|
217
|
+
NETLINK_ROUTE, NETLINK_USERSOCK,
|
|
218
|
+
NETLINK_XFRM, NI_DGRAM, NI_MAXHOST,
|
|
219
|
+
NI_MAXSERV, NI_NAMEREQD, NI_NOFQDN,
|
|
220
|
+
NI_NUMERICHOST, NI_NUMERICSERV,
|
|
221
|
+
PACKET_BROADCAST, PACKET_FASTROUTE,
|
|
222
|
+
PACKET_HOST, PACKET_LOOPBACK,
|
|
223
|
+
PACKET_MULTICAST, PACKET_OTHERHOST,
|
|
224
|
+
PACKET_OUTGOING, PF_PACKET, SHUT_RD,
|
|
225
|
+
SHUT_RDWR, SHUT_WR, SOCK_DGRAM,
|
|
226
|
+
SOCK_RAW, SOCK_RDM, SOCK_SEQPACKET,
|
|
227
|
+
SOCK_STREAM, SOL_IP, SOL_SOCKET,
|
|
228
|
+
SOL_TCP, SOL_TIPC, SOL_UDP, SOMAXCONN,
|
|
229
|
+
SO_ACCEPTCONN, SO_ATTACH_FILTER,
|
|
230
|
+
SO_BINDTODEVICE, SO_BROADCAST,
|
|
231
|
+
SO_BSDCOMPAT, SO_DEBUG,
|
|
232
|
+
SO_DETACH_FILTER, SO_DONTROUTE,
|
|
233
|
+
SO_ERROR, SO_KEEPALIVE, SO_LINGER,
|
|
234
|
+
SO_NO_CHECK, SO_OOBINLINE, SO_PASSCRED,
|
|
235
|
+
SO_PASSSEC, SO_PEERCRED, SO_PEERNAME,
|
|
236
|
+
SO_PEERSEC, SO_PRIORITY, SO_RCVBUF,
|
|
237
|
+
SO_RCVBUFFORCE, SO_RCVLOWAT,
|
|
238
|
+
SO_RCVTIMEO, SO_REUSEADDR,
|
|
239
|
+
SO_SECURITY_AUTHENTICATION,
|
|
240
|
+
SO_SECURITY_ENCRYPTION_NETWORK,
|
|
241
|
+
SO_SECURITY_ENCRYPTION_TRANSPORT,
|
|
242
|
+
SO_SNDBUF, SO_SNDBUFFORCE, SO_SNDLOWAT,
|
|
243
|
+
SO_SNDTIMEO, SO_TIMESTAMP,
|
|
244
|
+
SO_TIMESTAMPNS, SO_TYPE, SocketType,
|
|
245
|
+
TCP_CONGESTION, TCP_CORK,
|
|
246
|
+
TCP_DEFER_ACCEPT, TCP_INFO,
|
|
247
|
+
TCP_KEEPCNT, TCP_KEEPIDLE,
|
|
248
|
+
TCP_KEEPINTVL, TCP_LINGER2, TCP_MAXSEG,
|
|
249
|
+
TCP_MD5SIG, TCP_MD5SIG_MAXKEYLEN,
|
|
250
|
+
TCP_NODELAY, TCP_QUICKACK, TCP_SYNCNT,
|
|
251
|
+
TCP_WINDOW_CLAMP, TIPC_ADDR_ID,
|
|
252
|
+
TIPC_ADDR_NAME, TIPC_ADDR_NAMESEQ,
|
|
253
|
+
TIPC_CFG_SRV, TIPC_CLUSTER_SCOPE,
|
|
254
|
+
TIPC_CONN_TIMEOUT,
|
|
255
|
+
TIPC_CRITICAL_IMPORTANCE,
|
|
256
|
+
TIPC_DEST_DROPPABLE,
|
|
257
|
+
TIPC_HIGH_IMPORTANCE, TIPC_IMPORTANCE,
|
|
258
|
+
TIPC_LOW_IMPORTANCE,
|
|
259
|
+
TIPC_MEDIUM_IMPORTANCE,
|
|
260
|
+
TIPC_NODE_SCOPE, TIPC_PUBLISHED,
|
|
261
|
+
TIPC_SRC_DROPPABLE,
|
|
262
|
+
TIPC_SUBSCR_TIMEOUT, TIPC_SUB_CANCEL,
|
|
263
|
+
TIPC_SUB_PORTS, TIPC_SUB_SERVICE,
|
|
264
|
+
TIPC_TOP_SRV, TIPC_WAIT_FOREVER,
|
|
265
|
+
TIPC_WITHDRAWN, TIPC_ZONE_SCOPE,
|
|
266
|
+
gaierror, getaddrinfo, getfqdn,
|
|
267
|
+
gethostbyaddr, gethostbyname,
|
|
268
|
+
gethostbyname_ex, gethostname,
|
|
269
|
+
getnameinfo, getprotobyname,
|
|
270
|
+
getservbyname, getservbyport, htonl,
|
|
271
|
+
htons, inet_aton, inet_ntoa, inet_ntop,
|
|
272
|
+
inet_pton, ntohl, ntohs,
|
|
273
|
+
setdefaulttimeout, socketpair)
|
|
274
|
+
import sqlite3
|
|
275
|
+
import ssl
|
|
276
|
+
import stat
|
|
277
|
+
from stat import (ST_MTIME, S_IFMT, S_IMODE, S_ISBLK,
|
|
278
|
+
S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK,
|
|
279
|
+
S_ISREG, S_ISSOCK)
|
|
280
|
+
import string
|
|
281
|
+
import struct
|
|
282
|
+
import subprocess
|
|
283
|
+
from subprocess import (CalledProcessError, PIPE, Popen, call,
|
|
284
|
+
check_call)
|
|
285
|
+
import symbol
|
|
286
|
+
import sys
|
|
287
|
+
from sys import exit, getsizeof, stderr, stdout
|
|
288
|
+
import tempfile
|
|
289
|
+
from tempfile import (NamedTemporaryFile,
|
|
290
|
+
SpooledTemporaryFile, TemporaryFile,
|
|
291
|
+
mkdtemp, mkstemp, mktemp)
|
|
292
|
+
import termios
|
|
293
|
+
import textwrap
|
|
294
|
+
from textwrap import dedent
|
|
295
|
+
import threading
|
|
296
|
+
from threading import (BoundedSemaphore, Condition, Lock,
|
|
297
|
+
RLock, Semaphore, Thread, Timer,
|
|
298
|
+
currentThread, current_thread)
|
|
299
|
+
import time
|
|
300
|
+
from time import (asctime, ctime, gmtime, localtime,
|
|
301
|
+
mktime, sleep, strftime, strptime)
|
|
302
|
+
import timeit
|
|
303
|
+
import token
|
|
304
|
+
import traceback
|
|
305
|
+
import types
|
|
306
|
+
from types import (BooleanType, BufferType,
|
|
307
|
+
BuiltinFunctionType, BuiltinMethodType,
|
|
308
|
+
ClassType, CodeType, ComplexType,
|
|
309
|
+
DictProxyType, DictType,
|
|
310
|
+
DictionaryType, EllipsisType, FileType,
|
|
311
|
+
FloatType, FrameType, FunctionType,
|
|
312
|
+
GeneratorType, GetSetDescriptorType,
|
|
313
|
+
InstanceType, IntType, LambdaType,
|
|
314
|
+
ListType, LongType,
|
|
315
|
+
MemberDescriptorType, MethodType,
|
|
316
|
+
ModuleType, NoneType,
|
|
317
|
+
NotImplementedType, ObjectType,
|
|
318
|
+
SliceType, StringType, StringTypes,
|
|
319
|
+
TracebackType, TupleType, TypeType,
|
|
320
|
+
UnboundMethodType, UnicodeType,
|
|
321
|
+
XRangeType)
|
|
322
|
+
import typing
|
|
323
|
+
from typing import NamedTuple, Optional, Protocol
|
|
324
|
+
import unittest
|
|
325
|
+
import urllib
|
|
326
|
+
import urllib2
|
|
327
|
+
import warnings
|
|
328
|
+
import weakref
|
|
329
|
+
from weakref import (CallableProxyType, ProxyType,
|
|
330
|
+
ProxyTypes, ReferenceType,
|
|
331
|
+
WeakKeyDictionary, WeakValueDictionary,
|
|
332
|
+
getweakrefcount, getweakrefs)
|
|
333
|
+
from xml.dom import minidom
|
|
334
|
+
import xml.parsers.expat
|
|
335
|
+
import zlib
|
pyflyby/importdb.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# pyflyby/importdb.py.
|
|
2
|
+
# Copyright (C) 2011, 2012, 2013, 2014 Karl Chen.
|
|
3
|
+
# License: MIT http://opensource.org/licenses/MIT
|
|
4
|
+
|
|
5
|
+
# Deprecated stub for backwards compatibility.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
from pyflyby._importdb import ImportDB
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def global_known_imports():
|
|
13
|
+
# Deprecated stub for backwards compatibility.
|
|
14
|
+
return ImportDB.get_default(".").known_imports
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def global_mandatory_imports():
|
|
18
|
+
# Deprecated stub for backwards compatibility.
|
|
19
|
+
return ImportDB.get_default(".").mandatory_imports
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env -S bash -e
|
|
2
|
+
|
|
3
|
+
# License for THIS FILE ONLY: CC0 Public Domain Dedication
|
|
4
|
+
# http://creativecommons.org/publicdomain/zero/1.0/
|
|
5
|
+
|
|
6
|
+
# Get the directory containing to the symlink target of the script.
|
|
7
|
+
if script=$(readlink -e "$0" 2>/dev/null) && [[ "$script" -ef "$0" ]]; then
|
|
8
|
+
scriptdir=$(dirname "$script")
|
|
9
|
+
elif script=$(realpath "$0" 2>/dev/null) && [[ "$script" -ef "$0" ]]; then
|
|
10
|
+
scriptdir=$(dirname "$script")
|
|
11
|
+
elif script=$(greadlink -e "$0" 2>/dev/null) && [[ "$script" -ef "$0" ]]; then
|
|
12
|
+
scriptdir=$(dirname "$script")
|
|
13
|
+
else
|
|
14
|
+
scriptdir=$(
|
|
15
|
+
d=$(dirname "$0")
|
|
16
|
+
b=$(basename "$0")
|
|
17
|
+
cd "$d"
|
|
18
|
+
if l=$(readlink "$b"); then
|
|
19
|
+
ld=$(dirname "$l")
|
|
20
|
+
cd "$ld"
|
|
21
|
+
fi
|
|
22
|
+
pwd
|
|
23
|
+
)
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
libexecdir="$scriptdir/../libexec/pyflyby"
|
|
27
|
+
|
|
28
|
+
PATH="$scriptdir:$libexecdir:$PATH"
|
|
29
|
+
|
|
30
|
+
if [[ -t 1 ]] && type -p diff-colorize >/dev/null; then
|
|
31
|
+
diff -u "$@" | diff-colorize
|
|
32
|
+
else
|
|
33
|
+
diff -u "$@"
|
|
34
|
+
fi
|