Merge pull request #4448 from vijaydasmp/backport_v18_vijay_batch4_2

Merge (Partial) bitcoin#14822,  bitcoin#14903, bitcoin#12246, bitcoin#14008
This commit is contained in:
UdjinM6 2021-10-10 21:48:29 +03:00 committed by GitHub
commit e81e1a570f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 99 additions and 57 deletions

View File

@ -531,6 +531,18 @@ AC_ARG_WITH([utils],
[build_bitcoin_utils=$withval],
[build_bitcoin_utils=yes])
AC_ARG_ENABLE([util-cli],
[AS_HELP_STRING([--enable-util-cli],
[build dash-cli])],
[build_bitcoin_cli=$enableval],
[build_bitcoin_cli=$build_bitcoin_utils])
AC_ARG_ENABLE([util-tx],
[AS_HELP_STRING([--enable-util-tx],
[build dash-tx])],
[build_bitcoin_tx=$enableval],
[build_bitcoin_tx=$build_bitcoin_utils])
AC_ARG_WITH([libs],
[AS_HELP_STRING([--with-libs],
[build libraries (default=yes)])],
@ -1116,7 +1128,7 @@ BITCOIN_QT_INIT
dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus
BITCOIN_QT_CONFIGURE([5.5.1])
if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench = xnonononono; then
if test x$build_bitcoin_cli$build_bitcoin_tx$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench = xnononononono; then
use_boost=no
else
use_boost=yes
@ -1255,7 +1267,7 @@ if test x$use_pkgconfig = xyes; then
if test x$use_qr != xno; then
BITCOIN_QT_CHECK([PKG_CHECK_MODULES([QR], [libqrencode], [have_qrencode=yes], [have_qrencode=no])])
fi
if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests != xnononono; then
if test x$build_bitcoin_cli$build_bitcoin_tx$build_bitcoind$bitcoin_enable_qt$use_tests != xnonononono; then
PKG_CHECK_MODULES([EVENT], [libevent],, [AC_MSG_ERROR(libevent not found.)])
if test x$TARGET_OS != xwindows; then
PKG_CHECK_MODULES([EVENT_PTHREADS], [libevent_pthreads],, [AC_MSG_ERROR(libevent_pthreads not found.)])
@ -1280,7 +1292,7 @@ else
AC_CHECK_HEADER([openssl/ssl.h],, AC_MSG_ERROR(libssl headers missing),)
AC_CHECK_LIB([ssl], [main],SSL_LIBS=-lssl, AC_MSG_ERROR(libssl missing))
if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests != xnononono; then
if test x$build_bitcoin_cli$build_bitcoin_tx$build_bitcoind$bitcoin_enable_qt$use_tests != xnonononono; then
AC_CHECK_HEADER([event2/event.h],, AC_MSG_ERROR(libevent headers missing),)
AC_CHECK_LIB([event],[main],EVENT_LIBS=-levent,AC_MSG_ERROR(libevent missing))
if test x$TARGET_OS != xwindows; then
@ -1338,7 +1350,7 @@ AC_CHECK_LIB([gmp], [__gmpz_init],GMP_LIBS=-lgmp, AC_MSG_ERROR(libgmp missing))
dnl check if immer headers-only library is present
AC_CHECK_HEADER([immer/map.hpp],, AC_MSG_ERROR(immer map headers missing))
if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench = xnonononono; then
if test x$build_bitcoin_cli$build_bitcoin_tx$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench = xnononononono; then
need_bundled_univalue=no
else
@ -1392,9 +1404,13 @@ AC_MSG_CHECKING([whether to build dashd])
AM_CONDITIONAL([BUILD_BITCOIND], [test x$build_bitcoind = xyes])
AC_MSG_RESULT($build_bitcoind)
AC_MSG_CHECKING([whether to build utils (dash-cli dash-tx)])
AM_CONDITIONAL([BUILD_BITCOIN_UTILS], [test x$build_bitcoin_utils = xyes])
AC_MSG_RESULT($build_bitcoin_utils)
AC_MSG_CHECKING([whether to build dash-cli])
AM_CONDITIONAL([BUILD_BITCOIN_CLI], [test x$build_bitcoin_cli = xyes])
AC_MSG_RESULT($build_bitcoin_cli)
AC_MSG_CHECKING([whether to build dash-tx])
AM_CONDITIONAL([BUILD_BITCOIN_TX], [test x$build_bitcoin_tx = xyes])
AC_MSG_RESULT($build_bitcoin_tx)
AC_MSG_CHECKING([whether to build libraries])
AM_CONDITIONAL([BUILD_BITCOIN_LIBS], [test x$build_bitcoin_libs = xyes])
@ -1549,7 +1565,7 @@ else
fi
AC_MSG_RESULT($dsymutil_needs_flat)
if test x$build_bitcoin_utils$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$use_bench$use_tests = xnononononono; then
if test x$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$use_bench$use_tests = xnonononononono; then
AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --with-gui --enable-bench or --enable-tests])
fi

View File

@ -109,7 +109,7 @@ def main():
match = re.search(r'^\+\+\+\ (.*?/){%s}(\S*)' % args.p, line)
if match:
filename = match.group(2)
if filename == None:
if filename is None:
continue
if args.regex is not None:

View File

@ -482,7 +482,7 @@ def get_git_change_year_range(filename):
def file_already_has_core_copyright(file_lines):
index, _ = get_updatable_copyright_line(file_lines)
return index != None
return index is not None
################################################################################
# insert header execution

View File

@ -130,13 +130,13 @@ def escape_cdata(text):
return text
def contains_bitcoin_addr(text, errors):
if text != None and ADDRESS_REGEXP.search(text) != None:
if text is not None and ADDRESS_REGEXP.search(text) is not None:
errors.append('Translation "%s" contains a bitcoin address. This will be removed.' % (text))
return True
return False
def contains_dash_addr(text, errors):
if text != None and ADDRESS_REGEXP_DASH.search(text) != None:
if text is not None and ADDRESS_REGEXP_DASH.search(text) is not None:
errors.append('Translation "%s" contains a Dash address. This will be removed.' % (text))
return True
return False

View File

@ -8,6 +8,10 @@ if ENABLE_QT
dist_man1_MANS+=dash-qt.1
endif
if BUILD_BITCOIN_UTILS
dist_man1_MANS+=dash-cli.1 dash-tx.1
if BUILD_BITCOIN_CLI
dist_man1_MANS+=dash-cli.1
endif
if BUILD_BITCOIN_TX
dist_man1_MANS+=dash-tx.1
endif

View File

@ -106,8 +106,11 @@ if BUILD_BITCOIND
bin_PROGRAMS += dashd
endif
if BUILD_BITCOIN_UTILS
bin_PROGRAMS += dash-cli dash-tx
if BUILD_BITCOIN_CLI
bin_PROGRAMS += dash-cli
endif
if BUILD_BITCOIN_TX
bin_PROGRAMS += dash-tx
endif
.PHONY: FORCE check-symbols check-security

View File

@ -498,8 +498,10 @@ dash_test_clean : FORCE
rm -f $(CLEAN_BITCOIN_TEST) $(test_test_dash_OBJECTS) $(TEST_BINARY)
check-local: $(BITCOIN_TESTS:.cpp=.cpp.test)
if BUILD_BITCOIN_TX
@echo "Running test/util/bitcoin-util-test.py..."
$(PYTHON) $(top_builddir)/test/util/bitcoin-util-test.py
endif
@echo "Running test/util/rpcauth-test.py..."
$(PYTHON) $(top_builddir)/test/util/rpcauth-test.py
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C secp256k1 check

View File

@ -3,25 +3,19 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <bench/bench.h>
#include <wallet/wallet.h>
#include <wallet/coinselection.h>
#include <wallet/wallet.h>
#include <set>
static void addCoin(const CAmount& nValue, const CWallet& wallet, std::vector<OutputGroup>& groups)
static void addCoin(const CAmount& nValue, const CWallet& wallet, std::vector<std::unique_ptr<CWalletTx>>& wtxs)
{
int nInput = 0;
static int nextLockTime = 0;
CMutableTransaction tx;
tx.nLockTime = nextLockTime++; // so all transactions get different hashes
tx.vout.resize(nInput + 1);
tx.vout[nInput].nValue = nValue;
CWalletTx* wtx = new CWalletTx(&wallet, MakeTransactionRef(std::move(tx)));
int nAge = 6 * 24;
COutput output(wtx, nInput, nAge, true /* spendable */, true /* solvable */, true /* safe */);
groups.emplace_back(output.GetInputCoin(), 6, false, 0, 0);
tx.vout.resize(1);
tx.vout[0].nValue = nValue;
wtxs.push_back(MakeUnique<CWalletTx>(&wallet, MakeTransactionRef(std::move(tx))));
}
// Simple benchmark for wallet coin selection. Note that it maybe be necessary
@ -34,14 +28,21 @@ static void addCoin(const CAmount& nValue, const CWallet& wallet, std::vector<Ou
static void CoinSelection(benchmark::Bench& bench)
{
const CWallet wallet(WalletLocation(), WalletDatabase::CreateDummy());
std::vector<std::unique_ptr<CWalletTx>> wtxs;
LOCK(wallet.cs_wallet);
// Add coins.
std::vector<OutputGroup> groups;
for (int i = 0; i < 1000; ++i) {
addCoin(1000 * COIN, wallet, groups);
addCoin(1000 * COIN, wallet, wtxs);
}
addCoin(3 * COIN, wallet, wtxs);
// Create groups
std::vector<OutputGroup> groups;
for (const auto& wtx : wtxs) {
COutput output(wtx.get(), 0 /* iIn */, 6 * 24 /* nDepthIn */, true /* spendable */, true /* solvable */, true /* safe */);
groups.emplace_back(output.GetInputCoin(), 6, false, 0, 0);
}
addCoin(3 * COIN, wallet, groups);
const CoinEligibilityFilter filter_standard(1, 6, 0);
const CoinSelectionParams coin_selection_params(true, 34, 148, CFeeRate(0), 0);
bench.run([&] {

View File

@ -322,8 +322,8 @@ public:
* Note that lightweight clients may not know anything besides the hash of previous transactions,
* so may not be able to calculate this.
*
* @param[in] tx transaction for which we are checking input total
* @return Sum of value of all inputs (scriptSigs)
* @param[in] tx transaction for which we are checking input total
* @return Sum of value of all inputs (scriptSigs)
*/
CAmount GetValueIn(const CTransaction& tx) const;

View File

@ -2570,6 +2570,7 @@ static UniValue getblockfilter(const JSONRPCRequest& request)
return ret;
}
// clang-format off
static const CRPCCommand commands[] =
{ // category name actor (function) argNames
// --------------------- ------------------------ ----------------------- ----------
@ -2611,6 +2612,7 @@ static const CRPCCommand commands[] =
{ "hidden", "waitforblockheight", &waitforblockheight, {"height","timeout"} },
{ "hidden", "syncwithvalidationinterfacequeue", &syncwithvalidationinterfacequeue, {} },
};
// clang-format on
void RegisterBlockchainRPCCommands(CRPCTable &t)
{

View File

@ -19,6 +19,7 @@ public:
std::string paramName; //!< parameter name
};
// clang-format off
/**
* Specify a (method, idx, name) here if the argument is a non-string RPC
* argument and needs to be converted from JSON.
@ -192,6 +193,7 @@ static const CRPCConvertParam vRPCConvertParams[] =
{ "getnodeaddresses", 0, "count"},
{ "stop", 0, "wait" },
};
// clang-format on
class CRPCConvertTable
{

View File

@ -160,7 +160,7 @@ static UniValue getcoinjoininfo(const JSONRPCRequest& request)
return obj;
}
// clang-format off
static const CRPCCommand commands[] =
{ // category name actor (function) argNames
// --------------------- ------------------------ ---------------------------------
@ -170,7 +170,7 @@ static const CRPCCommand commands[] =
{ "dash", "coinjoin", &coinjoin, {} },
#endif // ENABLE_WALLET
};
// clang-format on
void RegisterCoinJoinRPCCommands(CRPCTable &t)
{
for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++)

View File

@ -1162,7 +1162,7 @@ static UniValue getsuperblockbudget(const JSONRPCRequest& request)
return ValueFromAmount(CSuperblock::GetPaymentsLimit(nBlockHeight));
}
// clang-format off
static const CRPCCommand commands[] =
{ // category name actor (function) argNames
// --------------------- ------------------------ ----------------------- ----------
@ -1173,7 +1173,7 @@ static const CRPCCommand commands[] =
{ "dash", "voteraw", &voteraw, {"tx_hash","tx_index","gov_hash","signal","outcome","time","sig"} },
};
// clang-format on
void RegisterGovernanceRPCCommands(CRPCTable &t)
{
for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++)

View File

@ -694,14 +694,14 @@ static UniValue masternodelist(const JSONRPCRequest& request)
return obj;
}
// clang-format off
static const CRPCCommand commands[] =
{ // category name actor (function) argNames
// --------------------- ------------------------ ----------------------- ----------
{ "dash", "masternode", &masternode, {} },
{ "dash", "masternodelist", &masternodelist, {} },
};
// clang-format on
void RegisterMasternodeRPCCommands(CRPCTable &t)
{
for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++)

View File

@ -971,6 +971,7 @@ static UniValue estimaterawfee(const JSONRPCRequest& request)
return result;
}
// clang-format off
static const CRPCCommand commands[] =
{ // category name actor (function) argNames
// --------------------- ------------------------ ----------------------- ----------
@ -991,6 +992,7 @@ static const CRPCCommand commands[] =
{ "hidden", "estimaterawfee", &estimaterawfee, {"conf_target", "threshold"} },
};
// clang-format on
void RegisterMiningRPCCommands(CRPCTable &t)
{

View File

@ -1110,6 +1110,7 @@ static UniValue echo(const JSONRPCRequest& request)
return request.params;
}
// clang-format off
static const CRPCCommand commands[] =
{ // category name actor (function) argNames
// --------------------- ------------------------ ----------------------- ----------
@ -1139,6 +1140,7 @@ static const CRPCCommand commands[] =
{ "hidden", "echojson", &echo, {"arg0","arg1","arg2","arg3","arg4","arg5","arg6","arg7","arg8","arg9"}},
{ "hidden", "mnauth", &mnauth, {"nodeId", "proTxHash", "publicKey"}},
};
// clang-format on
void RegisterMiscRPCCommands(CRPCTable &t)
{

View File

@ -756,6 +756,7 @@ static UniValue getnodeaddresses(const JSONRPCRequest& request)
return ret;
}
// clang-format off
static const CRPCCommand commands[] =
{ // category name actor (function) argNames
// --------------------- ------------------------ ----------------------- ----------
@ -773,6 +774,7 @@ static const CRPCCommand commands[] =
{ "network", "setnetworkactive", &setnetworkactive, {"state"} },
{ "network", "getnodeaddresses", &getnodeaddresses, {"count"} },
};
// clang-format on
void RegisterNetRPCCommands(CRPCTable &t)
{

View File

@ -1641,6 +1641,7 @@ UniValue converttopsbt(const JSONRPCRequest& request)
return EncodeBase64(ssTx.str());
}
// clang-format off
static const CRPCCommand commands[] =
{ // category name actor (function) argNames
// --------------------- ------------------------ ----------------------- ----------
@ -1662,6 +1663,7 @@ static const CRPCCommand commands[] =
{ "blockchain", "gettxoutproof", &gettxoutproof, {"txids", "blockhash"} },
{ "blockchain", "verifytxoutproof", &verifytxoutproof, {"proof"} },
};
// clang-format on
void RegisterRawTransactionRPCCommands(CRPCTable &t)
{

View File

@ -1287,14 +1287,14 @@ static UniValue _bls(const JSONRPCRequest& request)
bls_help();
}
}
// clang-format off
static const CRPCCommand commands[] =
{ // category name actor (function)
// --------------------- ------------------------ -----------------------
{ "evo", "bls", &_bls, {} },
{ "evo", "protx", &protx, {} },
};
// clang-format on
void RegisterEvoRPCCommands(CRPCTable &tableRPC)
{
for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++) {

View File

@ -753,7 +753,7 @@ static UniValue verifyislock(const JSONRPCRequest& request)
return llmq::quorumSigningManager->VerifyRecoveredSig(llmqType, signHeight, id, txid, sig, 0) ||
llmq::quorumSigningManager->VerifyRecoveredSig(llmqType, signHeight, id, txid, sig, signOffset);
}
// clang-format off
static const CRPCCommand commands[] =
{ // category name actor (function)
// --------------------- ------------------------ -----------------------
@ -761,7 +761,7 @@ static const CRPCCommand commands[] =
{ "evo", "verifychainlock", &verifychainlock, {"blockHash", "signature", "blockHeight"} },
{ "evo", "verifyislock", &verifyislock, {"id", "txid", "signature", "maxHeight"} },
};
// clang-format on
void RegisterQuorumsRPCCommands(CRPCTable &tableRPC)
{
for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++)

View File

@ -330,6 +330,7 @@ static UniValue uptime(const JSONRPCRequest& jsonRequest)
return GetTime() - GetStartupTime();
}
// clang-format off
/**
* Call Table
*/
@ -341,6 +342,7 @@ static const CRPCCommand vRPCCommands[] =
{ "control", "stop", &stop, {"wait"} },
{ "control", "uptime", &uptime, {} },
};
// clang-format on
CRPCTable::CRPCTable()
{

View File

@ -4102,6 +4102,7 @@ UniValue walletcreatefundedpsbt(const JSONRPCRequest& request)
return result;
}
// clang-format off
static const CRPCCommand commands[] =
{ // category name actor (function) argNames
// --------------------- ------------------------ ----------------------- ----------
@ -4172,6 +4173,7 @@ static const CRPCCommand commands[] =
{ "wallet", "walletprocesspsbt", &walletprocesspsbt, {"psbt","sign","sighashtype","bip32derivs"} },
{ "wallet", "walletcreatefundedpsbt", &walletcreatefundedpsbt, {"inputs","outputs","locktime","options","bip32derivs"} },
};
// clang-format on
void RegisterWalletRPCCommands(CRPCTable &t)
{

View File

@ -14,7 +14,7 @@ RPCAUTH=@abs_top_srcdir@/share/rpcauth/rpcauth.py
[components]
# Which components are enabled. These are commented out by `configure` if they were disabled when running config.
@ENABLE_WALLET_TRUE@ENABLE_WALLET=true
@BUILD_BITCOIN_UTILS_TRUE@ENABLE_UTILS=true
@BUILD_BITCOIN_CLI_TRUE@ENABLE_CLI=true
@BUILD_BITCOIND_TRUE@ENABLE_BITCOIND=true
@ENABLE_FUZZ_TRUE@ENABLE_FUZZ=true
@ENABLE_ZMQ_TRUE@ENABLE_ZMQ=true

View File

@ -31,13 +31,13 @@ class HTTPBasicsTest (BitcoinTestFramework):
conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
out1 = conn.getresponse().read()
assert b'"error":null' in out1
assert conn.sock!=None #according to http/1.1 connection must still be open!
assert conn.sock is not None #according to http/1.1 connection must still be open!
#send 2nd request without closing connection
conn.request('POST', '/', '{"method": "getchaintips"}', headers)
out1 = conn.getresponse().read()
assert b'"error":null' in out1 #must also response with a correct json-rpc message
assert conn.sock!=None #according to http/1.1 connection must still be open!
assert conn.sock is not None #according to http/1.1 connection must still be open!
conn.close()
#same should be if we add keep-alive because this should be the std. behaviour
@ -48,13 +48,13 @@ class HTTPBasicsTest (BitcoinTestFramework):
conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
out1 = conn.getresponse().read()
assert b'"error":null' in out1
assert conn.sock!=None #according to http/1.1 connection must still be open!
assert conn.sock is not None #according to http/1.1 connection must still be open!
#send 2nd request without closing connection
conn.request('POST', '/', '{"method": "getchaintips"}', headers)
out1 = conn.getresponse().read()
assert b'"error":null' in out1 #must also response with a correct json-rpc message
assert conn.sock!=None #according to http/1.1 connection must still be open!
assert conn.sock is not None #according to http/1.1 connection must still be open!
conn.close()
#now do the same with "Connection: close"
@ -65,7 +65,7 @@ class HTTPBasicsTest (BitcoinTestFramework):
conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
out1 = conn.getresponse().read()
assert b'"error":null' in out1
assert conn.sock==None #now the connection must be closed after the response
assert conn.sock is None #now the connection must be closed after the response
#node1 (2nd node) is running with disabled keep-alive option
urlNode1 = urllib.parse.urlparse(self.nodes[1].url)
@ -88,7 +88,7 @@ class HTTPBasicsTest (BitcoinTestFramework):
conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
out1 = conn.getresponse().read()
assert b'"error":null' in out1
assert conn.sock!=None #connection must be closed because dashd should use keep-alive by default
assert conn.sock is not None #connection must be closed because dashd should use keep-alive by default
# Check excessive request size
conn = http.client.HTTPConnection(urlNode2.hostname, urlNode2.port)

View File

@ -78,7 +78,7 @@ class PrioritiseTransactionTest(BitcoinTestFramework):
high_fee_tx = x
# Something high-fee should have been mined!
assert high_fee_tx != None
assert high_fee_tx is not None
# Add a prioritisation before a tx is in the mempool (de-prioritising a
# high-fee transaction so that it's now low fee).

View File

@ -709,7 +709,7 @@ class HeaderAndShortIDs:
self.shortids = []
self.prefilled_txn = []
if p2pheaders_and_shortids != None:
if p2pheaders_and_shortids is not None:
self.header = p2pheaders_and_shortids.header
self.nonce = p2pheaders_and_shortids.nonce
self.shortids = p2pheaders_and_shortids.shortids
@ -759,7 +759,7 @@ class BlockTransactionsRequest:
def __init__(self, blockhash=0, indexes = None):
self.blockhash = blockhash
self.indexes = indexes if indexes != None else []
self.indexes = indexes if indexes is not None else []
def deserialize(self, f):
self.blockhash = deser_uint256(f)
@ -800,7 +800,7 @@ class BlockTransactions:
def __init__(self, blockhash=0, transactions = None):
self.blockhash = blockhash
self.transactions = transactions if transactions != None else []
self.transactions = transactions if transactions is not None else []
def deserialize(self, f):
self.blockhash = deser_uint256(f)
@ -1299,7 +1299,7 @@ class msg_getdata:
command = b"getdata"
def __init__(self, inv=None):
self.inv = inv if inv != None else []
self.inv = inv if inv is not None else []
def deserialize(self, f):
self.inv = deser_vector(f, CInv)

View File

@ -628,7 +628,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
config = configparser.ConfigParser()
config.read_file(open(self.options.configfile))
return config["components"].getboolean("ENABLE_UTILS")
return config["components"].getboolean("ENABLE_CLI")
def is_wallet_compiled(self):
"""Checks whether the wallet module was compiled."""

View File

@ -79,7 +79,7 @@ class TestNode():
self.binary = bitcoind
self.coverage_dir = coverage_dir
self.mocktime = mocktime
if extra_conf != None:
if extra_conf is not None:
append_config(datadir, extra_conf)
# Most callers will just need to add extra args to the standard list below.
# For those callers that need more flexibity, they can just set the args property directly.

View File

@ -35,7 +35,7 @@ enabled=(
E701 # multiple statements on one line (colon)
E702 # multiple statements on one line (semicolon)
E703 # statement ends with a semicolon
# E711 # comparison to None should be 'if cond is None:'
E711 # comparison to None should be 'if cond is None:'
E714 # test for object identity should be "is not"
E721 # do not compare types, use "isinstance()"
E742 # do not define classes named "l", "O", or "I"