project
stringlengths
1
98
commit_sha
stringlengths
40
40
parent_sha
stringlengths
40
40
file_path
stringlengths
4
209
project_url
stringlengths
23
132
likely_bug
bool
1 class
comodified
bool
1 class
in_function
bool
2 classes
diff
stringlengths
27
9.71k
before
stringlengths
1
8.91k
after
stringlengths
1
6k
sstub_pattern
stringclasses
23 values
edit_script
stringlengths
33
158k
key
stringlengths
45
154
commit_message
stringlengths
3
65.5k
files
list
personal-blog
23663f8bd9e260a9a63ee948d55c2c6462a4e81d
44e3c2b0532c0af5901ec47633a1c96d440d43ea
app/main/__init__.py
https://github.com/Yvonne1995/personal-blog
true
false
false
@@ -1,3 +1,3 @@ from flask import Blueprint main = Blueprint('main', __name__) -from . import views, errors, forms +from . import views, error, forms
from . import views , errors , forms
from . import views , error , forms
CHANGE_IDENTIFIER_USED
[["Update", ["identifier:errors", 2, 22, 2, 28], "error"]]
Yvonne1995/personal-blog@23663f8bd9e260a9a63ee948d55c2c6462a4e81d
null
null
mlcourse_open
361aa80fe41fe8f8bad5bf19964147f7fc9fef64
0990474405a10b3056552fe6e663478af4a4dcc6
run_docker_jupyter.py
https://github.com/Kulikovpavel/mlcourse_open
true
false
true
@@ -7,7 +7,7 @@ def main(): parser.add_argument("--net_host", action='store_true', help='Whether to use --net=host with docker run (for Linux servers)') args = parser.parse_args() - run_command = 'docker run -it {0} --rm -p 5022:22 -p 4545:4545 -v {1}:/notebooks -w /notebooks {2} jupyter'.format( + run_command = 'docker run -it {0} --rm -p 5022:22 -p 4545:4545 -v "{1}":/notebooks -w /notebooks {2} jupyter'.format( '--net=host' if args.net_host else '', os.getcwd(), args.docker_tag) print('Running command\n' + run_command)
run_command = 'docker run -it {0} --rm -p 5022:22 -p 4545:4545 -v {1}:/notebooks -w /notebooks {2} jupyter' . format ( '--net=host' if args . net_host else '' , os . getcwd ( ) , args . docker_tag )
run_command = 'docker run -it {0} --rm -p 5022:22 -p 4545:4545 -v "{1}":/notebooks -w /notebooks {2} jupyter' . format ( '--net=host' if args . net_host else '' , os . getcwd ( ) , args . docker_tag )
CHANGE_STRING_LITERAL
[["Update", ["string:'docker run -it {0} --rm -p 5022:22 -p 4545:4545 -v {1}:/notebooks -w /notebooks {2} jupyter'", 3, 19, 3, 112], "'docker run -it {0} --rm -p 5022:22 -p 4545:4545 -v \"{1}\":/notebooks -w /notebooks {2} jupyter'"]]
Kulikovpavel/mlcourse_open@361aa80fe41fe8f8bad5bf19964147f7fc9fef64
Fixed path with spaces issue
[ { "sha": "f813822a8a9e3059b5148875822b58e325f0346d", "filename": "run_docker_jupyter.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/Kulikovpavel/mlcourse_open/blob/361aa80fe41fe8f8bad5bf19964147f7fc9fef64/run_docker_jupyter.py", "raw_url": "https://github.com/Kulikovpavel/mlcourse_open/raw/361aa80fe41fe8f8bad5bf19964147f7fc9fef64/run_docker_jupyter.py", "contents_url": "https://api.github.com/repos/Kulikovpavel/mlcourse_open/contents/run_docker_jupyter.py?ref=361aa80fe41fe8f8bad5bf19964147f7fc9fef64", "patch": "@@ -7,7 +7,7 @@ def main():\n parser.add_argument(\"--net_host\", action='store_true', help='Whether to use --net=host with docker run (for Linux servers)')\n args = parser.parse_args()\n \n- run_command = 'docker run -it {0} --rm -p 5022:22 -p 4545:4545 -v {1}:/notebooks -w /notebooks {2} jupyter'.format(\n+ run_command = 'docker run -it {0} --rm -p 5022:22 -p 4545:4545 -v \"{1}\":/notebooks -w /notebooks {2} jupyter'.format(\n '--net=host' if args.net_host else '', os.getcwd(), args.docker_tag)\n \n print('Running command\\n' + run_command)" } ]
mlcourse_open
d0ee66b71301e4459901ba47161a2d30f6ed32b4
020d46b10e6da7db09e5949ba6fc32ed0cf8890d
run_docker_jupyter.py
https://github.com/Kulikovpavel/mlcourse_open
true
false
true
@@ -7,7 +7,7 @@ def main(): parser.add_argument("--net_host", action='store_true', help='Whether to use --net=host with docker run (for Linux servers)') args = parser.parse_args() - run_command = 'docker run -it {0} --rm -p 5022:22 -p 4545:4545 -v {1}:/notebooks -w /notebooks {2} jupyter'.format( + run_command = 'docker run -it {0} --rm -p 5022:22 -p 4545:4545 -v "{1}":/notebooks -w /notebooks {2} jupyter'.format( '--net=host' if args.net_host else '', os.getcwd(), args.docker_tag) print('Running command\n' + run_command)
run_command = 'docker run -it {0} --rm -p 5022:22 -p 4545:4545 -v {1}:/notebooks -w /notebooks {2} jupyter' . format ( '--net=host' if args . net_host else '' , os . getcwd ( ) , args . docker_tag )
run_command = 'docker run -it {0} --rm -p 5022:22 -p 4545:4545 -v "{1}":/notebooks -w /notebooks {2} jupyter' . format ( '--net=host' if args . net_host else '' , os . getcwd ( ) , args . docker_tag )
CHANGE_STRING_LITERAL
[["Update", ["string:'docker run -it {0} --rm -p 5022:22 -p 4545:4545 -v {1}:/notebooks -w /notebooks {2} jupyter'", 3, 19, 3, 112], "'docker run -it {0} --rm -p 5022:22 -p 4545:4545 -v \"{1}\":/notebooks -w /notebooks {2} jupyter'"]]
Kulikovpavel/mlcourse_open@d0ee66b71301e4459901ba47161a2d30f6ed32b4
Fixed path with spaces issue
[ { "sha": "f813822a8a9e3059b5148875822b58e325f0346d", "filename": "run_docker_jupyter.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/Kulikovpavel/mlcourse_open/blob/d0ee66b71301e4459901ba47161a2d30f6ed32b4/run_docker_jupyter.py", "raw_url": "https://github.com/Kulikovpavel/mlcourse_open/raw/d0ee66b71301e4459901ba47161a2d30f6ed32b4/run_docker_jupyter.py", "contents_url": "https://api.github.com/repos/Kulikovpavel/mlcourse_open/contents/run_docker_jupyter.py?ref=d0ee66b71301e4459901ba47161a2d30f6ed32b4", "patch": "@@ -7,7 +7,7 @@ def main():\n parser.add_argument(\"--net_host\", action='store_true', help='Whether to use --net=host with docker run (for Linux servers)')\n args = parser.parse_args()\n \n- run_command = 'docker run -it {0} --rm -p 5022:22 -p 4545:4545 -v {1}:/notebooks -w /notebooks {2} jupyter'.format(\n+ run_command = 'docker run -it {0} --rm -p 5022:22 -p 4545:4545 -v \"{1}\":/notebooks -w /notebooks {2} jupyter'.format(\n '--net=host' if args.net_host else '', os.getcwd(), args.docker_tag)\n \n print('Running command\\n' + run_command)" } ]
shadowsocksr
a3a8ed996c24157e47e404b4db53d1b0ed0893b9
51c8ae4d7805b19542e39d42092ce4032752f837
shadowsocks/tcprelay.py
https://github.com/myheartsgoon/shadowsocksr
true
false
true
@@ -767,7 +767,7 @@ class TCPRelayHandler(object): return buffer_size s = buffer_size % self._tcp_mss + self._overhead if s > self._tcp_mss: - return buffer_size + s - self._tcp_mss + return buffer_size - (s - self._tcp_mss) return buffer_size def _on_local_read(self):
return buffer_size + s - self . _tcp_mss
return buffer_size - ( s - self . _tcp_mss )
SINGLE_STMT
[["Move", ["binary_operator", 3, 20, 3, 51], ["identifier:buffer_size", 3, 20, 3, 31], 0], ["Insert", ["binary_operator", 3, 20, 3, 51], ["-:-", "T"], 1], ["Insert", ["binary_operator", 3, 20, 3, 51], ["parenthesized_expression", "N0"], 2], ["Insert", "N0", ["(:(", "T"], 0], ["Insert", "N0", ["binary_operator", "N1"], 1], ["Insert", "N0", ["):)", "T"], 2], ["Move", "N1", ["identifier:s", 3, 34, 3, 35], 0], ["Move", "N1", ["-:-", 3, 36, 3, 37], 1], ["Move", "N1", ["attribute", 3, 38, 3, 51], 2], ["Delete", ["+:+", 3, 32, 3, 33]], ["Delete", ["binary_operator", 3, 20, 3, 35]]]
myheartsgoon/shadowsocksr@a3a8ed996c24157e47e404b4db53d1b0ed0893b9
fix a mistake
[ { "sha": "36167615867e83a3a86f4e03c51a4c8ac485c542", "filename": "shadowsocks/tcprelay.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/myheartsgoon/shadowsocksr/blob/a3a8ed996c24157e47e404b4db53d1b0ed0893b9/shadowsocks%2Ftcprelay.py", "raw_url": "https://github.com/myheartsgoon/shadowsocksr/raw/a3a8ed996c24157e47e404b4db53d1b0ed0893b9/shadowsocks%2Ftcprelay.py", "contents_url": "https://api.github.com/repos/myheartsgoon/shadowsocksr/contents/shadowsocks%2Ftcprelay.py?ref=a3a8ed996c24157e47e404b4db53d1b0ed0893b9", "patch": "@@ -767,7 +767,7 @@ def _get_read_size(self, sock, recv_buffer_size):\n return buffer_size\n s = buffer_size % self._tcp_mss + self._overhead\n if s > self._tcp_mss:\n- return buffer_size + s - self._tcp_mss\n+ return buffer_size - (s - self._tcp_mss)\n return buffer_size\n \n def _on_local_read(self):" } ]
shadowsocksr
5896eac1a8808338fa551d44d9223b42504011e1
582d7b72564e8b38f276309951ff19069ca5214d
shadowsocks/obfsplugin/auth_chain.py
https://github.com/myheartsgoon/shadowsocksr
true
false
true
@@ -602,7 +602,7 @@ class auth_chain_a(auth_base): mac_key = self.server_info.key md5data = hmac.new(mac_key, authdata, self.hashfunc).digest() rand_len = self.udp_rnd_data_len(md5data, self.random_server) - encryptor = encrypt.Encryptor(to_bytes(base64.b64encode(self.user_key)) + to_bytes(base64.b64encode(md5data)), 'rc4') + encryptor = encrypt.Encryptor(to_bytes(base64.b64encode(user_key)) + to_bytes(base64.b64encode(md5data)), 'rc4') out_buf = encryptor.encrypt(buf) buf = out_buf + os.urandom(rand_len) + authdata return buf + hmac.new(user_key, buf, self.hashfunc).digest()[:1]
encryptor = encrypt . Encryptor ( to_bytes ( base64 . b64encode ( self . user_key ) ) + to_bytes ( base64 . b64encode ( md5data ) ) , 'rc4' )
encryptor = encrypt . Encryptor ( to_bytes ( base64 . b64encode ( user_key ) ) + to_bytes ( base64 . b64encode ( md5data ) ) , 'rc4' )
SINGLE_STMT
[["Move", ["argument_list", 3, 64, 3, 79], ["identifier:user_key", 3, 70, 3, 78], 1], ["Delete", ["identifier:self", 3, 65, 3, 69]], ["Delete", [".:.", 3, 69, 3, 70]], ["Delete", ["attribute", 3, 65, 3, 78]]]
myheartsgoon/shadowsocksr@5896eac1a8808338fa551d44d9223b42504011e1
fix auth_chain_a UDP bug
[ { "sha": "5eed68cdfc4c15f4fae42c05c1be6ff61cdeed70", "filename": "shadowsocks/obfsplugin/auth_chain.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/myheartsgoon/shadowsocksr/blob/5896eac1a8808338fa551d44d9223b42504011e1/shadowsocks%2Fobfsplugin%2Fauth_chain.py", "raw_url": "https://github.com/myheartsgoon/shadowsocksr/raw/5896eac1a8808338fa551d44d9223b42504011e1/shadowsocks%2Fobfsplugin%2Fauth_chain.py", "contents_url": "https://api.github.com/repos/myheartsgoon/shadowsocksr/contents/shadowsocks%2Fobfsplugin%2Fauth_chain.py?ref=5896eac1a8808338fa551d44d9223b42504011e1", "patch": "@@ -602,7 +602,7 @@ def server_udp_pre_encrypt(self, buf, uid):\n mac_key = self.server_info.key\n md5data = hmac.new(mac_key, authdata, self.hashfunc).digest()\n rand_len = self.udp_rnd_data_len(md5data, self.random_server)\n- encryptor = encrypt.Encryptor(to_bytes(base64.b64encode(self.user_key)) + to_bytes(base64.b64encode(md5data)), 'rc4')\n+ encryptor = encrypt.Encryptor(to_bytes(base64.b64encode(user_key)) + to_bytes(base64.b64encode(md5data)), 'rc4')\n out_buf = encryptor.encrypt(buf)\n buf = out_buf + os.urandom(rand_len) + authdata\n return buf + hmac.new(user_key, buf, self.hashfunc).digest()[:1]" } ]
shadowsocksr
96200d7d76afa3d116c2cfa30a23bea4d32421d5
67065a212f43993c4d4db8da034b8571f1d98dfa
shadowsocks/crypto/table.py
https://github.com/myheartsgoon/shadowsocksr
true
false
false
@@ -74,7 +74,7 @@ class NoneCipher(object): ciphers = { 'none': (16, 0, NoneCipher), - 'table': (0, 0, TableCipher) + 'table': (16, 0, TableCipher) }
ciphers = { 'none' : ( 16 , 0 , NoneCipher ) , 'table' : ( 0 , 0 , TableCipher ) }
ciphers = { 'none' : ( 16 , 0 , NoneCipher ) , 'table' : ( 16 , 0 , TableCipher ) }
CHANGE_NUMERIC_LITERAL
[["Update", ["integer:0", 3, 15, 3, 16], "16"]]
myheartsgoon/shadowsocksr@96200d7d76afa3d116c2cfa30a23bea4d32421d5
fix key size
[ { "sha": "60c2f24519b131e0256cd1c18f14fa1abbff02d4", "filename": "shadowsocks/crypto/table.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/myheartsgoon/shadowsocksr/blob/96200d7d76afa3d116c2cfa30a23bea4d32421d5/shadowsocks%2Fcrypto%2Ftable.py", "raw_url": "https://github.com/myheartsgoon/shadowsocksr/raw/96200d7d76afa3d116c2cfa30a23bea4d32421d5/shadowsocks%2Fcrypto%2Ftable.py", "contents_url": "https://api.github.com/repos/myheartsgoon/shadowsocksr/contents/shadowsocks%2Fcrypto%2Ftable.py?ref=96200d7d76afa3d116c2cfa30a23bea4d32421d5", "patch": "@@ -74,7 +74,7 @@ def update(self, data):\n \n ciphers = {\n 'none': (16, 0, NoneCipher),\n- 'table': (0, 0, TableCipher)\n+ 'table': (16, 0, TableCipher)\n }\n \n " } ]
shadowsocksr
44185c9fffd9f9841690dea7ef9d481f6b0265e0
82f8fef28aa300ea3ad3e09a4742da5108b98e68
db_transfer.py
https://github.com/myheartsgoon/shadowsocksr
true
false
true
@@ -139,7 +139,7 @@ class TransferBase(object): if not cfgchange and port in ServerPool.get_instance().tcp_ipv6_servers_pool: relay = ServerPool.get_instance().tcp_ipv6_servers_pool[port] for name in merge_config_keys: - if name in cfg and not self.cmp(cfg[name], relay._config[name]): + if (name in cfg) and ((name not in relay._config) or not self.cmp(cfg[name], relay._config[name])): cfgchange = True break
if name in cfg and not self . cmp ( cfg [ name ] , relay . _config [ name ] ) : cfgchange = True break
if ( name in cfg ) and ( ( name not in relay . _config ) or not self . cmp ( cfg [ name ] , relay . _config [ name ] ) ) : cfgchange = True break
SINGLE_STMT
[["Insert", ["boolean_operator", 3, 10, 3, 70], ["parenthesized_expression", "N0"], 0], ["Insert", ["boolean_operator", 3, 10, 3, 70], ["parenthesized_expression", "N1"], 3], ["Insert", "N0", ["(:(", "T"], 0], ["Move", "N0", ["comparison_operator", 3, 10, 3, 21], 1], ["Insert", "N0", ["):)", "T"], 2], ["Insert", "N1", ["(:(", "T"], 0], ["Insert", "N1", ["boolean_operator", "N2"], 1], ["Insert", "N1", ["):)", "T"], 2], ["Insert", "N2", ["parenthesized_expression", "N3"], 0], ["Insert", "N2", ["or:or", "T"], 1], ["Move", "N2", ["not_operator", 3, 26, 3, 70], 2], ["Insert", "N3", ["(:(", "T"], 0], ["Insert", "N3", ["comparison_operator", "N4"], 1], ["Insert", "N3", ["):)", "T"], 2], ["Insert", "N4", ["identifier:name", "T"], 0], ["Insert", "N4", ["not:not", "T"], 1], ["Insert", "N4", ["in:in", "T"], 2], ["Insert", "N4", ["attribute", "N5"], 3], ["Insert", "N5", ["identifier:relay", "T"], 0], ["Insert", "N5", [".:.", "T"], 1], ["Insert", "N5", ["identifier:_config", "T"], 2]]
myheartsgoon/shadowsocksr@44185c9fffd9f9841690dea7ef9d481f6b0265e0
fix KeyError
[ { "sha": "3a1441d1913a0794d3ac5401017ca2b3c1d3d13f", "filename": "db_transfer.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/myheartsgoon/shadowsocksr/blob/44185c9fffd9f9841690dea7ef9d481f6b0265e0/db_transfer.py", "raw_url": "https://github.com/myheartsgoon/shadowsocksr/raw/44185c9fffd9f9841690dea7ef9d481f6b0265e0/db_transfer.py", "contents_url": "https://api.github.com/repos/myheartsgoon/shadowsocksr/contents/db_transfer.py?ref=44185c9fffd9f9841690dea7ef9d481f6b0265e0", "patch": "@@ -139,7 +139,7 @@ def del_server_out_of_bound_safe(self, last_rows, rows):\n \t\t\t\tif not cfgchange and port in ServerPool.get_instance().tcp_ipv6_servers_pool:\n \t\t\t\t\trelay = ServerPool.get_instance().tcp_ipv6_servers_pool[port]\n \t\t\t\t\tfor name in merge_config_keys:\n-\t\t\t\t\t\tif name in cfg and not self.cmp(cfg[name], relay._config[name]):\n+\t\t\t\t\t\tif (name in cfg) and ((name not in relay._config) or not self.cmp(cfg[name], relay._config[name])):\n \t\t\t\t\t\t\tcfgchange = True\n \t\t\t\t\t\t\tbreak\n " } ]
shadowsocksr
b655222857b4b58263be03d398265e5b03550237
71625e6415faa55642090bfecac71f1ce3513471
shadowsocks/obfsplugin/http_simple.py
https://github.com/myheartsgoon/shadowsocksr
true
false
true
@@ -219,7 +219,7 @@ class http_post(http_simple): super(http_post, self).__init__(method) def boundary(self): - return b''.join([random.choice(b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") for i in range(32)]) + return b''.join([chr(random.choice(b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")) for i in range(32)]) def client_encode(self, buf): if self.has_sent_header:
return b'' . join ( [ random . choice ( b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" ) for i in range ( 32 ) ] )
return b'' . join ( [ chr ( random . choice ( b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" ) ) for i in range ( 32 ) ] )
ADD_FUNCTION_AROUND_EXPRESSION
[["Insert", ["call", 3, 26, 3, 106], ["identifier:chr", "T"], 0], ["Insert", ["call", 3, 26, 3, 106], ["argument_list", "N0"], 1], ["Insert", "N0", ["(:(", "T"], 0], ["Move", "N0", ["call", 3, 26, 3, 106], 1], ["Insert", "N0", ["):)", "T"], 2]]
myheartsgoon/shadowsocksr@b655222857b4b58263be03d398265e5b03550237
fix http_post under py3
[ { "sha": "67f97b6fa71a7eb6a862195ee6467e8e62ff3f6b", "filename": "shadowsocks/obfsplugin/http_simple.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/myheartsgoon/shadowsocksr/blob/b655222857b4b58263be03d398265e5b03550237/shadowsocks%2Fobfsplugin%2Fhttp_simple.py", "raw_url": "https://github.com/myheartsgoon/shadowsocksr/raw/b655222857b4b58263be03d398265e5b03550237/shadowsocks%2Fobfsplugin%2Fhttp_simple.py", "contents_url": "https://api.github.com/repos/myheartsgoon/shadowsocksr/contents/shadowsocks%2Fobfsplugin%2Fhttp_simple.py?ref=b655222857b4b58263be03d398265e5b03550237", "patch": "@@ -219,7 +219,7 @@ def __init__(self, method):\n super(http_post, self).__init__(method)\n \n def boundary(self):\n- return b''.join([random.choice(b\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\") for i in range(32)])\n+ return b''.join([chr(random.choice(b\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\")) for i in range(32)])\n \n def client_encode(self, buf):\n if self.has_sent_header:" } ]
shadowsocksr
7b62f9f5302271bf5f030c7aed1d0df3813c7cc8
b655222857b4b58263be03d398265e5b03550237
shadowsocks/obfsplugin/http_simple.py
https://github.com/myheartsgoon/shadowsocksr
true
false
true
@@ -219,7 +219,7 @@ class http_post(http_simple): super(http_post, self).__init__(method) def boundary(self): - return b''.join([chr(random.choice(b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")) for i in range(32)]) + return to_bytes(''.join([random.choice("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") for i in range(32)])) def client_encode(self, buf): if self.has_sent_header:
return b'' . join ( [ chr ( random . choice ( b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" ) ) for i in range ( 32 ) ] )
return to_bytes ( '' . join ( [ random . choice ( "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" ) for i in range ( 32 ) ] ) )
SINGLE_STMT
[["Insert", ["call", 3, 16, 3, 132], ["identifier:to_bytes", "T"], 0], ["Insert", ["call", 3, 16, 3, 132], ["argument_list", "N0"], 1], ["Insert", "N0", ["(:(", "T"], 0], ["Insert", "N0", ["call", "N1"], 1], ["Insert", "N0", ["):)", "T"], 2], ["Move", "N1", ["attribute", 3, 16, 3, 24], 0], ["Move", "N1", ["argument_list", 3, 24, 3, 132], 1], ["Update", ["string:b''", 3, 16, 3, 19], "''"], ["Move", ["list_comprehension", 3, 25, 3, 131], ["call", 3, 30, 3, 110], 1], ["Update", ["string:b\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\"", 3, 44, 3, 109], "\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\""], ["Delete", ["identifier:chr", 3, 26, 3, 29]], ["Delete", ["(:(", 3, 29, 3, 30]], ["Delete", ["):)", 3, 110, 3, 111]], ["Delete", ["argument_list", 3, 29, 3, 111]], ["Delete", ["call", 3, 26, 3, 111]]]
myheartsgoon/shadowsocksr@7b62f9f5302271bf5f030c7aed1d0df3813c7cc8
fix http_post under py3
[ { "sha": "30d7ca9185a5c80183e33dbba8b4ce691a823f18", "filename": "shadowsocks/obfsplugin/http_simple.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/myheartsgoon/shadowsocksr/blob/7b62f9f5302271bf5f030c7aed1d0df3813c7cc8/shadowsocks%2Fobfsplugin%2Fhttp_simple.py", "raw_url": "https://github.com/myheartsgoon/shadowsocksr/raw/7b62f9f5302271bf5f030c7aed1d0df3813c7cc8/shadowsocks%2Fobfsplugin%2Fhttp_simple.py", "contents_url": "https://api.github.com/repos/myheartsgoon/shadowsocksr/contents/shadowsocks%2Fobfsplugin%2Fhttp_simple.py?ref=7b62f9f5302271bf5f030c7aed1d0df3813c7cc8", "patch": "@@ -219,7 +219,7 @@ def __init__(self, method):\n super(http_post, self).__init__(method)\n \n def boundary(self):\n- return b''.join([chr(random.choice(b\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\")) for i in range(32)])\n+ return to_bytes(''.join([random.choice(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\") for i in range(32)]))\n \n def client_encode(self, buf):\n if self.has_sent_header:" } ]
shadowsocksr
0e045a36e7194ff0971a16467add691788077b22
7b62f9f5302271bf5f030c7aed1d0df3813c7cc8
shadowsocks/obfsplugin/http_simple.py
https://github.com/myheartsgoon/shadowsocksr
true
false
true
@@ -250,7 +250,7 @@ class http_post(http_simple): http_head += b"User-Agent: " + random.choice(self.user_agent) + b"\r\n" http_head += b"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-US,en;q=0.8\r\nAccept-Encoding: gzip, deflate\r\n" http_head += b"Content-Type: multipart/form-data; boundary=" + self.boundary() + b"\r\nDNT: 1\r\n" - http_head += "Connection: keep-alive\r\n\r\n" + http_head += b"Connection: keep-alive\r\n\r\n" self.has_sent_header = True return http_head + buf
http_head += "Connection: keep-alive\r\n\r\n"
http_head += b"Connection: keep-alive\r\n\r\n"
CHANGE_STRING_LITERAL
[["Update", ["string:\"Connection: keep-alive\\r\\n\\r\\n\"", 3, 26, 3, 58], "b\"Connection: keep-alive\\r\\n\\r\\n\""]]
myheartsgoon/shadowsocksr@0e045a36e7194ff0971a16467add691788077b22
fix http_post under py3
[ { "sha": "6f1a05e4bb3c4aa0c0a7d7a813dadc233cf7be1a", "filename": "shadowsocks/obfsplugin/http_simple.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/myheartsgoon/shadowsocksr/blob/0e045a36e7194ff0971a16467add691788077b22/shadowsocks%2Fobfsplugin%2Fhttp_simple.py", "raw_url": "https://github.com/myheartsgoon/shadowsocksr/raw/0e045a36e7194ff0971a16467add691788077b22/shadowsocks%2Fobfsplugin%2Fhttp_simple.py", "contents_url": "https://api.github.com/repos/myheartsgoon/shadowsocksr/contents/shadowsocks%2Fobfsplugin%2Fhttp_simple.py?ref=0e045a36e7194ff0971a16467add691788077b22", "patch": "@@ -250,7 +250,7 @@ def client_encode(self, buf):\n http_head += b\"User-Agent: \" + random.choice(self.user_agent) + b\"\\r\\n\"\n http_head += b\"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\\r\\nAccept-Language: en-US,en;q=0.8\\r\\nAccept-Encoding: gzip, deflate\\r\\n\"\n http_head += b\"Content-Type: multipart/form-data; boundary=\" + self.boundary() + b\"\\r\\nDNT: 1\\r\\n\"\n- http_head += \"Connection: keep-alive\\r\\n\\r\\n\"\n+ http_head += b\"Connection: keep-alive\\r\\n\\r\\n\"\n self.has_sent_header = True\n return http_head + buf\n " } ]
eralegis
650a638e44d98ed6ded045ee1a6a797cd232b17f
09fb0e6bfe5a707dbfd0300399ed74a76eb98869
setup.py
https://github.com/tiagocordeiro/eralegis
true
false
false
@@ -138,7 +138,7 @@ setup( "Development Status :: 4 - Beta", "Environment :: Web Environment", "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", + "License :: OSI Approved :: MIT", "Operating System :: OS Independent", "Programming Language :: Python", "Framework :: Paste",
"License :: OSI Approved :: MIT License" ,
"License :: OSI Approved :: MIT" ,
CHANGE_STRING_LITERAL
[["Update", ["string:\"License :: OSI Approved :: MIT License\"", 3, 9, 3, 49], "\"License :: OSI Approved :: MIT\""]]
tiagocordeiro/eralegis@650a638e44d98ed6ded045ee1a6a797cd232b17f
fixed license
[ { "sha": "d768dd3d48b97558301a4460bcc2ff376b3a55b8", "filename": "setup.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/tiagocordeiro/eralegis/blob/650a638e44d98ed6ded045ee1a6a797cd232b17f/setup.py", "raw_url": "https://github.com/tiagocordeiro/eralegis/raw/650a638e44d98ed6ded045ee1a6a797cd232b17f/setup.py", "contents_url": "https://api.github.com/repos/tiagocordeiro/eralegis/contents/setup.py?ref=650a638e44d98ed6ded045ee1a6a797cd232b17f", "patch": "@@ -138,7 +138,7 @@ def find_package_data(\n \"Development Status :: 4 - Beta\",\n \"Environment :: Web Environment\",\n \"Intended Audience :: Developers\",\n- \"License :: OSI Approved :: MIT License\",\n+ \"License :: OSI Approved :: MIT\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\",\n \"Framework :: Paste\"," } ]
eralegis
6d1488b346feab0362e2a4444b89df3711651683
f55278a5743bb3ab3ca2a238dc7839377c133544
setup.py
https://github.com/tiagocordeiro/eralegis
true
false
false
@@ -138,7 +138,7 @@ setup( "Development Status :: 4 - Beta", "Environment :: Web Environment", "Intended Audience :: Developers", - "License :: OSI Approved :: MIT", + "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Framework :: Paste",
"License :: OSI Approved :: MIT" ,
"License :: OSI Approved :: MIT License" ,
CHANGE_STRING_LITERAL
[["Update", ["string:\"License :: OSI Approved :: MIT\"", 3, 9, 3, 41], "\"License :: OSI Approved :: MIT License\""]]
tiagocordeiro/eralegis@6d1488b346feab0362e2a4444b89df3711651683
fixed type setup license
[ { "sha": "d2db79379d5d4b596fd1e3d1d0865935bff97f1c", "filename": "setup.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/tiagocordeiro/eralegis/blob/6d1488b346feab0362e2a4444b89df3711651683/setup.py", "raw_url": "https://github.com/tiagocordeiro/eralegis/raw/6d1488b346feab0362e2a4444b89df3711651683/setup.py", "contents_url": "https://api.github.com/repos/tiagocordeiro/eralegis/contents/setup.py?ref=6d1488b346feab0362e2a4444b89df3711651683", "patch": "@@ -138,7 +138,7 @@ def find_package_data(\n \"Development Status :: 4 - Beta\",\n \"Environment :: Web Environment\",\n \"Intended Audience :: Developers\",\n- \"License :: OSI Approved :: MIT\",\n+ \"License :: OSI Approved :: MIT License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\",\n \"Framework :: Paste\"," } ]
eralegis
def5b3d61bc6a97ed19725a50ed6261fa621cc44
1e367644f1e42d96215bde4909d83560027e00bf
eralegis/__init__.py
https://github.com/tiagocordeiro/eralegis
true
false
false
@@ -1 +1 @@ -__version__ = '0.0.2' +__version__ = '0.0.3'
__version__ = '0.0.2'
__version__ = '0.0.3'
CHANGE_STRING_LITERAL
[["Update", ["string:'0.0.2'", 0, 15, 0, 22], "'0.0.3'"]]
tiagocordeiro/eralegis@def5b3d61bc6a97ed19725a50ed6261fa621cc44
Fixed Pypi
[ { "sha": "ffcc925ae2ade5f8b863840f7c8a0e337341410c", "filename": "eralegis/__init__.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/tiagocordeiro/eralegis/blob/def5b3d61bc6a97ed19725a50ed6261fa621cc44/eralegis%2F__init__.py", "raw_url": "https://github.com/tiagocordeiro/eralegis/raw/def5b3d61bc6a97ed19725a50ed6261fa621cc44/eralegis%2F__init__.py", "contents_url": "https://api.github.com/repos/tiagocordeiro/eralegis/contents/eralegis%2F__init__.py?ref=def5b3d61bc6a97ed19725a50ed6261fa621cc44", "patch": "@@ -1 +1 @@\n-__version__ = '0.0.2'\n+__version__ = '0.0.3'" } ]
eralegis
91bb503670b2a6a7a5ae2bcfe16c404e2123a617
1f1f2b35a26057b130fe0f3a4fe70c9a76138163
eralegis/__init__.py
https://github.com/tiagocordeiro/eralegis
true
false
false
@@ -1 +1 @@ -__version__ = '0.0.4' +__version__ = '0.0.5'
__version__ = '0.0.4'
__version__ = '0.0.5'
CHANGE_STRING_LITERAL
[["Update", ["string:'0.0.4'", 0, 15, 0, 22], "'0.0.5'"]]
tiagocordeiro/eralegis@91bb503670b2a6a7a5ae2bcfe16c404e2123a617
Fixed Pypi Package and add pip instructions in readme
[ { "sha": "eead3198634f4d98e3e90e5ba08ee78146842718", "filename": "eralegis/__init__.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/tiagocordeiro/eralegis/blob/91bb503670b2a6a7a5ae2bcfe16c404e2123a617/eralegis%2F__init__.py", "raw_url": "https://github.com/tiagocordeiro/eralegis/raw/91bb503670b2a6a7a5ae2bcfe16c404e2123a617/eralegis%2F__init__.py", "contents_url": "https://api.github.com/repos/tiagocordeiro/eralegis/contents/eralegis%2F__init__.py?ref=91bb503670b2a6a7a5ae2bcfe16c404e2123a617", "patch": "@@ -1 +1 @@\n-__version__ = '0.0.4'\n+__version__ = '0.0.5'" } ]
django-tamusers
8b339826a64a65fd162629227e4b467ceb502e14
cf4ac49fe771741a2641b96960d761e7dbc3e4e6
helusers/settings.py
https://github.com/Tampere/django-tamusers
true
false
false
@@ -27,7 +27,7 @@ _defaults = dict( API_AUTHORIZATION_FIELD='https://api.hel.fi/auth', # URL of the OpenID Provider - ISSUER='https://oma.hel.fi', + ISSUER='https://tunnistamo.hel.fi', # Auth scheme used in the Authorization header AUTH_SCHEME='Bearer',
ISSUER = 'https://oma.hel.fi' ,
ISSUER = 'https://tunnistamo.hel.fi' ,
CHANGE_STRING_LITERAL
[["Update", ["string:'https://oma.hel.fi'", 3, 12, 3, 32], "'https://tunnistamo.hel.fi'"]]
Tampere/django-tamusers@8b339826a64a65fd162629227e4b467ceb502e14
api_token_auth_settings: Update default ISSUER Tunnistamo will probably be serving at https://tunnistamo.hel.fi so make that as the default issuer.
[ { "sha": "4aa473fa8b141bc417fefb600a701ff67f7e903c", "filename": "helusers/settings.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/Tampere/django-tamusers/blob/8b339826a64a65fd162629227e4b467ceb502e14/helusers%2Fsettings.py", "raw_url": "https://github.com/Tampere/django-tamusers/raw/8b339826a64a65fd162629227e4b467ceb502e14/helusers%2Fsettings.py", "contents_url": "https://api.github.com/repos/Tampere/django-tamusers/contents/helusers%2Fsettings.py?ref=8b339826a64a65fd162629227e4b467ceb502e14", "patch": "@@ -27,7 +27,7 @@\n API_AUTHORIZATION_FIELD='https://api.hel.fi/auth',\n \n # URL of the OpenID Provider\n- ISSUER='https://oma.hel.fi',\n+ ISSUER='https://tunnistamo.hel.fi',\n \n # Auth scheme used in the Authorization header\n AUTH_SCHEME='Bearer'," } ]
django-tamusers
11b3e3f6dcc3363c12f1b7ff38719c70c7f56273
2d18945b7c9a16f3cb067c09128824328f95a937
helusers/providers/helsinki/provider.py
https://github.com/Tampere/django-tamusers
true
false
true
@@ -28,7 +28,7 @@ class HelsinkiProvider(OAuth2Provider): def extract_common_fields(self, data): ret = data.copy() - ret['username'] = uuid_to_username(data['sub']) + ret['username'] = uuid_to_username(data['uuid']) return ret def get_default_scope(self):
ret [ 'username' ] = uuid_to_username ( data [ 'sub' ] )
ret [ 'username' ] = uuid_to_username ( data [ 'uuid' ] )
CHANGE_STRING_LITERAL
[["Update", ["string:'sub'", 3, 49, 3, 54], "'uuid'"]]
Tampere/django-tamusers@11b3e3f6dcc3363c12f1b7ff38719c70c7f56273
Fix helsinki provider
[ { "sha": "3c814cd7e1f26fe3833045615c11334753a13a4f", "filename": "helusers/providers/helsinki/provider.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/Tampere/django-tamusers/blob/11b3e3f6dcc3363c12f1b7ff38719c70c7f56273/helusers%2Fproviders%2Fhelsinki%2Fprovider.py", "raw_url": "https://github.com/Tampere/django-tamusers/raw/11b3e3f6dcc3363c12f1b7ff38719c70c7f56273/helusers%2Fproviders%2Fhelsinki%2Fprovider.py", "contents_url": "https://api.github.com/repos/Tampere/django-tamusers/contents/helusers%2Fproviders%2Fhelsinki%2Fprovider.py?ref=11b3e3f6dcc3363c12f1b7ff38719c70c7f56273", "patch": "@@ -28,7 +28,7 @@ def extract_uid(self, data):\n \n def extract_common_fields(self, data):\n ret = data.copy()\n- ret['username'] = uuid_to_username(data['sub'])\n+ ret['username'] = uuid_to_username(data['uuid'])\n return ret\n \n def get_default_scope(self):" } ]
electrumx
3f743e9630349a4a98bba9ea7548b145c9ea20b2
af3ae6429e89fe0d6f54b94f4a85a01abbb1c8b8
server/block_processor.py
https://github.com/Fair-Exchange/electrumx
true
false
true
@@ -551,7 +551,7 @@ class BlockProcessor(server.db.DB): # Prevout values, in order down the block (coinbase first if present) # undo_info is in reverse block order undo_info = self.read_undo_info(self.height) - if not undo_info: + if undo_info is None: raise ChainError('no undo information found for height {:,d}' .format(self.height)) n = len(undo_info)
if not undo_info : raise ChainError ( 'no undo information found for height {:,d}' . format ( self . height ) )
if undo_info is None : raise ChainError ( 'no undo information found for height {:,d}' . format ( self . height ) )
SINGLE_STMT
[["Insert", ["if_statement", 3, 9, 5, 51], ["comparison_operator", "N0"], 1], ["Move", "N0", ["identifier:undo_info", 3, 16, 3, 25], 0], ["Insert", "N0", ["is:is", "T"], 1], ["Insert", "N0", ["none:None", "T"], 2], ["Delete", ["not:not", 3, 12, 3, 15]], ["Delete", ["not_operator", 3, 12, 3, 25]]]
Fair-Exchange/electrumx@3f743e9630349a4a98bba9ea7548b145c9ea20b2
Distinguish undo_info being empty and not existing Fixes #46
[ { "sha": "a1619cb496ba573c55b3e489e18d59a17f2f0e4c", "filename": "server/block_processor.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/Fair-Exchange/electrumx/blob/3f743e9630349a4a98bba9ea7548b145c9ea20b2/server%2Fblock_processor.py", "raw_url": "https://github.com/Fair-Exchange/electrumx/raw/3f743e9630349a4a98bba9ea7548b145c9ea20b2/server%2Fblock_processor.py", "contents_url": "https://api.github.com/repos/Fair-Exchange/electrumx/contents/server%2Fblock_processor.py?ref=3f743e9630349a4a98bba9ea7548b145c9ea20b2", "patch": "@@ -551,7 +551,7 @@ def backup_txs(self, tx_hashes, txs, touched):\n # Prevout values, in order down the block (coinbase first if present)\n # undo_info is in reverse block order\n undo_info = self.read_undo_info(self.height)\n- if not undo_info:\n+ if undo_info is None:\n raise ChainError('no undo information found for height {:,d}'\n .format(self.height))\n n = len(undo_info)" } ]
electrumx
b8fc739590f12fa251528aebbb4397204f6ee08a
f9cc21807f0976672b25a2227ecf7c5a3f061b46
server/db.py
https://github.com/Fair-Exchange/electrumx
true
false
true
@@ -349,7 +349,7 @@ class DB(LoggedClass): if limit == 0: return limit -= 1 - tx_num, tx_pos = s_unpack('<HI', db_key[-6:]) + tx_pos, tx_num = s_unpack('<HI', db_key[-6:]) value, = unpack('<Q', db_value) tx_hash, height = self.fs_tx_hash(tx_num) yield UTXO(tx_num, tx_pos, tx_hash, height, value)
tx_num , tx_pos = s_unpack ( '<HI' , db_key [ - 6 : ] )
tx_pos , tx_num = s_unpack ( '<HI' , db_key [ - 6 : ] )
SINGLE_STMT
[["Move", ["identifier:tx_num", 3, 13, 3, 19], ["pattern_list", 3, 13, 3, 27], 2], ["Move", [",:,", 3, 19, 3, 20], ["pattern_list", 3, 13, 3, 27], 3]]
Fair-Exchange/electrumx@b8fc739590f12fa251528aebbb4397204f6ee08a
Fix ordering in get_utxos
[ { "sha": "5dad58ba6233b9ea55d5ed67ebfa589964afd5d6", "filename": "server/db.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/Fair-Exchange/electrumx/blob/b8fc739590f12fa251528aebbb4397204f6ee08a/server%2Fdb.py", "raw_url": "https://github.com/Fair-Exchange/electrumx/raw/b8fc739590f12fa251528aebbb4397204f6ee08a/server%2Fdb.py", "contents_url": "https://api.github.com/repos/Fair-Exchange/electrumx/contents/server%2Fdb.py?ref=b8fc739590f12fa251528aebbb4397204f6ee08a", "patch": "@@ -349,7 +349,7 @@ def get_utxos(self, hash168, limit=1000):\n if limit == 0:\n return\n limit -= 1\n- tx_num, tx_pos = s_unpack('<HI', db_key[-6:])\n+ tx_pos, tx_num = s_unpack('<HI', db_key[-6:])\n value, = unpack('<Q', db_value)\n tx_hash, height = self.fs_tx_hash(tx_num)\n yield UTXO(tx_num, tx_pos, tx_hash, height, value)" } ]
electrumx
bc9027094b5e803cf895621f39dc1b8bed9a5878
be8adbbcd574242e319669676e6e07bdc3aef7c3
electrumx_rpc.py
https://github.com/Fair-Exchange/electrumx
true
false
true
@@ -58,7 +58,7 @@ def main(): args = parser.parse_args() if args.port is None: - args.port = int(environ.get('ELECTRUMX_RPC_PORT', 8000)) + args.port = int(environ.get('RPC_PORT', 8000)) loop = asyncio.get_event_loop() coro = loop.create_connection(RPCClient, 'localhost', args.port)
args . port = int ( environ . get ( 'ELECTRUMX_RPC_PORT' , 8000 ) )
args . port = int ( environ . get ( 'RPC_PORT' , 8000 ) )
CHANGE_STRING_LITERAL
[["Update", ["string:'ELECTRUMX_RPC_PORT'", 3, 37, 3, 57], "'RPC_PORT'"]]
Fair-Exchange/electrumx@bc9027094b5e803cf895621f39dc1b8bed9a5878
Fix environment variable (bauerj)
[ { "sha": "45350000bf664c52115279895354a140f02dade7", "filename": "electrumx_rpc.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/Fair-Exchange/electrumx/blob/bc9027094b5e803cf895621f39dc1b8bed9a5878/electrumx_rpc.py", "raw_url": "https://github.com/Fair-Exchange/electrumx/raw/bc9027094b5e803cf895621f39dc1b8bed9a5878/electrumx_rpc.py", "contents_url": "https://api.github.com/repos/Fair-Exchange/electrumx/contents/electrumx_rpc.py?ref=bc9027094b5e803cf895621f39dc1b8bed9a5878", "patch": "@@ -58,7 +58,7 @@ def main():\n args = parser.parse_args()\n \n if args.port is None:\n- args.port = int(environ.get('ELECTRUMX_RPC_PORT', 8000))\n+ args.port = int(environ.get('RPC_PORT', 8000))\n \n loop = asyncio.get_event_loop()\n coro = loop.create_connection(RPCClient, 'localhost', args.port)" } ]
electrumx
f1ea36126c9d16e5f783b9f5ed7f9397ea4f20c5
72ae3eabfc3b22c04a9fb91725047d544706d761
server/mempool.py
https://github.com/Fair-Exchange/electrumx
true
false
true
@@ -257,7 +257,7 @@ class MemPool(util.LoggedClass): return [] hex_hashes = self.hash168s[hash168] - raw_txs = self.bp.daemon.getrawtransactions(hex_hashes) + raw_txs = self.daemon.getrawtransactions(hex_hashes) result = [] for hex_hash, raw_tx in zip(hex_hashes, raw_txs): item = self.txs.get(hex_hash)
raw_txs = self . bp . daemon . getrawtransactions ( hex_hashes )
raw_txs = self . daemon . getrawtransactions ( hex_hashes )
SINGLE_STMT
[["Move", ["attribute", 3, 19, 3, 33], ["identifier:self", 3, 19, 3, 23], 0], ["Move", ["attribute", 3, 19, 3, 33], [".:.", 3, 23, 3, 24], 1], ["Delete", ["identifier:bp", 3, 24, 3, 26]], ["Delete", ["attribute", 3, 19, 3, 26]], ["Delete", [".:.", 3, 26, 3, 27]]]
Fair-Exchange/electrumx@f1ea36126c9d16e5f783b9f5ed7f9397ea4f20c5
Fix typo
[ { "sha": "81490f469e6488d3db3f638b757e23004f25f10f", "filename": "server/mempool.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/Fair-Exchange/electrumx/blob/f1ea36126c9d16e5f783b9f5ed7f9397ea4f20c5/server%2Fmempool.py", "raw_url": "https://github.com/Fair-Exchange/electrumx/raw/f1ea36126c9d16e5f783b9f5ed7f9397ea4f20c5/server%2Fmempool.py", "contents_url": "https://api.github.com/repos/Fair-Exchange/electrumx/contents/server%2Fmempool.py?ref=f1ea36126c9d16e5f783b9f5ed7f9397ea4f20c5", "patch": "@@ -257,7 +257,7 @@ async def transactions(self, hash168):\n return []\n \n hex_hashes = self.hash168s[hash168]\n- raw_txs = self.bp.daemon.getrawtransactions(hex_hashes)\n+ raw_txs = self.daemon.getrawtransactions(hex_hashes)\n result = []\n for hex_hash, raw_tx in zip(hex_hashes, raw_txs):\n item = self.txs.get(hex_hash)" } ]
electrumx
a30932fc868042dad174a99949bec2681c3df2e5
d8e64ea2fea4fb182da38995d74c4f10d01aa2d2
server/protocol.py
https://github.com/Fair-Exchange/electrumx
true
false
true
@@ -276,7 +276,7 @@ class ServerManager(util.LoggedClass): def electrum_header(self, height): '''Return the binary header at the given height.''' if not 0 <= height <= self.bp.db_height: - raise self.RPCError('height {:,d} out of range'.format(height)) + raise JSONRPC.RPCError('height {:,d} out of range'.format(height)) if height in self.header_cache: return self.header_cache[height] header = self.bp.read_headers(height, 1)
raise self . RPCError ( 'height {:,d} out of range' . format ( height ) )
raise JSONRPC . RPCError ( 'height {:,d} out of range' . format ( height ) )
SAME_FUNCTION_WRONG_CALLER
[["Update", ["identifier:self", 3, 19, 3, 23], "JSONRPC"]]
Fair-Exchange/electrumx@a30932fc868042dad174a99949bec2681c3df2e5
Fix namespace of RPCError Fixes #76
[ { "sha": "a7fe34d79b9b0123ab9f5463b11214c7a64cfbbc", "filename": "server/protocol.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/Fair-Exchange/electrumx/blob/a30932fc868042dad174a99949bec2681c3df2e5/server%2Fprotocol.py", "raw_url": "https://github.com/Fair-Exchange/electrumx/raw/a30932fc868042dad174a99949bec2681c3df2e5/server%2Fprotocol.py", "contents_url": "https://api.github.com/repos/Fair-Exchange/electrumx/contents/server%2Fprotocol.py?ref=a30932fc868042dad174a99949bec2681c3df2e5", "patch": "@@ -276,7 +276,7 @@ async def notify(self):\n def electrum_header(self, height):\n '''Return the binary header at the given height.'''\n if not 0 <= height <= self.bp.db_height:\n- raise self.RPCError('height {:,d} out of range'.format(height))\n+ raise JSONRPC.RPCError('height {:,d} out of range'.format(height))\n if height in self.header_cache:\n return self.header_cache[height]\n header = self.bp.read_headers(height, 1)" } ]
electrumx
7d899e07ae9ae18be6bf18d937687f0036282ee9
5bf59a1cc70c6b120e63b6ad88b1be67a24218e1
server/version.py
https://github.com/Fair-Exchange/electrumx
true
false
false
@@ -1 +1 @@ -VERSION = "ElectrumX 0.9.20" +VERSION = "ElectrumX 0.9.21"
VERSION = "ElectrumX 0.9.20"
VERSION = "ElectrumX 0.9.21"
CHANGE_STRING_LITERAL
[["Update", ["string:\"ElectrumX 0.9.20\"", 0, 11, 0, 29], "\"ElectrumX 0.9.21\""]]
Fair-Exchange/electrumx@7d899e07ae9ae18be6bf18d937687f0036282ee9
Fix version
[ { "sha": "c643e5700421f62b398b2d44c5da394ef4bf1792", "filename": "server/version.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/Fair-Exchange/electrumx/blob/7d899e07ae9ae18be6bf18d937687f0036282ee9/server%2Fversion.py", "raw_url": "https://github.com/Fair-Exchange/electrumx/raw/7d899e07ae9ae18be6bf18d937687f0036282ee9/server%2Fversion.py", "contents_url": "https://api.github.com/repos/Fair-Exchange/electrumx/contents/server%2Fversion.py?ref=7d899e07ae9ae18be6bf18d937687f0036282ee9", "patch": "@@ -1 +1 @@\n-VERSION = \"ElectrumX 0.9.20\"\n+VERSION = \"ElectrumX 0.9.21\"" } ]
python-wmi-client-wrapper
e6dc942e9f34afbff27f6135c6e30a5831d80535
0059accc6d24a5f551bcff21d6b4f2d02de839d2
wmi_client_wrapper/wrapper.py
https://github.com/ftpsolutions/python-wmi-client-wrapper
true
false
true
@@ -41,7 +41,7 @@ class WmiClientWrapper(object): # the format is user%pass # NOTE: this is an injection vulnerability - userpass = "{username}%{password}".format(username=username, password=password) + userpass = "{username}%{password}".format(username=self.username, password=self.password) arguments.append(userpass)
userpass = "{username}%{password}" . format ( username = username , password = password )
userpass = "{username}%{password}" . format ( username = self . username , password = self . password )
SINGLE_STMT
[["Move", ["=:=", 3, 78, 3, 79], ["keyword_argument", 3, 70, 3, 87], 2], ["Insert", ["keyword_argument", 3, 51, 3, 68], ["attribute", "N0"], 2], ["Insert", ["keyword_argument", 3, 70, 3, 87], ["attribute", "N1"], 2], ["Insert", "N0", ["identifier:self", "T"], 0], ["Insert", "N0", [".:.", "T"], 1], ["Move", "N0", ["identifier:username", 3, 60, 3, 68], 2], ["Insert", "N1", ["identifier:self", "T"], 0], ["Insert", "N1", [".:.", "T"], 1], ["Insert", "N1", ["identifier:password", "T"], 2], ["Delete", ["identifier:password", 3, 70, 3, 78]]]
ftpsolutions/python-wmi-client-wrapper@e6dc942e9f34afbff27f6135c6e30a5831d80535
fix bad reference to user/pass
[ { "sha": "1e9f6efec985a8b941ddd018490d82470080d53c", "filename": "wmi_client_wrapper/wrapper.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/ftpsolutions/python-wmi-client-wrapper/blob/e6dc942e9f34afbff27f6135c6e30a5831d80535/wmi_client_wrapper%2Fwrapper.py", "raw_url": "https://github.com/ftpsolutions/python-wmi-client-wrapper/raw/e6dc942e9f34afbff27f6135c6e30a5831d80535/wmi_client_wrapper%2Fwrapper.py", "contents_url": "https://api.github.com/repos/ftpsolutions/python-wmi-client-wrapper/contents/wmi_client_wrapper%2Fwrapper.py?ref=e6dc942e9f34afbff27f6135c6e30a5831d80535", "patch": "@@ -41,7 +41,7 @@ def _make_credential_args(self):\n \n # the format is user%pass\n # NOTE: this is an injection vulnerability\n- userpass = \"{username}%{password}\".format(username=username, password=password)\n+ userpass = \"{username}%{password}\".format(username=self.username, password=self.password)\n \n arguments.append(userpass)\n " } ]
python-wmi-client-wrapper
b11994977fdd7c54429717fc2e48083d8da13e9f
06f502e14837867e0a13c4bae4b4ab7015cd2c27
wmi_client_wrapper/wrapper.py
https://github.com/ftpsolutions/python-wmi-client-wrapper
true
false
true
@@ -94,7 +94,7 @@ class WmiClientWrapper(object): return WmiClientWrapper._parse_wmic_output(output, delimiter=delimiter) @classmethod - def _parse_wmic_output(output, delimiter="|"): + def _parse_wmic_output(cls, output, delimiter="|"): """ Parses output from the wmic command and returns json. """
def _parse_wmic_output ( output , delimiter = "|" ) : """ Parses output from the wmic command and returns json. """
def _parse_wmic_output ( cls , output , delimiter = "|" ) : """ Parses output from the wmic command and returns json. """
SINGLE_STMT
[["Insert", ["parameters", 3, 27, 3, 50], ["identifier:cls", "T"], 1], ["Insert", ["parameters", 3, 27, 3, 50], [",:,", "T"], 2]]
ftpsolutions/python-wmi-client-wrapper@b11994977fdd7c54429717fc2e48083d8da13e9f
fix classmethod definition
[ { "sha": "493678f6fd2d7191635bc37385841b82bb81fc9c", "filename": "wmi_client_wrapper/wrapper.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/ftpsolutions/python-wmi-client-wrapper/blob/b11994977fdd7c54429717fc2e48083d8da13e9f/wmi_client_wrapper%2Fwrapper.py", "raw_url": "https://github.com/ftpsolutions/python-wmi-client-wrapper/raw/b11994977fdd7c54429717fc2e48083d8da13e9f/wmi_client_wrapper%2Fwrapper.py", "contents_url": "https://api.github.com/repos/ftpsolutions/python-wmi-client-wrapper/contents/wmi_client_wrapper%2Fwrapper.py?ref=b11994977fdd7c54429717fc2e48083d8da13e9f", "patch": "@@ -94,7 +94,7 @@ def query(self, klass):\n return WmiClientWrapper._parse_wmic_output(output, delimiter=delimiter)\n \n @classmethod\n- def _parse_wmic_output(output, delimiter=\"|\"):\n+ def _parse_wmic_output(cls, output, delimiter=\"|\"):\n \"\"\"\n Parses output from the wmic command and returns json.\n \"\"\"" } ]
python-wmi-client-wrapper
f7d229a3de17bb97824cb0d263f60b438e348ff3
fef6bacfcb93e24650dbfbe457daf7dbb7834879
wmi_client_wrapper/wrapper.py
https://github.com/ftpsolutions/python-wmi-client-wrapper
true
false
true
@@ -91,7 +91,7 @@ class WmiClientWrapper(object): output = str(output) # and now parse the output - return WmiClientWrapper._parse_wmic_output(output, delimiter=delimiter) + return WmiClientWrapper._parse_wmic_output(output, delimiter=self.delimiter) @classmethod def _parse_wmic_output(cls, output, delimiter="|"):
return WmiClientWrapper . _parse_wmic_output ( output , delimiter = delimiter )
return WmiClientWrapper . _parse_wmic_output ( output , delimiter = self . delimiter )
SINGLE_STMT
[["Insert", ["keyword_argument", 3, 60, 3, 79], ["attribute", "N0"], 2], ["Insert", "N0", ["identifier:self", "T"], 0], ["Insert", "N0", [".:.", "T"], 1], ["Move", "N0", ["identifier:delimiter", 3, 70, 3, 79], 2]]
ftpsolutions/python-wmi-client-wrapper@f7d229a3de17bb97824cb0d263f60b438e348ff3
fix undefined delimiter variable
[ { "sha": "882c87aa6aad4f9e4e32874266e4e0b936b8ba01", "filename": "wmi_client_wrapper/wrapper.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/ftpsolutions/python-wmi-client-wrapper/blob/f7d229a3de17bb97824cb0d263f60b438e348ff3/wmi_client_wrapper%2Fwrapper.py", "raw_url": "https://github.com/ftpsolutions/python-wmi-client-wrapper/raw/f7d229a3de17bb97824cb0d263f60b438e348ff3/wmi_client_wrapper%2Fwrapper.py", "contents_url": "https://api.github.com/repos/ftpsolutions/python-wmi-client-wrapper/contents/wmi_client_wrapper%2Fwrapper.py?ref=f7d229a3de17bb97824cb0d263f60b438e348ff3", "patch": "@@ -91,7 +91,7 @@ def query(self, klass):\n output = str(output)\n \n # and now parse the output\n- return WmiClientWrapper._parse_wmic_output(output, delimiter=delimiter)\n+ return WmiClientWrapper._parse_wmic_output(output, delimiter=self.delimiter)\n \n @classmethod\n def _parse_wmic_output(cls, output, delimiter=\"|\"):" } ]
python-wmi-client-wrapper
b5deb5be54414e9e23932b86b62e464f1b3db130
af2a2734f9ea796f7a5d98e2cd5ce93bbf4b6fc7
wmi_client_wrapper/wrapper.py
https://github.com/ftpsolutions/python-wmi-client-wrapper
true
false
true
@@ -77,7 +77,7 @@ class WmiClientWrapper(object): # Let's make the query construction independent, but also if there's a # space then it's probably just a regular query. - if " " not in queryx: + if " " not in klass: queryx = self._construct_query(klass) else: query = klass
if " " not in queryx : queryx = self . _construct_query ( klass ) else : query = klass
if " " not in klass : queryx = self . _construct_query ( klass ) else : query = klass
CHANGE_IDENTIFIER_USED
[["Update", ["identifier:queryx", 3, 23, 3, 29], "klass"]]
ftpsolutions/python-wmi-client-wrapper@b5deb5be54414e9e23932b86b62e464f1b3db130
fix a typo related to queries
[ { "sha": "1e174fbce40753f7e7998b3a507fd1387ee5a89d", "filename": "wmi_client_wrapper/wrapper.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/ftpsolutions/python-wmi-client-wrapper/blob/b5deb5be54414e9e23932b86b62e464f1b3db130/wmi_client_wrapper%2Fwrapper.py", "raw_url": "https://github.com/ftpsolutions/python-wmi-client-wrapper/raw/b5deb5be54414e9e23932b86b62e464f1b3db130/wmi_client_wrapper%2Fwrapper.py", "contents_url": "https://api.github.com/repos/ftpsolutions/python-wmi-client-wrapper/contents/wmi_client_wrapper%2Fwrapper.py?ref=b5deb5be54414e9e23932b86b62e464f1b3db130", "patch": "@@ -77,7 +77,7 @@ def query(self, klass):\n \n # Let's make the query construction independent, but also if there's a\n # space then it's probably just a regular query.\n- if \" \" not in queryx:\n+ if \" \" not in klass:\n queryx = self._construct_query(klass)\n else:\n query = klass" } ]
python-wmi-client-wrapper
d3c0259c2e2fa55a1b50a09aab705cc161781918
b5deb5be54414e9e23932b86b62e464f1b3db130
wmi_client_wrapper/wrapper.py
https://github.com/ftpsolutions/python-wmi-client-wrapper
true
false
true
@@ -80,7 +80,7 @@ class WmiClientWrapper(object): if " " not in klass: queryx = self._construct_query(klass) else: - query = klass + queryx = klass # and these are just configuration setup = self._setup_params()
query = klass
queryx = klass
CHANGE_IDENTIFIER_USED
[["Update", ["identifier:query", 3, 13, 3, 18], "queryx"]]
ftpsolutions/python-wmi-client-wrapper@d3c0259c2e2fa55a1b50a09aab705cc161781918
fix another typo about queries
[ { "sha": "349b39ca6ce0d5aeaa6755158bf9286cf473daca", "filename": "wmi_client_wrapper/wrapper.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/ftpsolutions/python-wmi-client-wrapper/blob/d3c0259c2e2fa55a1b50a09aab705cc161781918/wmi_client_wrapper%2Fwrapper.py", "raw_url": "https://github.com/ftpsolutions/python-wmi-client-wrapper/raw/d3c0259c2e2fa55a1b50a09aab705cc161781918/wmi_client_wrapper%2Fwrapper.py", "contents_url": "https://api.github.com/repos/ftpsolutions/python-wmi-client-wrapper/contents/wmi_client_wrapper%2Fwrapper.py?ref=d3c0259c2e2fa55a1b50a09aab705cc161781918", "patch": "@@ -80,7 +80,7 @@ def query(self, klass):\n if \" \" not in klass:\n queryx = self._construct_query(klass)\n else:\n- query = klass\n+ queryx = klass\n \n # and these are just configuration\n setup = self._setup_params()" } ]
brackets-shell
a28fe08a4f3a61721dd85d4b66fe1031e6ecd680
c54a67572337e85f37cc7621c98d2d570ccd2bc9
gyp/pylib/gyp/generator/msvs.py
https://github.com/pelatx/brackets-shell
true
false
true
@@ -1687,7 +1687,7 @@ def _GetCopies(spec): src_bare = src[:-1] base_dir = posixpath.split(src_bare)[0] outer_dir = posixpath.split(src_bare)[1] - cmd = 'cd "%s" && xcopy /e /f /y "%s" "%s\\%s\\"' % ( + cmd = 'xcopy /e /f /y "%s\\%s" "%s\\%s\\"' % ( _FixPath(base_dir), outer_dir, _FixPath(dst), outer_dir) copies.append(([src], ['dummy_copies', dst], cmd, 'Copying %s to %s' % (src, dst)))
cmd = 'cd "%s" && xcopy /e /f /y "%s" "%s\\%s\\"' % ( _FixPath ( base_dir ) , outer_dir , _FixPath ( dst ) , outer_dir )
cmd = 'xcopy /e /f /y "%s\\%s" "%s\\%s\\"' % ( _FixPath ( base_dir ) , outer_dir , _FixPath ( dst ) , outer_dir )
CHANGE_BINARY_OPERAND
[["Update", ["string:'cd \"%s\" && xcopy /e /f /y \"%s\" \"%s\\\\%s\\\\\"'", 3, 15, 3, 58], "'xcopy /e /f /y \"%s\\\\%s\" \"%s\\\\%s\\\\\"'"]]
pelatx/brackets-shell@a28fe08a4f3a61721dd85d4b66fe1031e6ecd680
Reapply "Fix directory copy for gyp on Windows" This is the same fix of Glenn Ruehle of 18/06/2013 on top of the update of gyp (SHA-1: a276d559aa147580f1f69d401cf4ae3c10ae4382)
[ { "sha": "8c56e0a8e02e117823644e06790f954297ebe374", "filename": "gyp/pylib/gyp/generator/msvs.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/pelatx/brackets-shell/blob/a28fe08a4f3a61721dd85d4b66fe1031e6ecd680/gyp%2Fpylib%2Fgyp%2Fgenerator%2Fmsvs.py", "raw_url": "https://github.com/pelatx/brackets-shell/raw/a28fe08a4f3a61721dd85d4b66fe1031e6ecd680/gyp%2Fpylib%2Fgyp%2Fgenerator%2Fmsvs.py", "contents_url": "https://api.github.com/repos/pelatx/brackets-shell/contents/gyp%2Fpylib%2Fgyp%2Fgenerator%2Fmsvs.py?ref=a28fe08a4f3a61721dd85d4b66fe1031e6ecd680", "patch": "@@ -1687,7 +1687,7 @@ def _GetCopies(spec):\n src_bare = src[:-1]\n base_dir = posixpath.split(src_bare)[0]\n outer_dir = posixpath.split(src_bare)[1]\n- cmd = 'cd \"%s\" && xcopy /e /f /y \"%s\" \"%s\\\\%s\\\\\"' % (\n+ cmd = 'xcopy /e /f /y \"%s\\\\%s\" \"%s\\\\%s\\\\\"' % (\n _FixPath(base_dir), outer_dir, _FixPath(dst), outer_dir)\n copies.append(([src], ['dummy_copies', dst], cmd,\n 'Copying %s to %s' % (src, dst)))" } ]
apitest
f05a7fd597b9030fa655c9d1590be6bf081bb659
44c687d566db5190ccaf5770d15cebe17759a0f0
apitest/dataformat.py
https://github.com/cooleasyhan/apitest
true
false
true
@@ -29,7 +29,7 @@ class TCDataFormatHandler(object): for cell in arr: if cell.data_type not in ('jinja2', 'json'): _func = getattr(builtins, cell.data_type) - tmp[cell.name] = _func(cell.value) + tmp[cell.name] = _func(cell.value) if cell.value else None for cell in arr: if cell.data_type in ('jinja2', 'json'):
tmp [ cell . name ] = _func ( cell . value )
tmp [ cell . name ] = _func ( cell . value ) if cell . value else None
SINGLE_STMT
[["Insert", ["assignment", 3, 17, 3, 51], ["conditional_expression", "N0"], 2], ["Move", "N0", ["call", 3, 34, 3, 51], 0], ["Insert", "N0", ["if:if", "T"], 1], ["Insert", "N0", ["attribute", "N1"], 2], ["Insert", "N0", ["else:else", "T"], 3], ["Insert", "N0", ["none:None", "T"], 4], ["Insert", "N1", ["identifier:cell", "T"], 0], ["Insert", "N1", [".:.", "T"], 1], ["Insert", "N1", ["identifier:value", "T"], 2]]
cooleasyhan/apitest@f05a7fd597b9030fa655c9d1590be6bf081bb659
fix None error
[ { "sha": "ac84008c33d44980344232dabc481a1d1c58ef24", "filename": "apitest/dataformat.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/cooleasyhan/apitest/blob/f05a7fd597b9030fa655c9d1590be6bf081bb659/apitest%2Fdataformat.py", "raw_url": "https://github.com/cooleasyhan/apitest/raw/f05a7fd597b9030fa655c9d1590be6bf081bb659/apitest%2Fdataformat.py", "contents_url": "https://api.github.com/repos/cooleasyhan/apitest/contents/apitest%2Fdataformat.py?ref=f05a7fd597b9030fa655c9d1590be6bf081bb659", "patch": "@@ -29,7 +29,7 @@ def to_dict(arr):\n for cell in arr:\n if cell.data_type not in ('jinja2', 'json'):\n _func = getattr(builtins, cell.data_type)\n- tmp[cell.name] = _func(cell.value)\n+ tmp[cell.name] = _func(cell.value) if cell.value else None\n \n for cell in arr:\n if cell.data_type in ('jinja2', 'json'):" } ]
physic_model_of_snoke
b693c3cd6b6e9a1b3b828006547dfb77147f2e3a
14e8eb0792bcc2b8d4f8c999d79eaec471907204
TraCalc.py
https://github.com/falconkid/physic_model_of_snoke
true
false
true
@@ -36,7 +36,7 @@ def read(): def motion(ball): global COUNT - if COUNT == 2: + if COUNT >= 4: return id = checkCollision(ball) #collide
if COUNT == 2 : return
if COUNT >= 4 : return
SINGLE_STMT
[["Insert", ["comparison_operator", 3, 8, 3, 18], [">=:>=", "T"], 1], ["Update", ["integer:2", 3, 17, 3, 18], "4"], ["Delete", ["==:==", 3, 14, 3, 16]]]
falconkid/physic_model_of_snoke@b693c3cd6b6e9a1b3b828006547dfb77147f2e3a
null
null
aplpy
818c870523f6a78d6b1a4e20150c8fd6326c7a25
38cccdb8bf397ddb50c2f3955937933856c47812
aplpy/aplpy.py
https://github.com/barentsen/aplpy
true
false
true
@@ -1225,7 +1225,7 @@ class FITSFigure(Layers, Regions, Deprecated): - if not kwargs.has_key('facecolor'): + if not 'facecolor' in kwargs: kwargs.setdefault('facecolor', 'none') if layer:
if not kwargs . has_key ( 'facecolor' ) : kwargs . setdefault ( 'facecolor' , 'none' )
if not 'facecolor' in kwargs : kwargs . setdefault ( 'facecolor' , 'none' )
SINGLE_STMT
[["Insert", ["not_operator", 1, 12, 1, 43], ["comparison_operator", "N0"], 1], ["Move", "N0", ["string:'facecolor'", 1, 31, 1, 42], 0], ["Insert", "N0", ["in:in", "T"], 1], ["Move", "N0", ["identifier:kwargs", 1, 16, 1, 22], 2], ["Delete", [".:.", 1, 22, 1, 23]], ["Delete", ["identifier:has_key", 1, 23, 1, 30]], ["Delete", ["attribute", 1, 16, 1, 30]], ["Delete", ["(:(", 1, 30, 1, 31]], ["Delete", ["):)", 1, 42, 1, 43]], ["Delete", ["argument_list", 1, 30, 1, 43]], ["Delete", ["call", 1, 16, 1, 43]]]
barentsen/aplpy@818c870523f6a78d6b1a4e20150c8fd6326c7a25
Fixed deprecated syntax
[ { "sha": "2f7183df9f5290e3b5a1cb88ddf292beb6afe28a", "filename": "aplpy/aplpy.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/aplpy/blob/818c870523f6a78d6b1a4e20150c8fd6326c7a25/aplpy%2Faplpy.py", "raw_url": "https://github.com/barentsen/aplpy/raw/818c870523f6a78d6b1a4e20150c8fd6326c7a25/aplpy%2Faplpy.py", "contents_url": "https://api.github.com/repos/barentsen/aplpy/contents/aplpy%2Faplpy.py?ref=818c870523f6a78d6b1a4e20150c8fd6326c7a25", "patch": "@@ -1225,7 +1225,7 @@ def show_polygons(self, polygon_list, layer=False, zorder=None, **kwargs):\n artist_api.html#matplotlib.patches.Polygon>`_.\n '''\n \n- if not kwargs.has_key('facecolor'):\n+ if not 'facecolor' in kwargs:\n kwargs.setdefault('facecolor', 'none')\n \n if layer:" } ]
aplpy
d8ace5355331603f4ccfd1020326d159564401bd
7e16d1cfd91d6d91ec7ed9a095370dd2aabc0213
aplpy/normalize.py
https://github.com/barentsen/aplpy
true
false
true
@@ -140,7 +140,7 @@ class APLpyNormalize(Normalize): # Now set previously negative values to 0, as these are # different from true NaN values in the FITS image - result[negative] = 0. + result[negative] = -np.inf if vtype == 'scalar': result = result[0]
result [ negative ] = 0.
result [ negative ] = - np . inf
SINGLE_STMT
[["Insert", ["assignment", 3, 13, 3, 34], ["unary_operator", "N0"], 2], ["Insert", "N0", ["-:-", "T"], 0], ["Insert", "N0", ["attribute", "N1"], 1], ["Insert", "N1", ["identifier:np", "T"], 0], ["Insert", "N1", [".:.", "T"], 1], ["Insert", "N1", ["identifier:inf", "T"], 2], ["Delete", ["float:0.", 3, 32, 3, 34]]]
barentsen/aplpy@d8ace5355331603f4ccfd1020326d159564401bd
Fixed mistake in APLpyNormalize that caused issues with colorbars. Fixes #42.
[ { "sha": "ab90045a7c8ab30887fa5a38e57458de25809a60", "filename": "aplpy/normalize.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/aplpy/blob/d8ace5355331603f4ccfd1020326d159564401bd/aplpy%2Fnormalize.py", "raw_url": "https://github.com/barentsen/aplpy/raw/d8ace5355331603f4ccfd1020326d159564401bd/aplpy%2Fnormalize.py", "contents_url": "https://api.github.com/repos/barentsen/aplpy/contents/aplpy%2Fnormalize.py?ref=d8ace5355331603f4ccfd1020326d159564401bd", "patch": "@@ -140,7 +140,7 @@ def __call__(self, value, clip=None):\n \n # Now set previously negative values to 0, as these are\n # different from true NaN values in the FITS image\n- result[negative] = 0.\n+ result[negative] = -np.inf\n \n if vtype == 'scalar':\n result = result[0]" } ]
aplpy
8b41d51954648912ae24c6c65a13ab71ebf189fd
4f854bf9363b364cbc7d0146c9a38d14c998139c
tests/test_init_cube.py
https://github.com/barentsen/aplpy
true
false
true
@@ -75,7 +75,7 @@ def test_hdu_noslices(): # Test that initialization without specifying slices does *not* raise an # exception if the remaining dimensions have size 1. -def test_hdu_noslices(): +def test_hdu_noslices_2d(): data = np.zeros((1, 16, 16)) f = aplpy.FITSFigure(data) f.show_grayscale()
def test_hdu_noslices ( ) : data = np . zeros ( ( 1 , 16 , 16 ) ) f = aplpy . FITSFigure ( data ) f . show_grayscale ( )
def test_hdu_noslices_2d ( ) : data = np . zeros ( ( 1 , 16 , 16 ) ) f = aplpy . FITSFigure ( data ) f . show_grayscale ( )
SINGLE_TOKEN
[["Update", ["identifier:test_hdu_noslices", 3, 5, 3, 22], "test_hdu_noslices_2d"]]
barentsen/aplpy@8b41d51954648912ae24c6c65a13ab71ebf189fd
Fixed test name
[ { "sha": "c2c154138c377215c3eeb914a851416ebe04d140", "filename": "tests/test_init_cube.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/aplpy/blob/8b41d51954648912ae24c6c65a13ab71ebf189fd/tests%2Ftest_init_cube.py", "raw_url": "https://github.com/barentsen/aplpy/raw/8b41d51954648912ae24c6c65a13ab71ebf189fd/tests%2Ftest_init_cube.py", "contents_url": "https://api.github.com/repos/barentsen/aplpy/contents/tests%2Ftest_init_cube.py?ref=8b41d51954648912ae24c6c65a13ab71ebf189fd", "patch": "@@ -75,7 +75,7 @@ def test_hdu_noslices():\n \n # Test that initialization without specifying slices does *not* raise an\n # exception if the remaining dimensions have size 1.\n-def test_hdu_noslices():\n+def test_hdu_noslices_2d():\n data = np.zeros((1, 16, 16))\n f = aplpy.FITSFigure(data)\n f.show_grayscale()" } ]
aplpy
5741292fc6e880e6ca4ccb2d377b81b5f9915a97
ef65fba3aee62fa4b287000fde88d6eba0c245df
aplpy/deprecated.py
https://github.com/barentsen/aplpy
true
false
true
@@ -33,7 +33,7 @@ class Deprecated(object): @auto_refresh def hide_grid(self, *args, **kwargs): warnings.warn("hide_grid is deprecated - use remove_grid instead", DeprecationWarning) - self.add_grid(*args, **kwargs) + self.remove_grid(*args, **kwargs) @auto_refresh def show_beam(self, *args, **kwargs):
self . add_grid ( * args , ** kwargs )
self . remove_grid ( * args , ** kwargs )
WRONG_FUNCTION_NAME
[["Update", ["identifier:add_grid", 3, 14, 3, 22], "remove_grid"]]
barentsen/aplpy@5741292fc6e880e6ca4ccb2d377b81b5f9915a97
Fixed bug in deprecated function
[ { "sha": "1fca79674cefd0c51ca469af5ea268da81f2794c", "filename": "aplpy/deprecated.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/aplpy/blob/5741292fc6e880e6ca4ccb2d377b81b5f9915a97/aplpy%2Fdeprecated.py", "raw_url": "https://github.com/barentsen/aplpy/raw/5741292fc6e880e6ca4ccb2d377b81b5f9915a97/aplpy%2Fdeprecated.py", "contents_url": "https://api.github.com/repos/barentsen/aplpy/contents/aplpy%2Fdeprecated.py?ref=5741292fc6e880e6ca4ccb2d377b81b5f9915a97", "patch": "@@ -33,7 +33,7 @@ def show_grid(self, *args, **kwargs):\n @auto_refresh\n def hide_grid(self, *args, **kwargs):\n warnings.warn(\"hide_grid is deprecated - use remove_grid instead\", DeprecationWarning)\n- self.add_grid(*args, **kwargs)\n+ self.remove_grid(*args, **kwargs)\n \n @auto_refresh\n def show_beam(self, *args, **kwargs):" } ]
aplpy
970d24280ddf417b9c07820cf203505024ebe083
f0b4693107a20c937308422bea4e082543b59949
setup.py
https://github.com/barentsen/aplpy
true
false
false
@@ -81,7 +81,7 @@ if setup_helpers.HAVE_CYTHON and not release: else: cmdclassd['build_ext'] = setup_helpers.wrap_build_ext() -if setup_helpers.AstropyBuildSphinx is not None: +if setup_helpers.HAVE_SPHINX: cmdclassd['build_sphinx'] = setup_helpers.AstropyBuildSphinx # Set our custom command class mapping in setup_helpers, so that
if setup_helpers . AstropyBuildSphinx is not None : cmdclassd [ 'build_sphinx' ] = setup_helpers . AstropyBuildSphinx
if setup_helpers . HAVE_SPHINX : cmdclassd [ 'build_sphinx' ] = setup_helpers . AstropyBuildSphinx
SINGLE_STMT
[["Move", ["if_statement", 3, 1, 4, 65], ["attribute", 3, 4, 3, 36], 1], ["Update", ["identifier:AstropyBuildSphinx", 3, 18, 3, 36], "HAVE_SPHINX"], ["Delete", ["is:is", 3, 37, 3, 39]], ["Delete", ["not:not", 3, 40, 3, 43]], ["Delete", ["none:None", 3, 44, 3, 48]], ["Delete", ["comparison_operator", 3, 4, 3, 48]]]
barentsen/aplpy@970d24280ddf417b9c07820cf203505024ebe083
Changed check in setup.py to syntax in core package to avoid issues when Sphinx is not installed.
[ { "sha": "e2ab14c2e4f3e98f92f8cbda4b1fdb62d7fd216e", "filename": "setup.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/aplpy/blob/970d24280ddf417b9c07820cf203505024ebe083/setup.py", "raw_url": "https://github.com/barentsen/aplpy/raw/970d24280ddf417b9c07820cf203505024ebe083/setup.py", "contents_url": "https://api.github.com/repos/barentsen/aplpy/contents/setup.py?ref=970d24280ddf417b9c07820cf203505024ebe083", "patch": "@@ -81,7 +81,7 @@\n else:\n cmdclassd['build_ext'] = setup_helpers.wrap_build_ext()\n \n-if setup_helpers.AstropyBuildSphinx is not None:\n+if setup_helpers.HAVE_SPHINX:\n cmdclassd['build_sphinx'] = setup_helpers.AstropyBuildSphinx\n \n # Set our custom command class mapping in setup_helpers, so that" } ]
aplpy
169b889ad7de5f3440e49c1c147334c5fc623e56
3acd4aa37efda41ab15ef7dfb28a13f0730cbfb5
aplpy/ticks.py
https://github.com/barentsen/aplpy
true
false
true
@@ -412,7 +412,7 @@ def default_spacing(ax, coord, format): return spacing else: min_spacing = su._get_label_precision(format) - if min_spacing > spacing: + if min_spacing is not None and min_spacing > spacing: return min_spacing else: return spacing
if min_spacing > spacing : return min_spacing else : return spacing
if min_spacing is not None and min_spacing > spacing : return min_spacing else : return spacing
MORE_SPECIFIC_IF
[["Insert", ["if_statement", 3, 9, 6, 27], ["boolean_operator", "N0"], 1], ["Insert", "N0", ["comparison_operator", "N1"], 0], ["Insert", "N0", ["and:and", "T"], 1], ["Move", "N0", ["comparison_operator", 3, 12, 3, 33], 2], ["Insert", "N1", ["identifier:min_spacing", "T"], 0], ["Insert", "N1", ["is:is", "T"], 1], ["Insert", "N1", ["not:not", "T"], 2], ["Insert", "N1", ["none:None", "T"], 3]]
barentsen/aplpy@169b889ad7de5f3440e49c1c147334c5fc623e56
Fixed bug that was causing tests to fail
[ { "sha": "8037ee61c22b94ad955a345e92ac38aaa9d8de98", "filename": "aplpy/ticks.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/aplpy/blob/169b889ad7de5f3440e49c1c147334c5fc623e56/aplpy%2Fticks.py", "raw_url": "https://github.com/barentsen/aplpy/raw/169b889ad7de5f3440e49c1c147334c5fc623e56/aplpy%2Fticks.py", "contents_url": "https://api.github.com/repos/barentsen/aplpy/contents/aplpy%2Fticks.py?ref=169b889ad7de5f3440e49c1c147334c5fc623e56", "patch": "@@ -412,7 +412,7 @@ def default_spacing(ax, coord, format):\n return spacing\n else:\n min_spacing = su._get_label_precision(format)\n- if min_spacing > spacing:\n+ if min_spacing is not None and min_spacing > spacing:\n return min_spacing\n else:\n return spacing" } ]
aplpy
d05ee2ecb67e0b98ff4494c553d8a32167bb0d88
22be13e0928906bdd2ed114f1b7c480a9c0f18c9
setup.py
https://github.com/barentsen/aplpy
true
false
false
@@ -68,7 +68,7 @@ packagenames = filter_packages(find_packages()) # Treat everything in scripts except README.rst as a script to be installed scripts = [fname for fname in glob.glob(os.path.join('scripts', '*')) - if fname != 'README.rst'] + if os.path.basename(fname) != 'README.rst'] # Additional C extensions that are not Cython-based should be added here. extensions = []
scripts = [ fname for fname in glob . glob ( os . path . join ( 'scripts' , '*' ) ) if fname != 'README.rst' ]
scripts = [ fname for fname in glob . glob ( os . path . join ( 'scripts' , '*' ) ) if os . path . basename ( fname ) != 'README.rst' ]
ADD_FUNCTION_AROUND_EXPRESSION
[["Insert", ["comparison_operator", 3, 15, 3, 36], ["call", "N0"], 0], ["Insert", "N0", ["attribute", "N1"], 0], ["Insert", "N0", ["argument_list", "N2"], 1], ["Insert", "N1", ["attribute", "N3"], 0], ["Insert", "N1", [".:.", "T"], 1], ["Insert", "N1", ["identifier:basename", "T"], 2], ["Insert", "N2", ["(:(", "T"], 0], ["Move", "N2", ["identifier:fname", 3, 15, 3, 20], 1], ["Insert", "N2", ["):)", "T"], 2], ["Insert", "N3", ["identifier:os", "T"], 0], ["Insert", "N3", [".:.", "T"], 1], ["Insert", "N3", ["identifier:path", "T"], 2]]
barentsen/aplpy@d05ee2ecb67e0b98ff4494c553d8a32167bb0d88
Fix scripts/README.rst bug
[ { "sha": "39c2ffb514bf4caf57214269d0d9dd85a91daf2d", "filename": "setup.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/aplpy/blob/d05ee2ecb67e0b98ff4494c553d8a32167bb0d88/setup.py", "raw_url": "https://github.com/barentsen/aplpy/raw/d05ee2ecb67e0b98ff4494c553d8a32167bb0d88/setup.py", "contents_url": "https://api.github.com/repos/barentsen/aplpy/contents/setup.py?ref=d05ee2ecb67e0b98ff4494c553d8a32167bb0d88", "patch": "@@ -68,7 +68,7 @@\n \n # Treat everything in scripts except README.rst as a script to be installed\n scripts = [fname for fname in glob.glob(os.path.join('scripts', '*'))\n- if fname != 'README.rst']\n+ if os.path.basename(fname) != 'README.rst']\n \n # Additional C extensions that are not Cython-based should be added here.\n extensions = []" } ]
aplpy
ae8ec5ca65dbfe9f6b0418d837db135e1a388193
61e7368f289fffb6f6b5a25ae5c8671dc3fecd8d
aplpy/convolve_util.py
https://github.com/barentsen/aplpy
true
false
true
@@ -6,7 +6,7 @@ from astropy.nddata import convolve as nddata_convolve, make_kernel def convolve(image, smooth=3, kernel='gauss'): - if not np.isscalar(smooth): + if smooth is not None and not np.isscalar(smooth): raise ValueError("smooth= should be an integer - for more complex " "kernels, pass an array containing the kernel " "to the kernel= option")
if not np . isscalar ( smooth ) : raise ValueError ( "smooth= should be an integer - for more complex " "kernels, pass an array containing the kernel " "to the kernel= option" )
if smooth is not None and not np . isscalar ( smooth ) : raise ValueError ( "smooth= should be an integer - for more complex " "kernels, pass an array containing the kernel " "to the kernel= option" )
MORE_SPECIFIC_IF
[["Insert", ["if_statement", 3, 5, 6, 50], ["boolean_operator", "N0"], 1], ["Insert", "N0", ["comparison_operator", "N1"], 0], ["Insert", "N0", ["and:and", "T"], 1], ["Move", "N0", ["not_operator", 3, 8, 3, 31], 2], ["Insert", "N1", ["identifier:smooth", "T"], 0], ["Insert", "N1", ["is:is", "T"], 1], ["Insert", "N1", ["not:not", "T"], 2], ["Insert", "N1", ["none:None", "T"], 3]]
barentsen/aplpy@ae8ec5ca65dbfe9f6b0418d837db135e1a388193
Fixed checking of smooth=
[ { "sha": "dcf0756328ddd6b60c8ffe5da7e62c3b0f365e39", "filename": "aplpy/convolve_util.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/aplpy/blob/ae8ec5ca65dbfe9f6b0418d837db135e1a388193/aplpy%2Fconvolve_util.py", "raw_url": "https://github.com/barentsen/aplpy/raw/ae8ec5ca65dbfe9f6b0418d837db135e1a388193/aplpy%2Fconvolve_util.py", "contents_url": "https://api.github.com/repos/barentsen/aplpy/contents/aplpy%2Fconvolve_util.py?ref=ae8ec5ca65dbfe9f6b0418d837db135e1a388193", "patch": "@@ -6,7 +6,7 @@\n \n def convolve(image, smooth=3, kernel='gauss'):\n \n- if not np.isscalar(smooth):\n+ if smooth is not None and not np.isscalar(smooth):\n raise ValueError(\"smooth= should be an integer - for more complex \"\n \"kernels, pass an array containing the kernel \"\n \"to the kernel= option\")" } ]
aplpy
aaee663045b7581cd6969a914d507df2ef2f68d3
af7351c23ed44536d0b3a3fd2ac7c9634b6028eb
setup.py
https://github.com/barentsen/aplpy
true
false
false
@@ -60,7 +60,7 @@ scripts = [fname for fname in glob.glob(os.path.join('scripts', '*')) package_info = get_package_info(PACKAGENAME) # Add the project-global data -package_info['package_data']['astropy'] = ['data/*'] +package_info['package_data'][PACKAGENAME] = ['data/*'] setup(name=PACKAGENAME,
package_info [ 'package_data' ] [ 'astropy' ] = [ 'data/*' ]
package_info [ 'package_data' ] [ PACKAGENAME ] = [ 'data/*' ]
SINGLE_TOKEN
[["Insert", ["subscript", 3, 1, 3, 40], ["identifier:PACKAGENAME", "T"], 2], ["Delete", ["string:'astropy'", 3, 30, 3, 39]]]
barentsen/aplpy@aaee663045b7581cd6969a914d507df2ef2f68d3
Minor fix
[ { "sha": "c4d44ed6342136b9b5523b731ac327f03e68412d", "filename": "setup.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/aplpy/blob/aaee663045b7581cd6969a914d507df2ef2f68d3/setup.py", "raw_url": "https://github.com/barentsen/aplpy/raw/aaee663045b7581cd6969a914d507df2ef2f68d3/setup.py", "contents_url": "https://api.github.com/repos/barentsen/aplpy/contents/setup.py?ref=aaee663045b7581cd6969a914d507df2ef2f68d3", "patch": "@@ -60,7 +60,7 @@\n package_info = get_package_info(PACKAGENAME)\n \n # Add the project-global data\n-package_info['package_data']['astropy'] = ['data/*']\n+package_info['package_data'][PACKAGENAME] = ['data/*']\n \n \n setup(name=PACKAGENAME," } ]
aplpy
90f041695f841b06f2459ae99616254a043245c5
e0d56adbed4db8400b84ee457ddc72beaff3323a
aplpy/aplpy.py
https://github.com/barentsen/aplpy
true
false
true
@@ -888,7 +888,7 @@ class FITSFigure(Layers, Regions, Deprecated): elif not colors: cmap = mpl.cm.get_cmap('jet') - if data: + if data is not None: data_contour, header_contour, wcs_contour = self._get_hdu(data, \ hdu, False, convention=convention, dimensions=dimensions, \ slices=slices)
if data : data_contour , header_contour , wcs_contour = self . _get_hdu ( data , hdu , False , convention = convention , dimensions = dimensions , slices = slices )
if data is not None : data_contour , header_contour , wcs_contour = self . _get_hdu ( data , hdu , False , convention = convention , dimensions = dimensions , slices = slices )
SINGLE_STMT
[["Insert", ["if_statement", 3, 9, 6, 35], ["comparison_operator", "N0"], 1], ["Move", "N0", ["identifier:data", 3, 12, 3, 16], 0], ["Insert", "N0", ["is:is", "T"], 1], ["Insert", "N0", ["not:not", "T"], 2], ["Insert", "N0", ["none:None", "T"], 3]]
barentsen/aplpy@90f041695f841b06f2459ae99616254a043245c5
Fix test failure
[ { "sha": "e1827d63103e5f6d96881c0624c035324e88be7c", "filename": "aplpy/aplpy.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/aplpy/blob/90f041695f841b06f2459ae99616254a043245c5/aplpy%2Faplpy.py", "raw_url": "https://github.com/barentsen/aplpy/raw/90f041695f841b06f2459ae99616254a043245c5/aplpy%2Faplpy.py", "contents_url": "https://api.github.com/repos/barentsen/aplpy/contents/aplpy%2Faplpy.py?ref=90f041695f841b06f2459ae99616254a043245c5", "patch": "@@ -888,7 +888,7 @@ def show_contour(self, data=None, hdu=0, layer=None, levels=5, filled=False, cma\n elif not colors:\n cmap = mpl.cm.get_cmap('jet')\n \n- if data:\n+ if data is not None:\n data_contour, header_contour, wcs_contour = self._get_hdu(data, \\\n hdu, False, convention=convention, dimensions=dimensions, \\\n slices=slices)" } ]
ipython
0a9c9280cb0f68d2b243af45b33b2378ba28e26b
4fb37e0ec57ce369020a9b5bd9e740ff496a2c44
IPython/ipmaker.py
https://github.com/barentsen/ipython
true
false
false
@@ -210,7 +210,7 @@ def make_IPython(argv=None,user_ns=None,user_global_ns=None,debug=1, editor = '0', gthread = 0, help = 0, - interact = 1, + interact = 0, ipythondir = ipythondir_def, log = 0, logfile = '',
interact = 1 ,
interact = 0 ,
CHANGE_NUMERIC_LITERAL
[["Update", ["integer:1", 3, 34, 3, 35], "0"]]
barentsen/ipython@0a9c9280cb0f68d2b243af45b33b2378ba28e26b
ipmaker.py: 'interact' was 1 by default, switch it to 0 (this is a bug, -i was assumed)
[ { "sha": "e604feb5e8fd928fbfaf9c5e5589622982a7b142", "filename": "IPython/ipmaker.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/ipython/blob/0a9c9280cb0f68d2b243af45b33b2378ba28e26b/IPython%2Fipmaker.py", "raw_url": "https://github.com/barentsen/ipython/raw/0a9c9280cb0f68d2b243af45b33b2378ba28e26b/IPython%2Fipmaker.py", "contents_url": "https://api.github.com/repos/barentsen/ipython/contents/IPython%2Fipmaker.py?ref=0a9c9280cb0f68d2b243af45b33b2378ba28e26b", "patch": "@@ -210,7 +210,7 @@ def make_IPython(argv=None,user_ns=None,user_global_ns=None,debug=1,\n editor = '0',\n gthread = 0,\n help = 0,\n- interact = 1,\n+ interact = 0,\n ipythondir = ipythondir_def,\n log = 0,\n logfile = ''," } ]
ipython
d95a74cfab4f7175bbffc44e881aa34f27a8eabe
2ba49a1c9b9dc7b749be391b2b0eb6518ad612f6
IPython/gui/wx/ipython_view.py
https://github.com/barentsen/ipython
true
false
true
@@ -229,7 +229,7 @@ def setBackgroundColor(self,color): def getBackgroundColor(self,color): return self.background_color - def asyncWrite(self, evt): + def asyncWrite(self, text):
def asyncWrite ( self , evt ) :
def asyncWrite ( self , text ) :
CHANGE_IDENTIFIER_USED
[["Update", ["identifier:evt", 3, 26, 3, 29], "text"]]
barentsen/ipython@d95a74cfab4f7175bbffc44e881aa34f27a8eabe
Little bug correcton from last commit...
[ { "sha": "553c7deea9be85747f2311b3eb027b76cb6a9441", "filename": "IPython/gui/wx/ipython_view.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/ipython/blob/d95a74cfab4f7175bbffc44e881aa34f27a8eabe/IPython%2Fgui%2Fwx%2Fipython_view.py", "raw_url": "https://github.com/barentsen/ipython/raw/d95a74cfab4f7175bbffc44e881aa34f27a8eabe/IPython%2Fgui%2Fwx%2Fipython_view.py", "contents_url": "https://api.github.com/repos/barentsen/ipython/contents/IPython%2Fgui%2Fwx%2Fipython_view.py?ref=d95a74cfab4f7175bbffc44e881aa34f27a8eabe", "patch": "@@ -229,7 +229,7 @@ def setBackgroundColor(self,color):\n def getBackgroundColor(self,color):\n return self.background_color\n \n- def asyncWrite(self, evt):\n+ def asyncWrite(self, text):\n '''\n Write given text to buffer in an asynchroneous way.\n It is used from another thread to be able to acces the GUI." } ]
ipython
ea2c6247173badc12e61b855d71252c3f705f38b
d95a74cfab4f7175bbffc44e881aa34f27a8eabe
IPython/twshell.py
https://github.com/barentsen/ipython
true
false
false
@@ -200,7 +200,7 @@ def kill(self): -class IPShellTwisted(): +class IPShellTwisted:
class IPShellTwisted ( ) :
class IPShellTwisted :
SINGLE_STMT
[["Delete", ["(:(", 3, 21, 3, 22]], ["Delete", ["):)", 3, 22, 3, 23]], ["Delete", ["argument_list", 3, 21, 3, 23]]]
barentsen/ipython@ea2c6247173badc12e61b855d71252c3f705f38b
cody precord: small patch to fix a compatibility issue between python2.5 and 2.4
[ { "sha": "c14c15aeef92cfbe01ff5a964b2fb5a0b7f38135", "filename": "IPython/twshell.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/ipython/blob/ea2c6247173badc12e61b855d71252c3f705f38b/IPython%2Ftwshell.py", "raw_url": "https://github.com/barentsen/ipython/raw/ea2c6247173badc12e61b855d71252c3f705f38b/IPython%2Ftwshell.py", "contents_url": "https://api.github.com/repos/barentsen/ipython/contents/IPython%2Ftwshell.py?ref=ea2c6247173badc12e61b855d71252c3f705f38b", "patch": "@@ -200,7 +200,7 @@ def kill(self):\n \n \n \n-class IPShellTwisted():\n+class IPShellTwisted:\n \"\"\"Run a Twisted reactor while in an IPython session.\n \n Python commands can be passed to the thread where they will be" } ]
ipython
3bd4c6950eb4b1bc575c1785500f2efe7cb3f96c
c07792ce886adfb2d96ea6279712320df79d60e2
IPython/gui/wx/wxIPython.py
https://github.com/barentsen/ipython
true
false
true
@@ -98,7 +98,7 @@ def optionLoad(self): for line in lines: key = line.split('=')[0] - value = line.split('=')[1].replace('\n','') + value = line.split('=')[1].replace('\n','').replace('\r','') options[key]['value'] = value self.ipython_panel.reloadOptions(options)
value = line . split ( '=' ) [ 1 ] . replace ( '\n' , '' )
value = line . split ( '=' ) [ 1 ] . replace ( '\n' , '' ) . replace ( '\r' , '' )
ADD_METHOD_CALL
[["Insert", ["call", 3, 21, 3, 56], ["attribute", "N0"], 0], ["Insert", ["call", 3, 21, 3, 56], ["argument_list", "N1"], 1], ["Move", "N0", ["call", 3, 21, 3, 56], 0], ["Insert", "N0", [".:.", "T"], 1], ["Insert", "N0", ["identifier:replace", "T"], 2], ["Insert", "N1", ["(:(", "T"], 0], ["Insert", "N1", ["string:'\\r'", "T"], 1], ["Insert", "N1", [",:,", "T"], 2], ["Insert", "N1", ["string:''", "T"], 3], ["Insert", "N1", ["):)", "T"], 4]]
barentsen/ipython@3bd4c6950eb4b1bc575c1785500f2efe7cb3f96c
[/gui/wx] corrected a small bug under linux with '\r' in option file
[ { "sha": "9b1d84541de33f5b2df35de0b8031ee03d094960", "filename": "IPython/gui/wx/wxIPython.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/ipython/blob/3bd4c6950eb4b1bc575c1785500f2efe7cb3f96c/IPython%2Fgui%2Fwx%2FwxIPython.py", "raw_url": "https://github.com/barentsen/ipython/raw/3bd4c6950eb4b1bc575c1785500f2efe7cb3f96c/IPython%2Fgui%2Fwx%2FwxIPython.py", "contents_url": "https://api.github.com/repos/barentsen/ipython/contents/IPython%2Fgui%2Fwx%2FwxIPython.py?ref=3bd4c6950eb4b1bc575c1785500f2efe7cb3f96c", "patch": "@@ -98,7 +98,7 @@ def optionLoad(self):\n \n for line in lines:\n key = line.split('=')[0]\n- value = line.split('=')[1].replace('\\n','')\n+ value = line.split('=')[1].replace('\\n','').replace('\\r','')\n options[key]['value'] = value\n self.ipython_panel.reloadOptions(options)\n " } ]
ipython
65000c294cec7f8ad203b88177f42256eece5ed2
77a32ef2d8bbbcdfba196fc5b1723dd9ad6ee0f8
IPython/iplib.py
https://github.com/barentsen/ipython
true
false
true
@@ -2016,7 +2016,7 @@ def runsource(self, source, filename='<input>', symbol='single'): try: code = self.compile(source,filename,symbol) - except (OverflowError, SyntaxError, ValueError): + except (OverflowError, SyntaxError, ValueError, TypeError): # Case 1 self.showsyntaxerror(filename) return None
try : code = self . compile ( source , filename , symbol ) except ( OverflowError , SyntaxError , ValueError ) : self . showsyntaxerror ( filename ) return None
try : code = self . compile ( source , filename , symbol ) except ( OverflowError , SyntaxError , ValueError , TypeError ) : self . showsyntaxerror ( filename ) return None
ADD_ELEMENTS_TO_ITERABLE
[["Insert", ["tuple", 3, 16, 3, 56], [",:,", "T"], 6], ["Insert", ["tuple", 3, 16, 3, 56], ["identifier:TypeError", "T"], 7]]
barentsen/ipython@65000c294cec7f8ad203b88177f42256eece5ed2
Fix crash when input: foo(**dict(k,d[k] for k in vn))
[ { "sha": "1bb1650c6b918788c01b83771acd456ee35b1112", "filename": "IPython/iplib.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/ipython/blob/65000c294cec7f8ad203b88177f42256eece5ed2/IPython%2Fiplib.py", "raw_url": "https://github.com/barentsen/ipython/raw/65000c294cec7f8ad203b88177f42256eece5ed2/IPython%2Fiplib.py", "contents_url": "https://api.github.com/repos/barentsen/ipython/contents/IPython%2Fiplib.py?ref=65000c294cec7f8ad203b88177f42256eece5ed2", "patch": "@@ -2016,7 +2016,7 @@ def runsource(self, source, filename='<input>', symbol='single'):\n \n try:\n code = self.compile(source,filename,symbol)\n- except (OverflowError, SyntaxError, ValueError):\n+ except (OverflowError, SyntaxError, ValueError, TypeError):\n # Case 1\n self.showsyntaxerror(filename)\n return None" } ]
ipython
76838006469a29b6f39561d23a92e1f4ff7208f2
d89e51e9a26d954040a839ea3a084b5c8be4e6d8
IPython/Shell.py
https://github.com/barentsen/ipython
true
false
false
@@ -634,7 +634,7 @@ class MatplotlibMTShell(MatplotlibShellBase,MTInteractiveShell): def __init__(self,name,usage=None,rc=Struct(opts=None,args=None), user_ns=None,user_global_ns=None, **kw): - user_ns,b2 = self._matplotlib_config(name,user_ns) + user_ns,user_global_ns,b2 = self._matplotlib_config(name,user_ns,user_global_ns) MTInteractiveShell.__init__(self,name,usage,rc,user_ns,user_global_ns, banner2=b2,**kw)
user_ns , b2 = self . _matplotlib_config ( name , user_ns )
user_ns , user_global_ns , b2 = self . _matplotlib_config ( name , user_ns , user_global_ns )
SINGLE_STMT
[["Insert", ["pattern_list", 3, 9, 3, 19], ["identifier:user_global_ns", "T"], 2], ["Insert", ["pattern_list", 3, 9, 3, 19], [",:,", "T"], 3], ["Insert", ["argument_list", 3, 45, 3, 59], [",:,", "T"], 4], ["Insert", ["argument_list", 3, 45, 3, 59], ["identifier:user_global_ns", "T"], 5]]
barentsen/ipython@76838006469a29b6f39561d23a92e1f4ff7208f2
BUG: Remaining _matplotlib_config() usage fixed to follow the new API.
[ { "sha": "03b5243b135f343c7e1725c31bf1c1cb181a485f", "filename": "IPython/Shell.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/ipython/blob/76838006469a29b6f39561d23a92e1f4ff7208f2/IPython%2FShell.py", "raw_url": "https://github.com/barentsen/ipython/raw/76838006469a29b6f39561d23a92e1f4ff7208f2/IPython%2FShell.py", "contents_url": "https://api.github.com/repos/barentsen/ipython/contents/IPython%2FShell.py?ref=76838006469a29b6f39561d23a92e1f4ff7208f2", "patch": "@@ -634,7 +634,7 @@ class MatplotlibMTShell(MatplotlibShellBase,MTInteractiveShell):\n \n def __init__(self,name,usage=None,rc=Struct(opts=None,args=None),\n user_ns=None,user_global_ns=None, **kw):\n- user_ns,b2 = self._matplotlib_config(name,user_ns)\n+ user_ns,user_global_ns,b2 = self._matplotlib_config(name,user_ns,user_global_ns)\n MTInteractiveShell.__init__(self,name,usage,rc,user_ns,user_global_ns,\n banner2=b2,**kw)\n " } ]
ipython
e765d943928ac94fa68250c9768641b31bcc1305
42062fa7a7a3923b7a1d5cc6d2db11774aba7c8c
IPython/Extensions/ipy_miscapps.py
https://github.com/barentsen/ipython
true
false
true
@@ -9,7 +9,7 @@ def surfraw_completer(self,cmdline): """ Completer for 'surfraw' example:: - sr go<tob> => sr google + sr go<tab> => sr google """ compl = [l.split(None,1)[0] for l in os.popen('sr -elvi')]
""" Completer for 'surfraw' example:: sr go<tob> => sr google """
""" Completer for 'surfraw' example:: sr go<tab> => sr google """
CHANGE_STRING_LITERAL
[["Update", ["string:\"\"\" Completer for 'surfraw'\n \n example::\n sr go<tob> => sr google\n \n \"\"\"", 0, 5, 5, 8], "\"\"\" Completer for 'surfraw'\n \n example::\n sr go<tab> => sr google\n \n \"\"\""]]
barentsen/ipython@e765d943928ac94fa68250c9768641b31bcc1305
fix typo in surfraw completer docstring
[ { "sha": "5e05d57afd5111ec2fb69a44202e1776bc02edb5", "filename": "IPython/Extensions/ipy_miscapps.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/ipython/blob/e765d943928ac94fa68250c9768641b31bcc1305/IPython%2FExtensions%2Fipy_miscapps.py", "raw_url": "https://github.com/barentsen/ipython/raw/e765d943928ac94fa68250c9768641b31bcc1305/IPython%2FExtensions%2Fipy_miscapps.py", "contents_url": "https://api.github.com/repos/barentsen/ipython/contents/IPython%2FExtensions%2Fipy_miscapps.py?ref=e765d943928ac94fa68250c9768641b31bcc1305", "patch": "@@ -9,7 +9,7 @@ def surfraw_completer(self,cmdline):\n \"\"\" Completer for 'surfraw'\n \n example::\n- sr go<tob> => sr google\n+ sr go<tab> => sr google\n \n \"\"\"\n compl = [l.split(None,1)[0] for l in os.popen('sr -elvi')]" } ]
ipython
8bb889e7f27444c13cac70b33f295ce69071d073
ace1c373b028b2fc12fe9dd0798db20834932ce0
IPython/frontend/wx/wx_frontend.py
https://github.com/barentsen/ipython
true
false
true
@@ -173,7 +173,7 @@ def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, self.shell.user_ns['raw_input'] = self.raw_input - def raw_input(self, prompt): + def raw_input(self, prompt=''): """ A replacement from python's raw_input. """ self.new_prompt(prompt)
def raw_input ( self , prompt ) : """ A replacement from python's raw_input. """ self . new_prompt ( prompt )
def raw_input ( self , prompt = '' ) : """ A replacement from python's raw_input. """ self . new_prompt ( prompt )
SINGLE_STMT
[["Insert", ["parameters", 3, 18, 3, 32], ["default_parameter", "N0"], 3], ["Move", "N0", ["identifier:prompt", 3, 25, 3, 31], 0], ["Insert", "N0", ["=:=", "T"], 1], ["Insert", "N0", ["string:''", "T"], 2]]
barentsen/ipython@8bb889e7f27444c13cac70b33f295ce69071d073
Fix bug in raw_input that was requiring a manditory argument, whereas it should be optional.
[ { "sha": "d4182cc5ba47ea73d740e8b90fdc0dd08d90c457", "filename": "IPython/frontend/wx/wx_frontend.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/ipython/blob/8bb889e7f27444c13cac70b33f295ce69071d073/IPython%2Ffrontend%2Fwx%2Fwx_frontend.py", "raw_url": "https://github.com/barentsen/ipython/raw/8bb889e7f27444c13cac70b33f295ce69071d073/IPython%2Ffrontend%2Fwx%2Fwx_frontend.py", "contents_url": "https://api.github.com/repos/barentsen/ipython/contents/IPython%2Ffrontend%2Fwx%2Fwx_frontend.py?ref=8bb889e7f27444c13cac70b33f295ce69071d073", "patch": "@@ -173,7 +173,7 @@ def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition,\n self.shell.user_ns['raw_input'] = self.raw_input\n \n \n- def raw_input(self, prompt):\n+ def raw_input(self, prompt=''):\n \"\"\" A replacement from python's raw_input.\n \"\"\"\n self.new_prompt(prompt)" } ]
ipython
9a6ce8933c39efe1067fc5857664bf617a7526ee
5dbd77714a8c2309ae0d4e4e63fb81305c5ef9e9
IPython/frontend/wx/console_widget.py
https://github.com/barentsen/ipython
true
false
false
@@ -36,7 +36,7 @@ _DEFAULT_SIZE = 10 if sys.platform == 'darwin': - _DEFAULT_STYLE = 12 + _DEFAULT_STYLE = 14 _DEFAULT_STYLE = { 'stdout' : 'fore:#0000FF',
_DEFAULT_STYLE = 12
_DEFAULT_STYLE = 14
CHANGE_NUMERIC_LITERAL
[["Update", ["integer:12", 3, 22, 3, 24], "14"]]
barentsen/ipython@9a6ce8933c39efe1067fc5857664bf617a7526ee
Increase the default size under MacOSX.
[ { "sha": "4edd8e65d1c9a2b58314608fc45df540461a973b", "filename": "IPython/frontend/wx/console_widget.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/ipython/blob/9a6ce8933c39efe1067fc5857664bf617a7526ee/IPython%2Ffrontend%2Fwx%2Fconsole_widget.py", "raw_url": "https://github.com/barentsen/ipython/raw/9a6ce8933c39efe1067fc5857664bf617a7526ee/IPython%2Ffrontend%2Fwx%2Fconsole_widget.py", "contents_url": "https://api.github.com/repos/barentsen/ipython/contents/IPython%2Ffrontend%2Fwx%2Fconsole_widget.py?ref=9a6ce8933c39efe1067fc5857664bf617a7526ee", "patch": "@@ -36,7 +36,7 @@\n \n _DEFAULT_SIZE = 10\n if sys.platform == 'darwin':\n- _DEFAULT_STYLE = 12\n+ _DEFAULT_STYLE = 14\n \n _DEFAULT_STYLE = {\n 'stdout' : 'fore:#0000FF'," } ]
ipython
98a3eb15d11e85ed8b40bdd2204796f603e5f3fe
9a6ce8933c39efe1067fc5857664bf617a7526ee
IPython/frontend/wx/console_widget.py
https://github.com/barentsen/ipython
true
false
false
@@ -36,7 +36,7 @@ _DEFAULT_SIZE = 10 if sys.platform == 'darwin': - _DEFAULT_STYLE = 14 + _DEFAULT_SIZE = 12 _DEFAULT_STYLE = { 'stdout' : 'fore:#0000FF',
_DEFAULT_STYLE = 14
_DEFAULT_SIZE = 12
SINGLE_STMT
[["Update", ["identifier:_DEFAULT_STYLE", 3, 5, 3, 19], "_DEFAULT_SIZE"], ["Update", ["integer:14", 3, 22, 3, 24], "12"]]
barentsen/ipython@98a3eb15d11e85ed8b40bdd2204796f603e5f3fe
Fix the default size under MacOSX.
[ { "sha": "30ec0b81850caa6758aa9c5bbcf86e820e714681", "filename": "IPython/frontend/wx/console_widget.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/ipython/blob/98a3eb15d11e85ed8b40bdd2204796f603e5f3fe/IPython%2Ffrontend%2Fwx%2Fconsole_widget.py", "raw_url": "https://github.com/barentsen/ipython/raw/98a3eb15d11e85ed8b40bdd2204796f603e5f3fe/IPython%2Ffrontend%2Fwx%2Fconsole_widget.py", "contents_url": "https://api.github.com/repos/barentsen/ipython/contents/IPython%2Ffrontend%2Fwx%2Fconsole_widget.py?ref=98a3eb15d11e85ed8b40bdd2204796f603e5f3fe", "patch": "@@ -36,7 +36,7 @@\n \n _DEFAULT_SIZE = 10\n if sys.platform == 'darwin':\n- _DEFAULT_STYLE = 14\n+ _DEFAULT_SIZE = 12\n \n _DEFAULT_STYLE = {\n 'stdout' : 'fore:#0000FF'," } ]
ipython
51a69e50080c31bce83492b9fa840c8f1b6ae480
599d41d92e79a0d2e8e1c1b1fe341f2700accf2c
IPython/gui/wx/ipython_view.py
https://github.com/barentsen/ipython
true
false
true
@@ -412,7 +412,7 @@ def writeCompletion(self, possibilities): self.AutoCompSetIgnoreCase(False) self.AutoCompSetAutoHide(False) #let compute the length ot last word - splitter = [' ', '(', '[', '{'] + splitter = [' ', '(', '[', '{','='] last_word = self.getCurrentLine() for breaker in splitter: last_word = last_word.split(breaker)[-1]
splitter = [ ' ' , '(' , '[' , '{' ]
splitter = [ ' ' , '(' , '[' , '{' , '=' ]
ADD_ELEMENTS_TO_ITERABLE
[["Insert", ["list", 3, 24, 3, 44], [",:,", "T"], 8], ["Insert", ["list", 3, 24, 3, 44], ["string:'='", "T"], 9]]
barentsen/ipython@51a69e50080c31bce83492b9fa840c8f1b6ae480
Corrected completion with scintilla: if user had "a=xxx" and try to complete xxx than a= was removed. Related to bug #270558
[ { "sha": "d560ad53da3e349c3197e4f9e310557d9c2cc54a", "filename": "IPython/gui/wx/ipython_view.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/ipython/blob/51a69e50080c31bce83492b9fa840c8f1b6ae480/IPython%2Fgui%2Fwx%2Fipython_view.py", "raw_url": "https://github.com/barentsen/ipython/raw/51a69e50080c31bce83492b9fa840c8f1b6ae480/IPython%2Fgui%2Fwx%2Fipython_view.py", "contents_url": "https://api.github.com/repos/barentsen/ipython/contents/IPython%2Fgui%2Fwx%2Fipython_view.py?ref=51a69e50080c31bce83492b9fa840c8f1b6ae480", "patch": "@@ -412,7 +412,7 @@ def writeCompletion(self, possibilities):\n self.AutoCompSetIgnoreCase(False)\n self.AutoCompSetAutoHide(False)\n #let compute the length ot last word\n- splitter = [' ', '(', '[', '{']\n+ splitter = [' ', '(', '[', '{','=']\n last_word = self.getCurrentLine()\n for breaker in splitter:\n last_word = last_word.split(breaker)[-1]" } ]
electrumx
06693c58800e847a0f35d77708dedb5ab5fc0713
f4cc1e29263204e66d2c172bee7901af355b8402
server/session.py
https://github.com/Fair-Exchange/electrumx
true
false
true
@@ -377,7 +377,7 @@ class ElectrumX(SessionBase): try: return await self.transaction_broadcast(raw_tx) except RPCError as e: - message, = e.args + message = e.message if 'non-mandatory-script-verify-flag' in message: message = ( 'Your client produced a transaction that is not accepted '
message , = e . args
message = e . message
SINGLE_STMT
[["Move", ["assignment", 3, 13, 3, 30], ["identifier:message", 3, 13, 3, 20], 0], ["Update", ["identifier:args", 3, 26, 3, 30], "message"], ["Delete", [",:,", 3, 20, 3, 21]], ["Delete", ["pattern_list", 3, 13, 3, 21]]]
Fair-Exchange/electrumx@06693c58800e847a0f35d77708dedb5ab5fc0713
Fix handling of failed transaction broadcast
[ { "sha": "86b9e46aaba935c26289c6f6dc2ae3dbb88f5d2d", "filename": "server/session.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/Fair-Exchange/electrumx/blob/06693c58800e847a0f35d77708dedb5ab5fc0713/server%2Fsession.py", "raw_url": "https://github.com/Fair-Exchange/electrumx/raw/06693c58800e847a0f35d77708dedb5ab5fc0713/server%2Fsession.py", "contents_url": "https://api.github.com/repos/Fair-Exchange/electrumx/contents/server%2Fsession.py?ref=06693c58800e847a0f35d77708dedb5ab5fc0713", "patch": "@@ -377,7 +377,7 @@ async def transaction_broadcast_1_0(self, raw_tx):\n try:\n return await self.transaction_broadcast(raw_tx)\n except RPCError as e:\n- message, = e.args\n+ message = e.message\n if 'non-mandatory-script-verify-flag' in message:\n message = (\n 'Your client produced a transaction that is not accepted '" } ]
electrumx
4b7ab9c032f2176c672ddf386af416736a03125a
131344715ab753af6fef5bc3b74186f2e4bab9da
lib/coins.py
https://github.com/Fair-Exchange/electrumx
true
false
false
@@ -935,7 +935,7 @@ class Monacoin(Coin): XPRV_VERBYTES = bytes.fromhex("0488ADE4") P2PKH_VERBYTE = bytes.fromhex("32") P2SH_VERBYTES = [bytes.fromhex("37"), bytes.fromhex("05")] - WIF_BYTE = bytes.fromhex("B2") + WIF_BYTE = bytes.fromhex("B0") GENESIS_HASH = ('ff9f1c0116d19de7c9963845e129f9ed' '1bfc0b376eb54fd7afa42e0d418c8bb6') DESERIALIZER = DeserializerSegWit
WIF_BYTE = bytes . fromhex ( "B2" )
WIF_BYTE = bytes . fromhex ( "B0" )
CHANGE_STRING_LITERAL
[["Update", ["string:\"B2\"", 3, 30, 3, 34], "\"B0\""]]
Fair-Exchange/electrumx@4b7ab9c032f2176c672ddf386af416736a03125a
Fix WIF_BYTE for Monacoin (#259) WIF_BYTE was changed \xb2 to \xb0 since Monacoin-core develop-0.10 brance.
[ { "sha": "d5cd91dc5f0377b357387fadbd979c51bada0019", "filename": "lib/coins.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/Fair-Exchange/electrumx/blob/4b7ab9c032f2176c672ddf386af416736a03125a/lib%2Fcoins.py", "raw_url": "https://github.com/Fair-Exchange/electrumx/raw/4b7ab9c032f2176c672ddf386af416736a03125a/lib%2Fcoins.py", "contents_url": "https://api.github.com/repos/Fair-Exchange/electrumx/contents/lib%2Fcoins.py?ref=4b7ab9c032f2176c672ddf386af416736a03125a", "patch": "@@ -935,7 +935,7 @@ class Monacoin(Coin):\n XPRV_VERBYTES = bytes.fromhex(\"0488ADE4\")\n P2PKH_VERBYTE = bytes.fromhex(\"32\")\n P2SH_VERBYTES = [bytes.fromhex(\"37\"), bytes.fromhex(\"05\")]\n- WIF_BYTE = bytes.fromhex(\"B2\")\n+ WIF_BYTE = bytes.fromhex(\"B0\")\n GENESIS_HASH = ('ff9f1c0116d19de7c9963845e129f9ed'\n '1bfc0b376eb54fd7afa42e0d418c8bb6')\n DESERIALIZER = DeserializerSegWit" } ]
electrumx
b16a4f5a94b2f421ac02eddfd4a7a8cb34f50a04
0e6b59eb929eac896e977f9ce1ef7bf611c484c9
server/session.py
https://github.com/Fair-Exchange/electrumx
true
false
true
@@ -473,7 +473,7 @@ class DashElectrumX(ElectrumX): def set_protocol_handlers(self, ptuple): super().set_protocol_handlers(ptuple) mna_broadcast = (self.masternode_announce_broadcast if ptuple >= (1, 1) - else masternode_announce_broadcast_1_0) + else self.masternode_announce_broadcast_1_0) self.electrumx_handlers.update({ 'masternode.announce.broadcast': mna_broadcast, 'masternode.subscribe': self.masternode_subscribe,
mna_broadcast = ( self . masternode_announce_broadcast if ptuple >= ( 1 , 1 ) else masternode_announce_broadcast_1_0 )
mna_broadcast = ( self . masternode_announce_broadcast if ptuple >= ( 1 , 1 ) else self . masternode_announce_broadcast_1_0 )
SINGLE_STMT
[["Insert", ["conditional_expression", 2, 26, 3, 64], ["attribute", "N0"], 4], ["Insert", "N0", ["identifier:self", "T"], 0], ["Insert", "N0", [".:.", "T"], 1], ["Move", "N0", ["identifier:masternode_announce_broadcast_1_0", 3, 31, 3, 64], 2]]
Fair-Exchange/electrumx@b16a4f5a94b2f421ac02eddfd4a7a8cb34f50a04
fix DASH set_protocol_handlers (#271) fix NameError: name 'masternode_announce_broadcast_1_0' is not defined
[ { "sha": "e870f81468a6a5f9cf933e3b1b95ea730b58f420", "filename": "server/session.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/Fair-Exchange/electrumx/blob/b16a4f5a94b2f421ac02eddfd4a7a8cb34f50a04/server%2Fsession.py", "raw_url": "https://github.com/Fair-Exchange/electrumx/raw/b16a4f5a94b2f421ac02eddfd4a7a8cb34f50a04/server%2Fsession.py", "contents_url": "https://api.github.com/repos/Fair-Exchange/electrumx/contents/server%2Fsession.py?ref=b16a4f5a94b2f421ac02eddfd4a7a8cb34f50a04", "patch": "@@ -473,7 +473,7 @@ def __init__(self, *args, **kwargs):\n def set_protocol_handlers(self, ptuple):\n super().set_protocol_handlers(ptuple)\n mna_broadcast = (self.masternode_announce_broadcast if ptuple >= (1, 1)\n- else masternode_announce_broadcast_1_0)\n+ else self.masternode_announce_broadcast_1_0)\n self.electrumx_handlers.update({\n 'masternode.announce.broadcast': mna_broadcast,\n 'masternode.subscribe': self.masternode_subscribe," } ]
electrumx
e2b15d7fe117ef3ebe1e91c42772dbe82a8c5c1f
8293da1e10e837d47c8b76ece55314af6e45e662
server/daemon.py
https://github.com/Fair-Exchange/electrumx
true
false
true
@@ -249,7 +249,7 @@ class Daemon(LoggedClass): '''Return the fee estimate for the given parameters.''' if await self._is_rpc_available('estimatesmartfee'): estimate = await self._send_single('estimatesmartfee', params) - return estimate['feerate'] + return estimate.get('feerate', -1) return await self._send_single('estimatefee', params) async def getnetworkinfo(self):
return estimate [ 'feerate' ]
return estimate . get ( 'feerate' , - 1 )
SINGLE_STMT
[["Insert", ["return_statement", 3, 13, 3, 39], ["call", "N0"], 1], ["Insert", "N0", ["attribute", "N1"], 0], ["Insert", "N0", ["argument_list", "N2"], 1], ["Move", "N1", ["identifier:estimate", 3, 20, 3, 28], 0], ["Insert", "N1", [".:.", "T"], 1], ["Insert", "N1", ["identifier:get", "T"], 2], ["Insert", "N2", ["(:(", "T"], 0], ["Move", "N2", ["string:'feerate'", 3, 29, 3, 38], 1], ["Insert", "N2", [",:,", "T"], 2], ["Insert", "N2", ["unary_operator", "N3"], 3], ["Insert", "N2", ["):)", "T"], 4], ["Insert", "N3", ["-:-", "T"], 0], ["Insert", "N3", ["integer:1", "T"], 1], ["Delete", ["[:[", 3, 28, 3, 29]], ["Delete", ["]:]", 3, 38, 3, 39]], ["Delete", ["subscript", 3, 20, 3, 39]]]
Fair-Exchange/electrumx@e2b15d7fe117ef3ebe1e91c42772dbe82a8c5c1f
fix: estimatesmartfee when there is no feerate from daemon (#306)
[ { "sha": "d5554e8ec2ed81ed1461f911dc48b93db6b7e3a9", "filename": "server/daemon.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/Fair-Exchange/electrumx/blob/e2b15d7fe117ef3ebe1e91c42772dbe82a8c5c1f/server%2Fdaemon.py", "raw_url": "https://github.com/Fair-Exchange/electrumx/raw/e2b15d7fe117ef3ebe1e91c42772dbe82a8c5c1f/server%2Fdaemon.py", "contents_url": "https://api.github.com/repos/Fair-Exchange/electrumx/contents/server%2Fdaemon.py?ref=e2b15d7fe117ef3ebe1e91c42772dbe82a8c5c1f", "patch": "@@ -249,7 +249,7 @@ async def estimatefee(self, params):\n '''Return the fee estimate for the given parameters.'''\n if await self._is_rpc_available('estimatesmartfee'):\n estimate = await self._send_single('estimatesmartfee', params)\n- return estimate['feerate']\n+ return estimate.get('feerate', -1)\n return await self._send_single('estimatefee', params)\n \n async def getnetworkinfo(self):" } ]
electrumx
4f871cec0ff3c6050002bf4d76118be78346e3a7
6add2e5a9b77efeaf6d4e18ce98087dfa315d390
lib/coins.py
https://github.com/Fair-Exchange/electrumx
true
false
false
@@ -1288,7 +1288,7 @@ class Feathercoin(Coin): XPUB_VERBYTES = bytes.fromhex("0488BC26") XPRV_VERBYTES = bytes.fromhex("0488DAEE") P2PKH_VERBYTE = bytes.fromhex("0E") - P2SH_VERBYTES = [bytes.fromhex("32"), bytes.fromhex("05")] + P2SH_VERBYTES = [bytes.fromhex("05")] WIF_BYTE = bytes.fromhex("8E") GENESIS_HASH = ('12a765e31ffd4059bada1e25190f6e98' 'c99d9714d334efa41a195a7e7e04bfe2')
P2SH_VERBYTES = [ bytes . fromhex ( "32" ) , bytes . fromhex ( "05" ) ]
P2SH_VERBYTES = [ bytes . fromhex ( "05" ) ]
SINGLE_STMT
[["Delete", ["identifier:bytes", 3, 22, 3, 27]], ["Delete", [".:.", 3, 27, 3, 28]], ["Delete", ["identifier:fromhex", 3, 28, 3, 35]], ["Delete", ["attribute", 3, 22, 3, 35]], ["Delete", ["(:(", 3, 35, 3, 36]], ["Delete", ["string:\"32\"", 3, 36, 3, 40]], ["Delete", ["):)", 3, 40, 3, 41]], ["Delete", ["argument_list", 3, 35, 3, 41]], ["Delete", ["call", 3, 22, 3, 41]], ["Delete", [",:,", 3, 41, 3, 42]]]
Fair-Exchange/electrumx@4f871cec0ff3c6050002bf4d76118be78346e3a7
Feathercoin: Fix P2SH (#391)
[ { "sha": "30ed50b3d80108afceb4f4780668d4aba1e1f1a9", "filename": "lib/coins.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/Fair-Exchange/electrumx/blob/4f871cec0ff3c6050002bf4d76118be78346e3a7/lib%2Fcoins.py", "raw_url": "https://github.com/Fair-Exchange/electrumx/raw/4f871cec0ff3c6050002bf4d76118be78346e3a7/lib%2Fcoins.py", "contents_url": "https://api.github.com/repos/Fair-Exchange/electrumx/contents/lib%2Fcoins.py?ref=4f871cec0ff3c6050002bf4d76118be78346e3a7", "patch": "@@ -1288,7 +1288,7 @@ class Feathercoin(Coin):\n XPUB_VERBYTES = bytes.fromhex(\"0488BC26\")\n XPRV_VERBYTES = bytes.fromhex(\"0488DAEE\")\n P2PKH_VERBYTE = bytes.fromhex(\"0E\")\n- P2SH_VERBYTES = [bytes.fromhex(\"32\"), bytes.fromhex(\"05\")]\n+ P2SH_VERBYTES = [bytes.fromhex(\"05\")]\n WIF_BYTE = bytes.fromhex(\"8E\")\n GENESIS_HASH = ('12a765e31ffd4059bada1e25190f6e98'\n 'c99d9714d334efa41a195a7e7e04bfe2')" } ]
electrumx
5e3ab51e5eecbbfa16d981df101f3d7542fcf1db
b5e97b6d37c30434dbe96d7ba63345923b36779e
server/version.py
https://github.com/Fair-Exchange/electrumx
true
false
false
@@ -1,5 +1,5 @@ # Server name and protocol versions -VERSION = 'ElectrumX 1.3' +VERSION = 'ElectrumX 1.3+' PROTOCOL_MIN = '0.9' PROTOCOL_MAX = '1.2'
VERSION = 'ElectrumX 1.3'
VERSION = 'ElectrumX 1.3+'
CHANGE_STRING_LITERAL
[["Update", ["string:'ElectrumX 1.3'", 2, 11, 2, 26], "'ElectrumX 1.3+'"]]
Fair-Exchange/electrumx@5e3ab51e5eecbbfa16d981df101f3d7542fcf1db
Suffix a + to version post-release
[ { "sha": "3e40474034dd27d002a8c0165d82d14790d678d9", "filename": "server/version.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/Fair-Exchange/electrumx/blob/5e3ab51e5eecbbfa16d981df101f3d7542fcf1db/server%2Fversion.py", "raw_url": "https://github.com/Fair-Exchange/electrumx/raw/5e3ab51e5eecbbfa16d981df101f3d7542fcf1db/server%2Fversion.py", "contents_url": "https://api.github.com/repos/Fair-Exchange/electrumx/contents/server%2Fversion.py?ref=5e3ab51e5eecbbfa16d981df101f3d7542fcf1db", "patch": "@@ -1,5 +1,5 @@\n # Server name and protocol versions\n \n-VERSION = 'ElectrumX 1.3'\n+VERSION = 'ElectrumX 1.3+'\n PROTOCOL_MIN = '0.9'\n PROTOCOL_MAX = '1.2'" } ]
electrumx
19565a136d9ce84c2afc50e58ca974544d0e3cf3
74bc80ffbd7848ec315ade6647a5ba9709ce4fcf
server/db.py
https://github.com/Fair-Exchange/electrumx
true
false
true
@@ -95,7 +95,7 @@ class DB(util.LoggedClass): '''Open the databases. If already open they are closed and re-opened. When syncing we want to reserve a lot of open files for the - synchtonization. When serving clients we want the open files for + synchronization. When serving clients we want the open files for serving network connections. ''' def log_reason(message, is_for_sync):
'''Open the databases. If already open they are closed and re-opened. When syncing we want to reserve a lot of open files for the synchtonization. When serving clients we want the open files for serving network connections. '''
'''Open the databases. If already open they are closed and re-opened. When syncing we want to reserve a lot of open files for the synchronization. When serving clients we want the open files for serving network connections. '''
CHANGE_STRING_LITERAL
[["Update", ["string:'''Open the databases. If already open they are closed and re-opened.\n \n When syncing we want to reserve a lot of open files for the\n synchtonization. When serving clients we want the open files for\n serving network connections.\n '''", 0, 9, 5, 12], "'''Open the databases. If already open they are closed and re-opened.\n \n When syncing we want to reserve a lot of open files for the\n synchronization. When serving clients we want the open files for\n serving network connections.\n '''"]]
Fair-Exchange/electrumx@19565a136d9ce84c2afc50e58ca974544d0e3cf3
Fix small typo in server/db.py (#412)
[ { "sha": "123dbbd64f271da4bfbdbbb6aaefc91a931b2b21", "filename": "server/db.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/Fair-Exchange/electrumx/blob/19565a136d9ce84c2afc50e58ca974544d0e3cf3/server%2Fdb.py", "raw_url": "https://github.com/Fair-Exchange/electrumx/raw/19565a136d9ce84c2afc50e58ca974544d0e3cf3/server%2Fdb.py", "contents_url": "https://api.github.com/repos/Fair-Exchange/electrumx/contents/server%2Fdb.py?ref=19565a136d9ce84c2afc50e58ca974544d0e3cf3", "patch": "@@ -95,7 +95,7 @@ def open_dbs(self):\n '''Open the databases. If already open they are closed and re-opened.\n \n When syncing we want to reserve a lot of open files for the\n- synchtonization. When serving clients we want the open files for\n+ synchronization. When serving clients we want the open files for\n serving network connections.\n '''\n def log_reason(message, is_for_sync):" } ]
An-Introduction-To-Applied-Bioinformatics
312abbb36efb86e3bb82db0d2b98d0ecfc6c890f
9d4038fb0a73b0f00928bf7e1a5a4feae5e02e64
algorithms/pairwise_alignment.py
https://github.com/SuruchiFialoke/An-Introduction-To-Applied-Bioinformatics
true
false
false
@@ -31,10 +31,10 @@ blosum50 = {'A': {'A': 5.0, 'C': -1.0, 'D': -2.0, 'E': -1.0, 'F': -3.0, 'G': 0.0 'W': {'A': -3.0, 'C': -5.0, 'D': -5.0, 'E': -3.0, 'F': 1.0, 'G': -3.0, 'H': -3.0, 'I': -3.0, 'K': -3.0, 'L': -2.0, 'M': -1.0, 'N': -4.0, 'P': -4.0, 'Q': -1.0, 'R': -3.0, 'S': -4.0, 'T': -3.0, 'V': -3.0, 'W': 15.0, 'Y': 2.0}, 'Y': {'A': -2.0, 'C': -3.0, 'D': -3.0, 'E': -2.0, 'F': 4.0, 'G': -3.0, 'H': 2.0, 'I': -1.0, 'K': -2.0, 'L': -1.0, 'M': 0.0, 'N': -2.0, 'P': -3.0, 'Q': -1.0, 'R': -1.0, 'S': -2.0, 'T': -2.0, 'V': -1.0, 'W': 2.0, 'Y': 8.0}} -nucleotide_substitution_matrix = {'A':{'A':1,'C':-2,'G':-2,'T':-2}, - 'C':{'A':-2,'C':1,'G':-2,'T':-2}, - 'G':{'A':-2,'C':-2,'G':1,'T':-2}, - 'T':{'A':-2,'C':-2,'G':-2,'T':1}} +nt_substitution_matrix = {'A': {'A': 1, 'C': -2, 'G': -2, 'T': -2}, + 'C': {'A': -2, 'C': 1, 'G': -2, 'T': -2}, + 'G': {'A': -2, 'C': -2, 'G': 1, 'T': -2}, + 'T': {'A': -2, 'C': -2, 'G': -2, 'T': 1}} def format_matrix(row_headers, col_headers, data, hide_zeros=False): result = []
nucleotide_substitution_matrix = { 'A' : { 'A' : 1 , 'C' : - 2 , 'G' : - 2 , 'T' : - 2 } , 'C' : { 'A' : - 2 , 'C' : 1 , 'G' : - 2 , 'T' : - 2 } , 'G' : { 'A' : - 2 , 'C' : - 2 , 'G' : 1 , 'T' : - 2 } , 'T' : { 'A' : - 2 , 'C' : - 2 , 'G' : - 2 , 'T' : 1 } }
nt_substitution_matrix = { 'A' : { 'A' : 1 , 'C' : - 2 , 'G' : - 2 , 'T' : - 2 } , 'C' : { 'A' : - 2 , 'C' : 1 , 'G' : - 2 , 'T' : - 2 } , 'G' : { 'A' : - 2 , 'C' : - 2 , 'G' : 1 , 'T' : - 2 } , 'T' : { 'A' : - 2 , 'C' : - 2 , 'G' : - 2 , 'T' : 1 } }
CHANGE_IDENTIFIER_USED
[["Update", ["identifier:nucleotide_substitution_matrix", 3, 1, 3, 31], "nt_substitution_matrix"]]
SuruchiFialoke/An-Introduction-To-Applied-Bioinformatics@312abbb36efb86e3bb82db0d2b98d0ecfc6c890f
null
null
An-Introduction-To-Applied-Bioinformatics
f7a9804cf066e081e7efc9063d53c88f070eb6e4
5263054cf5b3a08dae6107f086cb9c0728214ea3
iab/algorithms/__init__.py
https://github.com/SuruchiFialoke/An-Introduction-To-Applied-Bioinformatics
true
false
false
@@ -539,7 +539,7 @@ def align(sequence1, sequence2, gap_penalty, substitution_matrix, local): from scipy.cluster.hierarchy import average, dendrogram, to_tree -from bipy.core.distance import SymmetricDistanceMatrix +from skbio.core.distance import SymmetricDistanceMatrix from iab.algorithms import nt_substitution_matrix, hamming_distance
from bipy . core . distance import SymmetricDistanceMatrix
from skbio . core . distance import SymmetricDistanceMatrix
CHANGE_IDENTIFIER_USED
[["Update", ["identifier:bipy", 3, 6, 3, 10], "skbio"]]
SuruchiFialoke/An-Introduction-To-Applied-Bioinformatics@f7a9804cf066e081e7efc9063d53c88f070eb6e4
null
null
An-Introduction-To-Applied-Bioinformatics
55cf13ad88d7368f3388cf68c8e4774c38ac5ce3
c5e00e6e4caffaa40823fc17b64b41e4e8d44588
runipynbs.py
https://github.com/SuruchiFialoke/An-Introduction-To-Applied-Bioinformatics
true
false
true
@@ -38,7 +38,7 @@ def main(): with open(nbpath) as nbfile: notebook = read(nbfile, 'json') - runner = NotebookRunner(notebook) + runner = NotebookRunner(notebook, mpl_inline=True) try: runner.run_notebook()
runner = NotebookRunner ( notebook )
runner = NotebookRunner ( notebook , mpl_inline = True )
SAME_FUNCTION_MORE_ARGS
[["Insert", ["argument_list", 3, 40, 3, 50], [",:,", "T"], 2], ["Insert", ["argument_list", 3, 40, 3, 50], ["keyword_argument", "N0"], 3], ["Insert", "N0", ["identifier:mpl_inline", "T"], 0], ["Insert", "N0", ["=:=", "T"], 1], ["Insert", "N0", ["true:True", "T"], 2]]
SuruchiFialoke/An-Introduction-To-Applied-Bioinformatics@55cf13ad88d7368f3388cf68c8e4774c38ac5ce3
null
null
An-Introduction-To-Applied-Bioinformatics
91e58038af221d16aa368ac8cebea0c380c36afb
562353c7e809721b59d889fb804ab77f531c8de5
setup.py
https://github.com/SuruchiFialoke/An-Introduction-To-Applied-Bioinformatics
true
false
false
@@ -42,7 +42,7 @@ setup(name='An-Introduction-To-Applied-Bioinformatics', maintainer_email='[email protected]', url='http://caporasolab.us/An-Introduction-To-Applied-Bioinformatics', packages=find_packages(), - install_requires=['scikit-bio == 0.2.0', 'ipython[all]', 'runipy', + install_requires=['scikit-bio == 0.2.1', 'ipython[all]', 'runipy', 'biom-format < 2.0.0', 'pyqi', 'pandas', 'future<=0.13.1'], classifiers=classifiers)
install_requires = [ 'scikit-bio == 0.2.0' , 'ipython[all]' , 'runipy' , 'biom-format < 2.0.0' , 'pyqi' , 'pandas' , 'future<=0.13.1' ] ,
install_requires = [ 'scikit-bio == 0.2.1' , 'ipython[all]' , 'runipy' , 'biom-format < 2.0.0' , 'pyqi' , 'pandas' , 'future<=0.13.1' ] ,
CHANGE_STRING_LITERAL
[["Update", ["string:'scikit-bio == 0.2.0'", 3, 25, 3, 46], "'scikit-bio == 0.2.1'"]]
SuruchiFialoke/An-Introduction-To-Applied-Bioinformatics@91e58038af221d16aa368ac8cebea0c380c36afb
null
null
An-Introduction-To-Applied-Bioinformatics
3bf49acc8e69c7a7d11d679e2f47f307734637df
e073f79faeae4a39be6fdd39a76f1324e6a0d872
setup.py
https://github.com/SuruchiFialoke/An-Introduction-To-Applied-Bioinformatics
true
false
false
@@ -45,7 +45,7 @@ setup(name='An-Introduction-To-Applied-Bioinformatics', install_requires=['scikit-bio >= 0.2.3, < 0.3.0', 'ipython[all] >= 3.0.0, < 4.0.0', 'runipy', 'seaborn >= 0.5.1, < 0.6.0', - 'qiime-default-reference >= 0.1.1, < 0.2.0', + 'qiime-default-reference >= 0.1.3, < 0.2.0', 'pandas >= 0.15.0, < 0.16.0', 'markdown2 >= 2.3.0', 'networkx >= 1.9.1, < 2.0.0'],
install_requires = [ 'scikit-bio >= 0.2.3, < 0.3.0' , 'ipython[all] >= 3.0.0, < 4.0.0' , 'runipy' , 'seaborn >= 0.5.1, < 0.6.0' , 'qiime-default-reference >= 0.1.1, < 0.2.0' , 'pandas >= 0.15.0, < 0.16.0' , 'markdown2 >= 2.3.0' , 'networkx >= 1.9.1, < 2.0.0' ] ,
install_requires = [ 'scikit-bio >= 0.2.3, < 0.3.0' , 'ipython[all] >= 3.0.0, < 4.0.0' , 'runipy' , 'seaborn >= 0.5.1, < 0.6.0' , 'qiime-default-reference >= 0.1.3, < 0.2.0' , 'pandas >= 0.15.0, < 0.16.0' , 'markdown2 >= 2.3.0' , 'networkx >= 1.9.1, < 2.0.0' ] ,
CHANGE_STRING_LITERAL
[["Update", ["string:'qiime-default-reference >= 0.1.1, < 0.2.0'", 3, 25, 3, 68], "'qiime-default-reference >= 0.1.3, < 0.2.0'"]]
SuruchiFialoke/An-Introduction-To-Applied-Bioinformatics@3bf49acc8e69c7a7d11d679e2f47f307734637df
null
null
aplpy
cafe2a6f78f707dd4ba5404ec1c5d2946ff85429
e80cd7d144103a5af81a43d5e0837f4b27a08c61
aplpy/ticks.py
https://github.com/barentsen/aplpy
true
false
true
@@ -76,7 +76,7 @@ class Ticks(object): self._ax2.yaxis.apl_auto_tick_spacing = True else: try: - au._check_format_spacing_consistency(self._ax1.xaxis.apl_label_form, au.Angle(degrees = spacing, latitude=True)) + au._check_format_spacing_consistency(self._ax1.yaxis.apl_label_form, au.Angle(degrees = spacing, latitude=True)) except au.InconsistentSpacing: warnings.warn("WARNING: Requested tick spacing format cannot be shown by current label format. The tick spacing will not be changed.") return
else : try : au . _check_format_spacing_consistency ( self . _ax1 . xaxis . apl_label_form , au . Angle ( degrees = spacing , latitude = True ) )
else : try : au . _check_format_spacing_consistency ( self . _ax1 . yaxis . apl_label_form , au . Angle ( degrees = spacing , latitude = True ) )
CHANGE_ATTRIBUTE_USED
[["Update", ["identifier:xaxis", 3, 64, 3, 69], "yaxis"]]
barentsen/aplpy@cafe2a6f78f707dd4ba5404ec1c5d2946ff85429
Bug fix git-svn-id: https://aplpy.svn.sourceforge.net/svnroot/aplpy/trunk/src/APLpy@253 2f3f69f2-b874-4715-96d5-35985bcb53a6
[ { "sha": "039c48029996364107d940b30d5921e4cbdc67a3", "filename": "aplpy/ticks.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/aplpy/blob/cafe2a6f78f707dd4ba5404ec1c5d2946ff85429/aplpy%2Fticks.py", "raw_url": "https://github.com/barentsen/aplpy/raw/cafe2a6f78f707dd4ba5404ec1c5d2946ff85429/aplpy%2Fticks.py", "contents_url": "https://api.github.com/repos/barentsen/aplpy/contents/aplpy%2Fticks.py?ref=cafe2a6f78f707dd4ba5404ec1c5d2946ff85429", "patch": "@@ -76,7 +76,7 @@ def set_yspacing(self, spacing):\n self._ax2.yaxis.apl_auto_tick_spacing = True\n else:\n try:\n- au._check_format_spacing_consistency(self._ax1.xaxis.apl_label_form, au.Angle(degrees = spacing, latitude=True))\n+ au._check_format_spacing_consistency(self._ax1.yaxis.apl_label_form, au.Angle(degrees = spacing, latitude=True))\n except au.InconsistentSpacing:\n warnings.warn(\"WARNING: Requested tick spacing format cannot be shown by current label format. The tick spacing will not be changed.\")\n return" } ]
ipython
698a167695626420626125a6ba4eb132a5c83f8c
4a72d6fe0b3582b0d52451cd34067f4ddd9a51a8
IPython/core/magic.py
https://github.com/barentsen/ipython
true
false
true
@@ -3365,7 +3365,7 @@ def magic_paste(self, parameter_s=''): # By default, echo back to terminal unless quiet mode is requested if not opts.has_key('q'): write = self.shell.write - write(block) + write(self.shell.pycolorize(block)) if not block.endswith('\n'): write('\n') write("## -- End pasted text --\n")
write ( block )
write ( self . shell . pycolorize ( block ) )
ADD_FUNCTION_AROUND_EXPRESSION
[["Insert", ["argument_list", 3, 18, 3, 25], ["(:(", "T"], 0], ["Insert", ["argument_list", 3, 18, 3, 25], ["call", "N0"], 1], ["Insert", ["argument_list", 3, 18, 3, 25], ["):)", "T"], 2], ["Insert", "N0", ["attribute", "N1"], 0], ["Move", "N0", ["argument_list", 3, 18, 3, 25], 1], ["Insert", "N1", ["attribute", "N2"], 0], ["Insert", "N1", [".:.", "T"], 1], ["Insert", "N1", ["identifier:pycolorize", "T"], 2], ["Insert", "N2", ["identifier:self", "T"], 0], ["Insert", "N2", [".:.", "T"], 1], ["Insert", "N2", ["identifier:shell", "T"], 2]]
barentsen/ipython@698a167695626420626125a6ba4eb132a5c83f8c
Tiny one-line fix to small colorization bug in magics.
[ { "sha": "20f436209b1f50092150041ce3e1237d495a701a", "filename": "IPython/core/magic.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/ipython/blob/698a167695626420626125a6ba4eb132a5c83f8c/IPython%2Fcore%2Fmagic.py", "raw_url": "https://github.com/barentsen/ipython/raw/698a167695626420626125a6ba4eb132a5c83f8c/IPython%2Fcore%2Fmagic.py", "contents_url": "https://api.github.com/repos/barentsen/ipython/contents/IPython%2Fcore%2Fmagic.py?ref=698a167695626420626125a6ba4eb132a5c83f8c", "patch": "@@ -3365,7 +3365,7 @@ def magic_paste(self, parameter_s=''):\n # By default, echo back to terminal unless quiet mode is requested\n if not opts.has_key('q'):\n write = self.shell.write\n- write(block)\n+ write(self.shell.pycolorize(block))\n if not block.endswith('\\n'):\n write('\\n')\n write(\"## -- End pasted text --\\n\")" } ]
ipython
b3fbb5e89654493892b7f97b403a79d278814655
d6fd1d8ae260543b4107e0581fab1ec0ea18052d
IPython/core/prefilter.py
https://github.com/barentsen/ipython
true
false
true
@@ -158,7 +158,7 @@ def ofind(self, ip): if not self._oinfo: - self._oinfo = ip._ofind(self.ifun) + self._oinfo = ip.shell._ofind(self.ifun) return self._oinfo def __str__(self):
self . _oinfo = ip . _ofind ( self . ifun )
self . _oinfo = ip . shell . _ofind ( self . ifun )
ADD_ATTRIBUTE_ACCESS
[["Insert", ["attribute", 1, 27, 1, 36], ["attribute", "N0"], 0], ["Insert", ["attribute", 1, 27, 1, 36], [".:.", "T"], 1], ["Move", "N0", ["identifier:ip", 1, 27, 1, 29], 0], ["Move", "N0", [".:.", 1, 29, 1, 30], 1], ["Insert", "N0", ["identifier:shell", "T"], 2]]
barentsen/ipython@b3fbb5e89654493892b7f97b403a79d278814655
Fix auto-quoting via ',' as the first character, which had broken in refactor.
[ { "sha": "ddc32ee0df8107922338b24af458b0f3a5b4fb4f", "filename": "IPython/core/prefilter.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/ipython/blob/b3fbb5e89654493892b7f97b403a79d278814655/IPython%2Fcore%2Fprefilter.py", "raw_url": "https://github.com/barentsen/ipython/raw/b3fbb5e89654493892b7f97b403a79d278814655/IPython%2Fcore%2Fprefilter.py", "contents_url": "https://api.github.com/repos/barentsen/ipython/contents/IPython%2Fcore%2Fprefilter.py?ref=b3fbb5e89654493892b7f97b403a79d278814655", "patch": "@@ -158,7 +158,7 @@ def ofind(self, ip):\n without worrying about *further* damaging state.\n \"\"\"\n if not self._oinfo:\n- self._oinfo = ip._ofind(self.ifun)\n+ self._oinfo = ip.shell._ofind(self.ifun)\n return self._oinfo\n \n def __str__(self): " } ]
ipython
ccaad9a2725e77df3c47cb9eb7ae71539f28bfda
45a628481df1e289e6bbae5daa6a18096288fcc8
IPython/core/crashhandler.py
https://github.com/barentsen/ipython
true
false
true
@@ -155,7 +155,7 @@ def __call__(self,etype, evalue, etb): # Construct report on disk report.write(self.make_report(traceback)) report.close() - raw_input("Press enter to exit:") + raw_input("Hit <Enter> to quit this message (your terminal may close):") def make_report(self,traceback): """Return a string containing a crash report."""
raw_input ( "Press enter to exit:" )
raw_input ( "Hit <Enter> to quit this message (your terminal may close):" )
CHANGE_STRING_LITERAL
[["Update", ["string:\"Press enter to exit:\"", 3, 19, 3, 41], "\"Hit <Enter> to quit this message (your terminal may close):\""]]
barentsen/ipython@ccaad9a2725e77df3c47cb9eb7ae71539f28bfda
Cleaner error message in crash handler.
[ { "sha": "ad8d340e4f61f7e21ea47d4fcd98c8ec27871891", "filename": "IPython/core/crashhandler.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/ipython/blob/ccaad9a2725e77df3c47cb9eb7ae71539f28bfda/IPython%2Fcore%2Fcrashhandler.py", "raw_url": "https://github.com/barentsen/ipython/raw/ccaad9a2725e77df3c47cb9eb7ae71539f28bfda/IPython%2Fcore%2Fcrashhandler.py", "contents_url": "https://api.github.com/repos/barentsen/ipython/contents/IPython%2Fcore%2Fcrashhandler.py?ref=ccaad9a2725e77df3c47cb9eb7ae71539f28bfda", "patch": "@@ -155,7 +155,7 @@ def __call__(self,etype, evalue, etb):\n # Construct report on disk\n report.write(self.make_report(traceback))\n report.close()\n- raw_input(\"Press enter to exit:\")\n+ raw_input(\"Hit <Enter> to quit this message (your terminal may close):\")\n \n def make_report(self,traceback):\n \"\"\"Return a string containing a crash report.\"\"\"" } ]
ipython
dc6cfd0529566f91cd2aa4ffeb2865d3708ce40f
21955d0eee8cebf78079f39c9196f1a522d3f9a5
IPython/frontend/tests/test_prefilterfrontend.py
https://github.com/barentsen/ipython
true
false
false
@@ -21,7 +21,7 @@ from IPython.frontend.prefilterfrontend import PrefilterFrontEnd from IPython.core.ipapi import get as get_ipython0 -from IPython.testing.plugin.ipdoctest import default_argv +from IPython.testing.tools import default_argv #----------------------------------------------------------------------------- # Support utilities
from IPython . testing . plugin . ipdoctest import default_argv
from IPython . testing . tools import default_argv
SINGLE_STMT
[["Update", ["identifier:plugin", 3, 22, 3, 28], "tools"], ["Delete", [".:.", 3, 28, 3, 29]], ["Delete", ["identifier:ipdoctest", 3, 29, 3, 38]]]
barentsen/ipython@dc6cfd0529566f91cd2aa4ffeb2865d3708ce40f
Fix test I broke when moving a file.
[ { "sha": "7bddcfc356b3647ee44e12555eef89ad9927f92c", "filename": "IPython/frontend/tests/test_prefilterfrontend.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/ipython/blob/dc6cfd0529566f91cd2aa4ffeb2865d3708ce40f/IPython%2Ffrontend%2Ftests%2Ftest_prefilterfrontend.py", "raw_url": "https://github.com/barentsen/ipython/raw/dc6cfd0529566f91cd2aa4ffeb2865d3708ce40f/IPython%2Ffrontend%2Ftests%2Ftest_prefilterfrontend.py", "contents_url": "https://api.github.com/repos/barentsen/ipython/contents/IPython%2Ffrontend%2Ftests%2Ftest_prefilterfrontend.py?ref=dc6cfd0529566f91cd2aa4ffeb2865d3708ce40f", "patch": "@@ -21,7 +21,7 @@\n \n from IPython.frontend.prefilterfrontend import PrefilterFrontEnd\n from IPython.core.ipapi import get as get_ipython0\n-from IPython.testing.plugin.ipdoctest import default_argv\n+from IPython.testing.tools import default_argv\n \n #-----------------------------------------------------------------------------\n # Support utilities" } ]
ipython
c47959886d9a619668dfc53e2b1d367dc562ce87
fc43d199a2d01a737e4a92a56f280dea60afc3d6
IPython/utils/genutils.py
https://github.com/barentsen/ipython
true
false
true
@@ -1753,7 +1753,7 @@ def expand_path(s): In [2]: os.environ['FOO']='test' - In [3]: shexp('variable FOO is $FOO') + In [3]: expand_path('variable FOO is $FOO') Out[3]: 'variable FOO is test'
In [ 3 ] : shexp ( 'variable FOO is $FOO' )
In [ 3 ] : expand_path ( 'variable FOO is $FOO' )
WRONG_FUNCTION_NAME
[["Update", ["identifier:shexp", 3, 16, 3, 21], "expand_path"]]
barentsen/ipython@c47959886d9a619668dfc53e2b1d367dc562ce87
Fix failing doctest in utils.
[ { "sha": "6fc204f61fccd6c33179fb6f1d01e4f13499371d", "filename": "IPython/utils/genutils.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/ipython/blob/c47959886d9a619668dfc53e2b1d367dc562ce87/IPython%2Futils%2Fgenutils.py", "raw_url": "https://github.com/barentsen/ipython/raw/c47959886d9a619668dfc53e2b1d367dc562ce87/IPython%2Futils%2Fgenutils.py", "contents_url": "https://api.github.com/repos/barentsen/ipython/contents/IPython%2Futils%2Fgenutils.py?ref=c47959886d9a619668dfc53e2b1d367dc562ce87", "patch": "@@ -1753,7 +1753,7 @@ def expand_path(s):\n \n In [2]: os.environ['FOO']='test'\n \n- In [3]: shexp('variable FOO is $FOO')\n+ In [3]: expand_path('variable FOO is $FOO')\n Out[3]: 'variable FOO is test'\n \"\"\"\n # This is a pretty subtle hack. When expand user is given a UNC path" } ]
ipython
6e6a85aea0c04221e5d45a5fe369da7031bade67
44dc248743ac90c28a3d28fa9effe987d9b98a8e
IPython/core/release.py
https://github.com/barentsen/ipython
true
false
false
@@ -23,7 +23,7 @@ development = True # change this to False to do a release version_base = '0.11' branch = 'ipython' -revision = '1313' +revision = '1321' if development: if branch == 'ipython':
revision = '1313'
revision = '1321'
CHANGE_STRING_LITERAL
[["Update", ["string:'1313'", 3, 12, 3, 18], "'1321'"]]
barentsen/ipython@6e6a85aea0c04221e5d45a5fe369da7031bade67
Update revnum; ready for testing, will upload and send to the dev list. Docs have been added, this is close to a reasonable RC for 0.11. As of this revision, we're down to 0 errors on linux and 1 on windows (that appears twice). The windows error is tracked here: https://bugs.launchpad.net/ipython/+bug/506839
[ { "sha": "d97814a2d82b3b3bfa1eeeb45044db2382061268", "filename": "IPython/core/release.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/ipython/blob/6e6a85aea0c04221e5d45a5fe369da7031bade67/IPython%2Fcore%2Frelease.py", "raw_url": "https://github.com/barentsen/ipython/raw/6e6a85aea0c04221e5d45a5fe369da7031bade67/IPython%2Fcore%2Frelease.py", "contents_url": "https://api.github.com/repos/barentsen/ipython/contents/IPython%2Fcore%2Frelease.py?ref=6e6a85aea0c04221e5d45a5fe369da7031bade67", "patch": "@@ -23,7 +23,7 @@\n development = True # change this to False to do a release\n version_base = '0.11'\n branch = 'ipython'\n-revision = '1313'\n+revision = '1321'\n \n if development:\n if branch == 'ipython':" } ]
ipython
cf36891419a9fa7382f4abe0aabbd34f7d40bcd4
61fcf214ab99f587c9365b7eb8827ad3a2915a1c
IPython/frontend/tests/test_prefilterfrontend.py
https://github.com/barentsen/ipython
true
false
true
@@ -169,7 +169,7 @@ def test_magic(): f.input_buffer += '%who' f._on_enter() out_value = f.out.getvalue() - assert_equal(out_value, 'In\tOut\tget_ipython\t\n') + assert_equal(out_value, 'Interactive namespace is empty.\n') @isolate_ipython0
assert_equal ( out_value , 'In\tOut\tget_ipython\t\n' )
assert_equal ( out_value , 'Interactive namespace is empty.\n' )
CHANGE_STRING_LITERAL
[["Update", ["string:'In\\tOut\\tget_ipython\\t\\n'", 3, 29, 3, 55], "'Interactive namespace is empty.\\n'"]]
barentsen/ipython@cf36891419a9fa7382f4abe0aabbd34f7d40bcd4
Fix test I'd broken with change of reporting in %who.
[ { "sha": "dab12e385af8d510dfc7da6a192b789ab57d6732", "filename": "IPython/frontend/tests/test_prefilterfrontend.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/ipython/blob/cf36891419a9fa7382f4abe0aabbd34f7d40bcd4/IPython%2Ffrontend%2Ftests%2Ftest_prefilterfrontend.py", "raw_url": "https://github.com/barentsen/ipython/raw/cf36891419a9fa7382f4abe0aabbd34f7d40bcd4/IPython%2Ffrontend%2Ftests%2Ftest_prefilterfrontend.py", "contents_url": "https://api.github.com/repos/barentsen/ipython/contents/IPython%2Ffrontend%2Ftests%2Ftest_prefilterfrontend.py?ref=cf36891419a9fa7382f4abe0aabbd34f7d40bcd4", "patch": "@@ -169,7 +169,7 @@ def test_magic():\n f.input_buffer += '%who'\n f._on_enter()\n out_value = f.out.getvalue()\n- assert_equal(out_value, 'In\\tOut\\tget_ipython\\t\\n')\n+ assert_equal(out_value, 'Interactive namespace is empty.\\n')\n \n \n @isolate_ipython0" } ]
ipython
ac681df1e5ff1db5ca6b98425fd2bad1a4646d5e
e7fa2331c7fa17f4d5bfba92f0f6e343d5b37e16
IPython/testing/iptest.py
https://github.com/barentsen/ipython
true
false
true
@@ -81,7 +81,9 @@ def test_for(mod): """Test to see if mod is importable.""" try: __import__(mod) - except ImportError: + except (ImportError, RuntimeError): + # GTK reports Runtime error if it can't be initialized even if it's + # importable. return False else: return True
try : __import__ ( mod ) except ImportError : return False else : return True
try : __import__ ( mod ) except ( ImportError , RuntimeError ) : return False else : return True
SINGLE_STMT
[["Insert", ["except_clause", 3, 5, 4, 21], ["tuple", "N0"], 1], ["Insert", "N0", ["(:(", "T"], 0], ["Move", "N0", ["identifier:ImportError", 3, 12, 3, 23], 1], ["Insert", "N0", [",:,", "T"], 2], ["Insert", "N0", ["identifier:RuntimeError", "T"], 3], ["Insert", "N0", ["):)", "T"], 4]]
barentsen/ipython@ac681df1e5ff1db5ca6b98425fd2bad1a4646d5e
Make the test suite runnable without X11 connections. This fix makes the test suite work in settings like a screen session that can import but not initialize GTK.
[ { "sha": "4d5a9ccff5f1ff699797aed2b14b797316bcc826", "filename": "IPython/testing/iptest.py", "status": "modified", "additions": 3, "deletions": 1, "changes": 4, "blob_url": "https://github.com/barentsen/ipython/blob/ac681df1e5ff1db5ca6b98425fd2bad1a4646d5e/IPython%2Ftesting%2Fiptest.py", "raw_url": "https://github.com/barentsen/ipython/raw/ac681df1e5ff1db5ca6b98425fd2bad1a4646d5e/IPython%2Ftesting%2Fiptest.py", "contents_url": "https://api.github.com/repos/barentsen/ipython/contents/IPython%2Ftesting%2Fiptest.py?ref=ac681df1e5ff1db5ca6b98425fd2bad1a4646d5e", "patch": "@@ -81,7 +81,9 @@ def test_for(mod):\n \"\"\"Test to see if mod is importable.\"\"\"\n try:\n __import__(mod)\n- except ImportError:\n+ except (ImportError, RuntimeError):\n+ # GTK reports Runtime error if it can't be initialized even if it's\n+ # importable.\n return False\n else:\n return True" } ]
ipython
b243e8a2f4211e1131606223a6087f6091aa5cc3
9d940dc9a73ed1781313af0c3bd63d3219661aa0
IPython/lib/pylabtools.py
https://github.com/barentsen/ipython
true
false
true
@@ -64,7 +64,7 @@ def pylab_activate(user_ns, gui=None, import_all=True): # In this case, we need to find what the appropriate gui selection call # should be for IPython, so we can activate inputhook accordingly b2g = dict(zip(g2b.values(),g2b.keys())) - gui = b2g[backend] + gui = b2g.get(backend, None) # We must set the desired backend before importing pylab matplotlib.use(backend)
gui = b2g [ backend ]
gui = b2g . get ( backend , None )
SINGLE_STMT
[["Insert", ["assignment", 3, 9, 3, 27], ["call", "N0"], 2], ["Insert", "N0", ["attribute", "N1"], 0], ["Insert", "N0", ["argument_list", "N2"], 1], ["Move", "N1", ["identifier:b2g", 3, 15, 3, 18], 0], ["Insert", "N1", [".:.", "T"], 1], ["Insert", "N1", ["identifier:get", "T"], 2], ["Insert", "N2", ["(:(", "T"], 0], ["Move", "N2", ["identifier:backend", 3, 19, 3, 26], 1], ["Insert", "N2", [",:,", "T"], 2], ["Insert", "N2", ["none:None", "T"], 3], ["Insert", "N2", ["):)", "T"], 4], ["Delete", ["[:[", 3, 18, 3, 19]], ["Delete", ["]:]", 3, 26, 3, 27]], ["Delete", ["subscript", 3, 15, 3, 27]]]
barentsen/ipython@b243e8a2f4211e1131606223a6087f6091aa5cc3
added default behavior, to allow for unhandled backends, such as 'MacOSX'
[ { "sha": "71497462c4e6f239d5c696a9f71d8012655c0695", "filename": "IPython/lib/pylabtools.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/ipython/blob/b243e8a2f4211e1131606223a6087f6091aa5cc3/IPython%2Flib%2Fpylabtools.py", "raw_url": "https://github.com/barentsen/ipython/raw/b243e8a2f4211e1131606223a6087f6091aa5cc3/IPython%2Flib%2Fpylabtools.py", "contents_url": "https://api.github.com/repos/barentsen/ipython/contents/IPython%2Flib%2Fpylabtools.py?ref=b243e8a2f4211e1131606223a6087f6091aa5cc3", "patch": "@@ -64,7 +64,7 @@ def pylab_activate(user_ns, gui=None, import_all=True):\n # In this case, we need to find what the appropriate gui selection call\n # should be for IPython, so we can activate inputhook accordingly\n b2g = dict(zip(g2b.values(),g2b.keys()))\n- gui = b2g[backend]\n+ gui = b2g.get(backend, None)\n \n # We must set the desired backend before importing pylab\n matplotlib.use(backend)" } ]
ipython
e12bada664753b87f75a3df866b7ef76f1972a1a
bd0f94b8a1af1f4232c7dbc09aa0bb32bf431d80
IPython/core/prefilter.py
https://github.com/barentsen/ipython
true
false
true
@@ -695,7 +695,7 @@ def check(self, line_info): return None # We have a likely magic method. Make sure we should actually call it. - if line_info.continue_prompt and not self.shell.multi_line_specials: + if line_info.continue_prompt and not self.prefilter_manager.multi_line_specials: return None head = line_info.ifun.split('.',1)[0]
if line_info . continue_prompt and not self . shell . multi_line_specials : return None
if line_info . continue_prompt and not self . prefilter_manager . multi_line_specials : return None
CHANGE_ATTRIBUTE_USED
[["Update", ["identifier:shell", 3, 51, 3, 56], "prefilter_manager"]]
barentsen/ipython@e12bada664753b87f75a3df866b7ef76f1972a1a
fix multi_line_specials error caused by e.g. test_prefilter/test_issue114
[ { "sha": "747db7c52d74ad2d23a1e53ce37e82514487de7c", "filename": "IPython/core/prefilter.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/barentsen/ipython/blob/e12bada664753b87f75a3df866b7ef76f1972a1a/IPython%2Fcore%2Fprefilter.py", "raw_url": "https://github.com/barentsen/ipython/raw/e12bada664753b87f75a3df866b7ef76f1972a1a/IPython%2Fcore%2Fprefilter.py", "contents_url": "https://api.github.com/repos/barentsen/ipython/contents/IPython%2Fcore%2Fprefilter.py?ref=e12bada664753b87f75a3df866b7ef76f1972a1a", "patch": "@@ -695,7 +695,7 @@ def check(self, line_info):\n return None\n \n # We have a likely magic method. Make sure we should actually call it.\n- if line_info.continue_prompt and not self.shell.multi_line_specials:\n+ if line_info.continue_prompt and not self.prefilter_manager.multi_line_specials:\n return None\n \n head = line_info.ifun.split('.',1)[0]" } ]
mnemonics
301c42170b6ee2e93ea708c0726adea7e0f40ca2
ae07ce4eeac2e1b4196818fb9c07d8230c390f7a
mnemonics/abstract/joinable.py
https://github.com/vovanz/mnemonics
true
false
true
@@ -19,7 +19,7 @@ def _cached_property(method): class Joinable(Iterable): @abstractmethod def __iter__(self): - pass + return NotImplemented def join(self, delimiter=''): return delimiter.join(self)
pass
return NotImplemented
SINGLE_STMT
[["Insert", ["block", 3, 9, 3, 13], ["return_statement", "N0"], 0], ["Insert", "N0", ["return:return", "T"], 0], ["Insert", "N0", ["identifier:NotImplemented", "T"], 1], ["Delete", ["pass:pass", 3, 9, 3, 13]], ["Delete", ["pass_statement", 3, 9, 3, 13]]]
vovanz/mnemonics@301c42170b6ee2e93ea708c0726adea7e0f40ca2
fix
[ { "sha": "6be5130a67b31b5694b42c9479d32387951cf5dc", "filename": "mnemonics/abstract/joinable.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/vovanz/mnemonics/blob/301c42170b6ee2e93ea708c0726adea7e0f40ca2/mnemonics%2Fabstract%2Fjoinable.py", "raw_url": "https://github.com/vovanz/mnemonics/raw/301c42170b6ee2e93ea708c0726adea7e0f40ca2/mnemonics%2Fabstract%2Fjoinable.py", "contents_url": "https://api.github.com/repos/vovanz/mnemonics/contents/mnemonics%2Fabstract%2Fjoinable.py?ref=301c42170b6ee2e93ea708c0726adea7e0f40ca2", "patch": "@@ -19,7 +19,7 @@ def wrapper(self, *args, **kwargs):\n class Joinable(Iterable):\n @abstractmethod\n def __iter__(self):\n- pass\n+ return NotImplemented\n \n def join(self, delimiter=''):\n return delimiter.join(self)" } ]
InsightFace_TF
6a4cc0b1f3b17fdc29e1cd0d35aa816ea716f637
3dc8883e246b846236b5672334600a18b2c9f106
losses/face_losses.py
https://github.com/alexliyang/InsightFace_TF
true
false
true
@@ -13,7 +13,7 @@ def arcface_loss(embedding, labels, out_num, w_init=None, s=64., m=0.5): cos_m = math.cos(m) sin_m = math.sin(m) - mm = sin_m * m * s + mm = sin_m * m # issue 1 threshold = math.cos(math.pi - m) with tf.variable_scope('arcface_loss'): # inputs and weights norm
mm = sin_m * m * s
mm = sin_m * m
SINGLE_STMT
[["Move", ["assignment", 2, 5, 2, 23], ["binary_operator", 2, 10, 2, 19], 2], ["Delete", ["*:*", 2, 20, 2, 21]], ["Delete", ["identifier:s", 2, 22, 2, 23]], ["Delete", ["binary_operator", 2, 10, 2, 23]]]
alexliyang/InsightFace_TF@6a4cc0b1f3b17fdc29e1cd0d35aa816ea716f637
fix #1
[ { "sha": "969cf16de1331ade81fe0401d6279d2c18b51769", "filename": "losses/face_losses.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/alexliyang/InsightFace_TF/blob/6a4cc0b1f3b17fdc29e1cd0d35aa816ea716f637/losses%2Fface_losses.py", "raw_url": "https://github.com/alexliyang/InsightFace_TF/raw/6a4cc0b1f3b17fdc29e1cd0d35aa816ea716f637/losses%2Fface_losses.py", "contents_url": "https://api.github.com/repos/alexliyang/InsightFace_TF/contents/losses%2Fface_losses.py?ref=6a4cc0b1f3b17fdc29e1cd0d35aa816ea716f637", "patch": "@@ -13,7 +13,7 @@ def arcface_loss(embedding, labels, out_num, w_init=None, s=64., m=0.5):\n '''\n cos_m = math.cos(m)\n sin_m = math.sin(m)\n- mm = sin_m * m * s\n+ mm = sin_m * m # issue 1\n threshold = math.cos(math.pi - m)\n with tf.variable_scope('arcface_loss'):\n # inputs and weights norm" } ]
explainshell
eaaf1007b1d9f90a538e7f209bb7ea621072177e
88656f7fe44eb559f1d8e90bc3d6d3327992e4a3
explainshell/parser.py
https://github.com/myheartsgoon/explainshell
true
false
true
@@ -118,7 +118,7 @@ class CommandLineParser(object): self.token = self.peek self.peek = self.next_token() if self.token[0] != tt: - raise ValueError('consume: expected %r', tt) + raise ValueError('consume: expected %r' % tt) def parse(self, source, posix=None): self.source = source
raise ValueError ( 'consume: expected %r' , tt )
raise ValueError ( 'consume: expected %r' % tt )
SINGLE_STMT
[["Insert", ["argument_list", 3, 29, 3, 57], ["binary_operator", "N0"], 1], ["Move", "N0", ["string:'consume: expected %r'", 3, 30, 3, 52], 0], ["Insert", "N0", ["%:%", "T"], 1], ["Move", "N0", ["identifier:tt", 3, 54, 3, 56], 2], ["Delete", [",:,", 3, 52, 3, 53]]]
myheartsgoon/explainshell@eaaf1007b1d9f90a538e7f209bb7ea621072177e
parser: fix ValueError raise
[ { "sha": "08a7159f1d350aac4954c9da9dad2db0d5900aa0", "filename": "explainshell/parser.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/myheartsgoon/explainshell/blob/eaaf1007b1d9f90a538e7f209bb7ea621072177e/explainshell%2Fparser.py", "raw_url": "https://github.com/myheartsgoon/explainshell/raw/eaaf1007b1d9f90a538e7f209bb7ea621072177e/explainshell%2Fparser.py", "contents_url": "https://api.github.com/repos/myheartsgoon/explainshell/contents/explainshell%2Fparser.py?ref=eaaf1007b1d9f90a538e7f209bb7ea621072177e", "patch": "@@ -118,7 +118,7 @@ def consume(self, tt):\n self.token = self.peek\n self.peek = self.next_token()\n if self.token[0] != tt:\n- raise ValueError('consume: expected %r', tt)\n+ raise ValueError('consume: expected %r' % tt)\n \n def parse(self, source, posix=None):\n self.source = source" } ]
explainshell
d88dc2c74854698a16b262c1f2f013c99ac84055
7920bad8fb8c0d488bb86ae0d19e8ed20aa0edca
explainshell/matcher.py
https://github.com/myheartsgoon/explainshell
true
false
true
@@ -253,7 +253,7 @@ class matcher(parser.NodeVisitor): raise self.groups[1].error def debugmatch(): - s = '\n'.join(['%d) %r = %r' % (i, self.s[m.start:m.end], m.text) for i, m in enumerate(self.matches)]) + s = '\n'.join(['%d) %r = %r' % (i, self.s[m.start:m.end], m.text) for i, m in enumerate(self.allmatches)]) return s logger.debug('%r matches:\n%s', self.s, debugmatch())
s = '\n' . join ( [ '%d) %r = %r' % ( i , self . s [ m . start : m . end ] , m . text ) for i , m in enumerate ( self . matches ) ] )
s = '\n' . join ( [ '%d) %r = %r' % ( i , self . s [ m . start : m . end ] , m . text ) for i , m in enumerate ( self . allmatches ) ] )
CHANGE_ATTRIBUTE_USED
[["Update", ["identifier:matches", 3, 106, 3, 113], "allmatches"]]
myheartsgoon/explainshell@d88dc2c74854698a16b262c1f2f013c99ac84055
matcher: print all matches in debugmatch
[ { "sha": "967bfb3f79e5d2a0a8fa978ec4b1c76cb869afb5", "filename": "explainshell/matcher.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/myheartsgoon/explainshell/blob/d88dc2c74854698a16b262c1f2f013c99ac84055/explainshell%2Fmatcher.py", "raw_url": "https://github.com/myheartsgoon/explainshell/raw/d88dc2c74854698a16b262c1f2f013c99ac84055/explainshell%2Fmatcher.py", "contents_url": "https://api.github.com/repos/myheartsgoon/explainshell/contents/explainshell%2Fmatcher.py?ref=d88dc2c74854698a16b262c1f2f013c99ac84055", "patch": "@@ -253,7 +253,7 @@ def match(self):\n raise self.groups[1].error\n \n def debugmatch():\n- s = '\\n'.join(['%d) %r = %r' % (i, self.s[m.start:m.end], m.text) for i, m in enumerate(self.matches)])\n+ s = '\\n'.join(['%d) %r = %r' % (i, self.s[m.start:m.end], m.text) for i, m in enumerate(self.allmatches)])\n return s\n \n logger.debug('%r matches:\\n%s', self.s, debugmatch())" } ]
shadowsocksr
0e340dec5ea09a7f0c4663b232f6297d050c75d8
f04c45a43d8ede15e68fd3e6aa1af7157a3949f6
local.py
https://github.com/myheartsgoon/shadowsocksr
true
false
true
@@ -103,7 +103,7 @@ class Socks5Server(SocketServer.StreamRequestHandler): sock = self.connection sock.recv(262) sock.send("\x05\x00") - data = self.rfile.read(4) + data = self.rfile.read(4) or '\x00' * 4 mode = ord(data[1]) if mode != 1: logging.warn('mode != 1')
data = self . rfile . read ( 4 )
data = self . rfile . read ( 4 ) or '\x00' * 4
SINGLE_STMT
[["Insert", ["assignment", 3, 13, 3, 38], ["boolean_operator", "N0"], 2], ["Move", "N0", ["call", 3, 20, 3, 38], 0], ["Insert", "N0", ["or:or", "T"], 1], ["Insert", "N0", ["binary_operator", "N1"], 2], ["Insert", "N1", ["string:'\\x00'", "T"], 0], ["Insert", "N1", ["*:*", "T"], 1], ["Insert", "N1", ["integer:4", "T"], 2]]
myheartsgoon/shadowsocksr@0e340dec5ea09a7f0c4663b232f6297d050c75d8
fix conn termination null data
[ { "sha": "899b8f84bd6de03a920562b6ae402655964c123b", "filename": "local.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/myheartsgoon/shadowsocksr/blob/0e340dec5ea09a7f0c4663b232f6297d050c75d8/local.py", "raw_url": "https://github.com/myheartsgoon/shadowsocksr/raw/0e340dec5ea09a7f0c4663b232f6297d050c75d8/local.py", "contents_url": "https://api.github.com/repos/myheartsgoon/shadowsocksr/contents/local.py?ref=0e340dec5ea09a7f0c4663b232f6297d050c75d8", "patch": "@@ -103,7 +103,7 @@ def handle(self):\n sock = self.connection\n sock.recv(262)\n sock.send(\"\\x05\\x00\")\n- data = self.rfile.read(4)\n+ data = self.rfile.read(4) or '\\x00' * 4\n mode = ord(data[1])\n if mode != 1:\n logging.warn('mode != 1')" } ]
shadowsocksr
a3323b36abf16fa432f046bc17add463b4575686
29c4fd7de931e8aefd87e56800e4542447437afd
shadowsocks/encrypt.py
https://github.com/myheartsgoon/shadowsocksr
true
false
false
@@ -98,7 +98,7 @@ method_supported = { 'cast5-cfb': (16, 8), 'des-cfb': (8, 8), 'idea-cfb': (16, 8), - 'rc2-cfb': (8, 8), + 'rc2-cfb': (16, 8), 'rc4': (16, 0), 'seed-cfb': (16, 16), }
'rc2-cfb' : ( 8 , 8 ) ,
'rc2-cfb' : ( 16 , 8 ) ,
CHANGE_NUMERIC_LITERAL
[["Update", ["integer:8", 3, 17, 3, 18], "16"]]
myheartsgoon/shadowsocksr@a3323b36abf16fa432f046bc17add463b4575686
fix rc2 key length
[ { "sha": "09a6db6b239b0730be4add497b11dca2595edce3", "filename": "shadowsocks/encrypt.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/myheartsgoon/shadowsocksr/blob/a3323b36abf16fa432f046bc17add463b4575686/shadowsocks%2Fencrypt.py", "raw_url": "https://github.com/myheartsgoon/shadowsocksr/raw/a3323b36abf16fa432f046bc17add463b4575686/shadowsocks%2Fencrypt.py", "contents_url": "https://api.github.com/repos/myheartsgoon/shadowsocksr/contents/shadowsocks%2Fencrypt.py?ref=a3323b36abf16fa432f046bc17add463b4575686", "patch": "@@ -98,7 +98,7 @@ def EVP_BytesToKey(password, key_len, iv_len):\n 'cast5-cfb': (16, 8),\n 'des-cfb': (8, 8),\n 'idea-cfb': (16, 8),\n- 'rc2-cfb': (8, 8),\n+ 'rc2-cfb': (16, 8),\n 'rc4': (16, 0),\n 'seed-cfb': (16, 16),\n }" } ]
movements-erpnext
9f9426689239338095b78a8d2b9ad9a5a4447b8a
01a84739960cec5a6351b23923e6088270526eb1
erpnext/accounts/doctype/payment_request/payment_request.py
https://github.com/ahmadRagheb/movements-erpnext
true
false
true
@@ -211,7 +211,7 @@ def get_amount(ref_doc, dt): grand_total = flt(ref_doc.grand_total) - flt(ref_doc.advance_paid) if dt == "Sales Invoice": - grand_total = flt(ref_doc.outstanding_amount) + grand_total = flt(ref_doc.grand_total) if grand_total > 0 : return grand_total
grand_total = flt ( ref_doc . outstanding_amount )
grand_total = flt ( ref_doc . grand_total )
CHANGE_ATTRIBUTE_USED
[["Update", ["identifier:outstanding_amount", 3, 29, 3, 47], "grand_total"]]
ahmadRagheb/movements-erpnext@9f9426689239338095b78a8d2b9ad9a5a4447b8a
[fixes] fetch value from grand total field while creating payment request from si
[ { "sha": "0c4619198e32c7b3515e2922151228cfd5c2a7c1", "filename": "erpnext/accounts/doctype/payment_request/payment_request.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/ahmadRagheb/movements-erpnext/blob/9f9426689239338095b78a8d2b9ad9a5a4447b8a/erpnext%2Faccounts%2Fdoctype%2Fpayment_request%2Fpayment_request.py", "raw_url": "https://github.com/ahmadRagheb/movements-erpnext/raw/9f9426689239338095b78a8d2b9ad9a5a4447b8a/erpnext%2Faccounts%2Fdoctype%2Fpayment_request%2Fpayment_request.py", "contents_url": "https://api.github.com/repos/ahmadRagheb/movements-erpnext/contents/erpnext%2Faccounts%2Fdoctype%2Fpayment_request%2Fpayment_request.py?ref=9f9426689239338095b78a8d2b9ad9a5a4447b8a", "patch": "@@ -211,7 +211,7 @@ def get_amount(ref_doc, dt):\n \t\tgrand_total = flt(ref_doc.grand_total) - flt(ref_doc.advance_paid)\n \t\t\n \tif dt == \"Sales Invoice\":\n-\t\tgrand_total = flt(ref_doc.outstanding_amount)\n+\t\tgrand_total = flt(ref_doc.grand_total)\n \t\t\n \tif grand_total > 0 :\n \t\treturn grand_total" } ]
movements-erpnext
a61930e7a786ada2430e3e9ed20a737aa7e2df12
22d4a7e7425f46fb3d0afd5257192bebd525c83f
erpnext/patches/v6_20x/rename_project_name_to_project.py
https://github.com/ahmadRagheb/movements-erpnext
true
false
true
@@ -12,6 +12,6 @@ def execute(): "Purchase Receipt Item", "Supplier Quotation Item"] for doctype in doc_list: - frappe.reload_doctype(doctype) + frappe.reload_doctype(doctype, force=True) rename_field(doctype, "project_name", "project") \ No newline at end of file
frappe . reload_doctype ( doctype )
frappe . reload_doctype ( doctype , force = True )
SAME_FUNCTION_MORE_ARGS
[["Insert", ["argument_list", 3, 24, 3, 33], [",:,", "T"], 2], ["Insert", ["argument_list", 3, 24, 3, 33], ["keyword_argument", "N0"], 3], ["Insert", "N0", ["identifier:force", "T"], 0], ["Insert", "N0", ["=:=", "T"], 1], ["Insert", "N0", ["true:True", "T"], 2]]
ahmadRagheb/movements-erpnext@a61930e7a786ada2430e3e9ed20a737aa7e2df12
[fix] reload doctype forcefully to rename project field
[ { "sha": "8851451cb0593de53d730450a592f25a43ecda8c", "filename": "erpnext/patches/v6_20x/rename_project_name_to_project.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/ahmadRagheb/movements-erpnext/blob/a61930e7a786ada2430e3e9ed20a737aa7e2df12/erpnext%2Fpatches%2Fv6_20x%2Frename_project_name_to_project.py", "raw_url": "https://github.com/ahmadRagheb/movements-erpnext/raw/a61930e7a786ada2430e3e9ed20a737aa7e2df12/erpnext%2Fpatches%2Fv6_20x%2Frename_project_name_to_project.py", "contents_url": "https://api.github.com/repos/ahmadRagheb/movements-erpnext/contents/erpnext%2Fpatches%2Fv6_20x%2Frename_project_name_to_project.py?ref=a61930e7a786ada2430e3e9ed20a737aa7e2df12", "patch": "@@ -12,6 +12,6 @@ def execute():\n \t\t\"Purchase Receipt Item\", \"Supplier Quotation Item\"]\n \t\n \tfor doctype in doc_list:\n-\t\tfrappe.reload_doctype(doctype)\n+\t\tfrappe.reload_doctype(doctype, force=True)\n \t\trename_field(doctype, \"project_name\", \"project\")\n \t\n\\ No newline at end of file" } ]
movements-erpnext
240f629458ed6076137c8e05383e619633f99df2
76db1d702ff3f9e5d02178736a104394085684ac
erpnext/buying/doctype/purchase_common/purchase_common.py
https://github.com/ahmadRagheb/movements-erpnext
true
false
true
@@ -69,7 +69,7 @@ class PurchaseCommon(BuyingController): frappe.throw(_("Warehouse is mandatory for stock Item {0} in row {1}").format(d.item_code, d.idx)) # validate purchase item - if not (obj.doctype=="Material Request" and getattr(obj, "material_request_type", None)=="Material Transfer"): + if obj.doctype=="Material Request" and getattr(obj, "material_request_type", None)=="Purchase": if item.is_purchase_item != 1 and item.is_sub_contracted_item != 1: frappe.throw(_("{0} must be a Purchased or Sub-Contracted Item in row {1}").format(d.item_code, d.idx))
if not ( obj . doctype == "Material Request" and getattr ( obj , "material_request_type" , None ) == "Material Transfer" ) : if item . is_purchase_item != 1 and item . is_sub_contracted_item != 1 : frappe . throw ( _ ( "{0} must be a Purchased or Sub-Contracted Item in row {1}" ) . format ( d . item_code , d . idx ) )
if obj . doctype == "Material Request" and getattr ( obj , "material_request_type" , None ) == "Purchase" : if item . is_purchase_item != 1 and item . is_sub_contracted_item != 1 : frappe . throw ( _ ( "{0} must be a Purchased or Sub-Contracted Item in row {1}" ) . format ( d . item_code , d . idx ) )
SINGLE_STMT
[["Move", ["if_statement", 3, 4, 5, 109], ["boolean_operator", 3, 12, 3, 112], 1], ["Update", ["string:\"Material Transfer\"", 3, 93, 3, 112], "\"Purchase\""], ["Delete", ["not:not", 3, 7, 3, 10]], ["Delete", ["(:(", 3, 11, 3, 12]], ["Delete", ["):)", 3, 112, 3, 113]], ["Delete", ["parenthesized_expression", 3, 11, 3, 113]], ["Delete", ["not_operator", 3, 7, 3, 113]]]
ahmadRagheb/movements-erpnext@240f629458ed6076137c8e05383e619633f99df2
Validate purchase item only if material request type is purchase
[ { "sha": "be704e9fbaadb8fea30ec4928f08dc71ee68c005", "filename": "erpnext/buying/doctype/purchase_common/purchase_common.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/ahmadRagheb/movements-erpnext/blob/240f629458ed6076137c8e05383e619633f99df2/erpnext%2Fbuying%2Fdoctype%2Fpurchase_common%2Fpurchase_common.py", "raw_url": "https://github.com/ahmadRagheb/movements-erpnext/raw/240f629458ed6076137c8e05383e619633f99df2/erpnext%2Fbuying%2Fdoctype%2Fpurchase_common%2Fpurchase_common.py", "contents_url": "https://api.github.com/repos/ahmadRagheb/movements-erpnext/contents/erpnext%2Fbuying%2Fdoctype%2Fpurchase_common%2Fpurchase_common.py?ref=240f629458ed6076137c8e05383e619633f99df2", "patch": "@@ -69,7 +69,7 @@ def validate_for_items(self, obj):\n \t\t\t\tfrappe.throw(_(\"Warehouse is mandatory for stock Item {0} in row {1}\").format(d.item_code, d.idx))\n \n \t\t\t# validate purchase item\n-\t\t\tif not (obj.doctype==\"Material Request\" and getattr(obj, \"material_request_type\", None)==\"Material Transfer\"):\n+\t\t\tif obj.doctype==\"Material Request\" and getattr(obj, \"material_request_type\", None)==\"Purchase\":\n \t\t\t\tif item.is_purchase_item != 1 and item.is_sub_contracted_item != 1:\n \t\t\t\t\tfrappe.throw(_(\"{0} must be a Purchased or Sub-Contracted Item in row {1}\").format(d.item_code, d.idx))\n " } ]
movements-erpnext
2d71a51a087d7dd5f55b90dca1ddf3098f3f2d6a
8ffc42594a00c29df4f6386c4353ac827b1eb2a5
patches/patch_list.py
https://github.com/ahmadRagheb/movements-erpnext
true
false
false
@@ -251,5 +251,5 @@ patch_list = [ "patches.july_2013.p02_copy_shipping_address", "patches.july_2013.p03_cost_center_company", "execute:webnotes.bean('Style Settings').save() #2013-07-16", - "patches:july_2013.p04_merge_duplicate_leads" + "patches.july_2013.p04_merge_duplicate_leads", ] \ No newline at end of file
"patches:july_2013.p04_merge_duplicate_leads"
"patches.july_2013.p04_merge_duplicate_leads" ,
SINGLE_STMT
[["Update", ["string:\"patches:july_2013.p04_merge_duplicate_leads\"", 3, 2, 3, 47], "\"patches.july_2013.p04_merge_duplicate_leads\""], ["Insert", ["expression_statement", 3, 2, 3, 47], [",:,", "T"], 1]]
ahmadRagheb/movements-erpnext@2d71a51a087d7dd5f55b90dca1ddf3098f3f2d6a
[minor] fixed patch
[ { "sha": "d6f4424219c161efb13c9e12ab5a9a2ae98dfd30", "filename": "patches/patch_list.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/ahmadRagheb/movements-erpnext/blob/2d71a51a087d7dd5f55b90dca1ddf3098f3f2d6a/patches%2Fpatch_list.py", "raw_url": "https://github.com/ahmadRagheb/movements-erpnext/raw/2d71a51a087d7dd5f55b90dca1ddf3098f3f2d6a/patches%2Fpatch_list.py", "contents_url": "https://api.github.com/repos/ahmadRagheb/movements-erpnext/contents/patches%2Fpatch_list.py?ref=2d71a51a087d7dd5f55b90dca1ddf3098f3f2d6a", "patch": "@@ -251,5 +251,5 @@\n \t\"patches.july_2013.p02_copy_shipping_address\",\n \t\"patches.july_2013.p03_cost_center_company\",\n \t\"execute:webnotes.bean('Style Settings').save() #2013-07-16\",\n-\t\"patches:july_2013.p04_merge_duplicate_leads\"\n+\t\"patches.july_2013.p04_merge_duplicate_leads\",\n ]\n\\ No newline at end of file" } ]
movements-erpnext
1ba072fa9bb6e1cfc172edc099adc1604dbcbe7e
55da1ff98adf86ed3abeb3efc4df4deeb898871f
patches/july_2013/p05_custom_doctypes_in_list_view.py
https://github.com/ahmadRagheb/movements-erpnext
true
false
true
@@ -2,7 +2,7 @@ import webnotes from webnotes.model import no_value_fields def execute(): - for dt in webnotes.conn.sql("""select name from `tabDocType` where custom=1"""): + for dt in webnotes.conn.sql_list("""select name from `tabDocType` where custom=1"""): dtbean = webnotes.bean("DocType", dt) if any((df.in_list_view for df in dtbean.doclist.get({"doctype": "DocField", "parent": dt}))):
for dt in webnotes . conn . sql ( """select name from `tabDocType` where custom=1""" ) : dtbean = webnotes . bean ( "DocType" , dt ) if any ( ( df . in_list_view for df in dtbean . doclist . get ( { "doctype" : "DocField" , "parent" : dt } ) ) ) :
for dt in webnotes . conn . sql_list ( """select name from `tabDocType` where custom=1""" ) : dtbean = webnotes . bean ( "DocType" , dt ) if any ( ( df . in_list_view for df in dtbean . doclist . get ( { "doctype" : "DocField" , "parent" : dt } ) ) ) :
WRONG_FUNCTION_NAME
[["Update", ["identifier:sql", 3, 26, 3, 29], "sql_list"]]
ahmadRagheb/movements-erpnext@1ba072fa9bb6e1cfc172edc099adc1604dbcbe7e
[fix] [patch] check in_list_view for Custom DocTypes
[ { "sha": "867bead676c58305dd5f6faaba411f86ac3fb979", "filename": "patches/july_2013/p05_custom_doctypes_in_list_view.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/ahmadRagheb/movements-erpnext/blob/1ba072fa9bb6e1cfc172edc099adc1604dbcbe7e/patches%2Fjuly_2013%2Fp05_custom_doctypes_in_list_view.py", "raw_url": "https://github.com/ahmadRagheb/movements-erpnext/raw/1ba072fa9bb6e1cfc172edc099adc1604dbcbe7e/patches%2Fjuly_2013%2Fp05_custom_doctypes_in_list_view.py", "contents_url": "https://api.github.com/repos/ahmadRagheb/movements-erpnext/contents/patches%2Fjuly_2013%2Fp05_custom_doctypes_in_list_view.py?ref=1ba072fa9bb6e1cfc172edc099adc1604dbcbe7e", "patch": "@@ -2,7 +2,7 @@\n from webnotes.model import no_value_fields\n \n def execute():\n-\tfor dt in webnotes.conn.sql(\"\"\"select name from `tabDocType` where custom=1\"\"\"):\n+\tfor dt in webnotes.conn.sql_list(\"\"\"select name from `tabDocType` where custom=1\"\"\"):\n \t\tdtbean = webnotes.bean(\"DocType\", dt)\n \t\t\n \t\tif any((df.in_list_view for df in dtbean.doclist.get({\"doctype\": \"DocField\", \"parent\": dt}))):" } ]
movements-erpnext
23de6df72efe90dc58e087f907aaf85ea1135a5a
52b049145bb5dce6cef0b178f91a839dfab2c166
setup/doctype/setup_control/setup_control.py
https://github.com/ahmadRagheb/movements-erpnext
true
false
true
@@ -256,7 +256,7 @@ def create_territories(): if name and not webnotes.conn.exists("Territory", name): webnotes.bean({ "doctype": "Territory", - "territory_name": name, + "territory_name": name.replace("'", ""), "parent_territory": root_territory, "is_group": "No" }).insert()
webnotes . bean ( { "doctype" : "Territory" , "territory_name" : name , "parent_territory" : root_territory , "is_group" : "No" } ) . insert ( )
webnotes . bean ( { "doctype" : "Territory" , "territory_name" : name . replace ( "'" , "" ) , "parent_territory" : root_territory , "is_group" : "No" } ) . insert ( )
ADD_METHOD_CALL
[["Insert", ["pair", 3, 5, 3, 27], ["call", "N0"], 2], ["Insert", "N0", ["attribute", "N1"], 0], ["Insert", "N0", ["argument_list", "N2"], 1], ["Move", "N1", ["identifier:name", 3, 23, 3, 27], 0], ["Insert", "N1", [".:.", "T"], 1], ["Insert", "N1", ["identifier:replace", "T"], 2], ["Insert", "N2", ["(:(", "T"], 0], ["Insert", "N2", ["string:\"'\"", "T"], 1], ["Insert", "N2", [",:,", "T"], 2], ["Insert", "N2", ["string:\"\"", "T"], 3], ["Insert", "N2", ["):)", "T"], 4]]
ahmadRagheb/movements-erpnext@23de6df72efe90dc58e087f907aaf85ea1135a5a
[fix] [minor] replace single quote in territory name while creating territories in setup control
[ { "sha": "5a1840436ee83deab25e3d3ddc03e882fdc5dabc", "filename": "setup/doctype/setup_control/setup_control.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/ahmadRagheb/movements-erpnext/blob/23de6df72efe90dc58e087f907aaf85ea1135a5a/setup%2Fdoctype%2Fsetup_control%2Fsetup_control.py", "raw_url": "https://github.com/ahmadRagheb/movements-erpnext/raw/23de6df72efe90dc58e087f907aaf85ea1135a5a/setup%2Fdoctype%2Fsetup_control%2Fsetup_control.py", "contents_url": "https://api.github.com/repos/ahmadRagheb/movements-erpnext/contents/setup%2Fdoctype%2Fsetup_control%2Fsetup_control.py?ref=23de6df72efe90dc58e087f907aaf85ea1135a5a", "patch": "@@ -256,7 +256,7 @@ def create_territories():\n \t\tif name and not webnotes.conn.exists(\"Territory\", name):\n \t\t\twebnotes.bean({\n \t\t\t\t\"doctype\": \"Territory\",\n-\t\t\t\t\"territory_name\": name,\n+\t\t\t\t\"territory_name\": name.replace(\"'\", \"\"),\n \t\t\t\t\"parent_territory\": root_territory,\n \t\t\t\t\"is_group\": \"No\"\n \t\t\t}).insert()" } ]
movements-erpnext
5f6022681b00235d6b702efa5232cdaf135312b4
af15a4a496f0699799a9df3d446372a4efb63f89
setup/doctype/email_digest/email_digest.py
https://github.com/ahmadRagheb/movements-erpnext
true
false
true
@@ -294,7 +294,7 @@ class DocType(DocListController): def get_calendar_events(self, user_id): from core.doctype.event.event import get_events - events = get_events(self.future_from_date, self.future_to_date) + events = get_events(self.future_from_date.strftime("%Y-%m-%d"), self.future_to_date.strftime("%Y-%m-%d")) html = "" if events:
events = get_events ( self . future_from_date , self . future_to_date )
events = get_events ( self . future_from_date . strftime ( "%Y-%m-%d" ) , self . future_to_date . strftime ( "%Y-%m-%d" ) )
SINGLE_STMT
[["Insert", ["argument_list", 3, 22, 3, 66], ["call", "N0"], 1], ["Insert", ["argument_list", 3, 22, 3, 66], ["call", "N1"], 4], ["Insert", ["argument_list", 3, 22, 3, 66], ["):)", "T"], 5], ["Insert", "N0", ["attribute", "N2"], 0], ["Insert", "N0", ["argument_list", "N3"], 1], ["Insert", "N1", ["attribute", "N4"], 0], ["Insert", "N1", ["argument_list", "N5"], 1], ["Move", "N2", ["attribute", 3, 23, 3, 44], 0], ["Insert", "N2", [".:.", "T"], 1], ["Insert", "N2", ["identifier:strftime", "T"], 2], ["Insert", "N3", ["(:(", "T"], 0], ["Insert", "N3", ["string:\"%Y-%m-%d\"", "T"], 1], ["Insert", "N3", ["):)", "T"], 2], ["Move", "N4", ["attribute", 3, 46, 3, 65], 0], ["Insert", "N4", [".:.", "T"], 1], ["Insert", "N4", ["identifier:strftime", "T"], 2], ["Insert", "N5", ["(:(", "T"], 0], ["Insert", "N5", ["string:\"%Y-%m-%d\"", "T"], 1], ["Move", "N5", ["):)", 3, 65, 3, 66], 2]]
ahmadRagheb/movements-erpnext@5f6022681b00235d6b702efa5232cdaf135312b4
[fix] [minor] email digest events fix
[ { "sha": "0354b50930ebc10c40d139d2d61a2ef5680b7ab7", "filename": "setup/doctype/email_digest/email_digest.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/ahmadRagheb/movements-erpnext/blob/5f6022681b00235d6b702efa5232cdaf135312b4/setup%2Fdoctype%2Femail_digest%2Femail_digest.py", "raw_url": "https://github.com/ahmadRagheb/movements-erpnext/raw/5f6022681b00235d6b702efa5232cdaf135312b4/setup%2Fdoctype%2Femail_digest%2Femail_digest.py", "contents_url": "https://api.github.com/repos/ahmadRagheb/movements-erpnext/contents/setup%2Fdoctype%2Femail_digest%2Femail_digest.py?ref=5f6022681b00235d6b702efa5232cdaf135312b4", "patch": "@@ -294,7 +294,7 @@ def get_new_projects(self):\n \t\t\n \tdef get_calendar_events(self, user_id):\n \t\tfrom core.doctype.event.event import get_events\n-\t\tevents = get_events(self.future_from_date, self.future_to_date)\n+\t\tevents = get_events(self.future_from_date.strftime(\"%Y-%m-%d\"), self.future_to_date.strftime(\"%Y-%m-%d\"))\n \t\t\n \t\thtml = \"\"\n \t\tif events:" } ]
movements-erpnext
4525a0b900018d05d62b41eb369b8023c9db1947
f90df7da02bdb2ae43e00a92c0064a76398354e8
accounts/doctype/gl_entry/gl_entry.py
https://github.com/ahmadRagheb/movements-erpnext
true
false
true
@@ -151,7 +151,7 @@ class DocType: balance = webnotes.conn.sql("""select sum(debit) - sum(credit) from `tabGL Entry` where account = %s and ifnull(is_cancelled, 'No') = 'No'""", self.doc.account) balance = account["debit_or_credit"] == "Debit" and \ - balance[0][0] or -1*balance[0][0] + flt(balance[0][0]) or -1*flt(balance[0][0]) if flt(balance) < 0: msgprint(_("Negative balance is not allowed for account ") + self.doc.account,
balance = account [ "debit_or_credit" ] == "Debit" and balance [ 0 ] [ 0 ] or - 1 * balance [ 0 ] [ 0 ]
balance = account [ "debit_or_credit" ] == "Debit" and flt ( balance [ 0 ] [ 0 ] ) or - 1 * flt ( balance [ 0 ] [ 0 ] )
SINGLE_STMT
[["Insert", ["boolean_operator", 2, 15, 3, 19], ["call", "N0"], 2], ["Insert", ["binary_operator", 3, 23, 3, 39], ["call", "N1"], 2], ["Insert", "N0", ["identifier:flt", "T"], 0], ["Insert", "N0", ["argument_list", "N2"], 1], ["Insert", "N1", ["identifier:flt", "T"], 0], ["Insert", "N1", ["argument_list", "N3"], 1], ["Insert", "N2", ["(:(", "T"], 0], ["Move", "N2", ["subscript", 3, 6, 3, 19], 1], ["Insert", "N2", ["):)", "T"], 2], ["Insert", "N3", ["(:(", "T"], 0], ["Move", "N3", ["subscript", 3, 26, 3, 39], 1], ["Insert", "N3", ["):)", "T"], 2]]
ahmadRagheb/movements-erpnext@4525a0b900018d05d62b41eb369b8023c9db1947
[fix] [minor] null value issue
[ { "sha": "60c37a40a2c15992800023b5c3c66309c8ee3b27", "filename": "accounts/doctype/gl_entry/gl_entry.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/ahmadRagheb/movements-erpnext/blob/4525a0b900018d05d62b41eb369b8023c9db1947/accounts%2Fdoctype%2Fgl_entry%2Fgl_entry.py", "raw_url": "https://github.com/ahmadRagheb/movements-erpnext/raw/4525a0b900018d05d62b41eb369b8023c9db1947/accounts%2Fdoctype%2Fgl_entry%2Fgl_entry.py", "contents_url": "https://api.github.com/repos/ahmadRagheb/movements-erpnext/contents/accounts%2Fdoctype%2Fgl_entry%2Fgl_entry.py?ref=4525a0b900018d05d62b41eb369b8023c9db1947", "patch": "@@ -151,7 +151,7 @@ def check_negative_balance(self, adv_adj):\n \t\t\t\tbalance = webnotes.conn.sql(\"\"\"select sum(debit) - sum(credit) from `tabGL Entry` \n \t\t\t\t\twhere account = %s and ifnull(is_cancelled, 'No') = 'No'\"\"\", self.doc.account)\n \t\t\t\tbalance = account[\"debit_or_credit\"] == \"Debit\" and \\\n-\t\t\t\t\tbalance[0][0] or -1*balance[0][0]\n+\t\t\t\t\tflt(balance[0][0]) or -1*flt(balance[0][0])\n \t\t\t\n \t\t\t\tif flt(balance) < 0:\n \t\t\t\t\tmsgprint(_(\"Negative balance is not allowed for account \") + self.doc.account, " } ]
movements-erpnext
d505940b182b6244bb1b46b4c0679c21cba9579e
801ea1d5a0a38f29902b796abac2ffe607696157
selling/doctype/sales_bom/sales_bom.py
https://github.com/ahmadRagheb/movements-erpnext
true
false
true
@@ -79,7 +79,7 @@ def get_new_item_code(doctype, txt, searchfield, start, page_len, filters): return webnotes.conn.sql("""select name, description from tabItem where is_stock_item="No" and is_sales_item="Yes" - and name not in (select name from `tabSales BOM`) and %s like "%s" + and name not in (select name from `tabSales BOM`) and %s like %s %s limit %s, %s""" % (searchfield, "%s", get_match_cond(doctype, searchfield),"%s", "%s"), ("%%%s%%" % txt, start, page_len)) \ No newline at end of file
return webnotes . conn . sql ( """select name, description from tabItem where is_stock_item="No" and is_sales_item="Yes" and name not in (select name from `tabSales BOM`) and %s like "%s" %s limit %s, %s""" % ( searchfield , "%s" , get_match_cond ( doctype , searchfield ) , "%s" , "%s" ) , ( "%%%s%%" % txt , start , page_len ) ) No newline at end of file
return webnotes . conn . sql ( """select name, description from tabItem where is_stock_item="No" and is_sales_item="Yes" and name not in (select name from `tabSales BOM`) and %s like %s %s limit %s, %s""" % ( searchfield , "%s" , get_match_cond ( doctype , searchfield ) , "%s" , "%s" ) , ( "%%%s%%" % txt , start , page_len ) ) No newline at end of file
CHANGE_BINARY_OPERAND
[["Update", ["string:\"\"\"select name, description from tabItem \n \t\twhere is_stock_item=\"No\" and is_sales_item=\"Yes\"\n \t\tand name not in (select name from `tabSales BOM`) and %s like \"%s\" \n \t\t%s limit %s, %s\"\"\"", 1, 27, 4, 21], "\"\"\"select name, description from tabItem \n \t\twhere is_stock_item=\"No\" and is_sales_item=\"Yes\"\n \t\tand name not in (select name from `tabSales BOM`) and %s like %s\n \t\t%s limit %s, %s\"\"\""]]
ahmadRagheb/movements-erpnext@d505940b182b6244bb1b46b4c0679c21cba9579e
[fix] [minor] [query] get sales bom item code
[ { "sha": "a6b123a3c32f69f24e2bc4017596aee2f22ef239", "filename": "selling/doctype/sales_bom/sales_bom.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/ahmadRagheb/movements-erpnext/blob/d505940b182b6244bb1b46b4c0679c21cba9579e/selling%2Fdoctype%2Fsales_bom%2Fsales_bom.py", "raw_url": "https://github.com/ahmadRagheb/movements-erpnext/raw/d505940b182b6244bb1b46b4c0679c21cba9579e/selling%2Fdoctype%2Fsales_bom%2Fsales_bom.py", "contents_url": "https://api.github.com/repos/ahmadRagheb/movements-erpnext/contents/selling%2Fdoctype%2Fsales_bom%2Fsales_bom.py?ref=d505940b182b6244bb1b46b4c0679c21cba9579e", "patch": "@@ -79,7 +79,7 @@ def get_new_item_code(doctype, txt, searchfield, start, page_len, filters):\n \n \treturn webnotes.conn.sql(\"\"\"select name, description from tabItem \n \t\twhere is_stock_item=\"No\" and is_sales_item=\"Yes\"\n-\t\tand name not in (select name from `tabSales BOM`) and %s like \"%s\" \n+\t\tand name not in (select name from `tabSales BOM`) and %s like %s\n \t\t%s limit %s, %s\"\"\" % (searchfield, \"%s\", \n \t\tget_match_cond(doctype, searchfield),\"%s\", \"%s\"), \n \t\t(\"%%%s%%\" % txt, start, page_len))\n\\ No newline at end of file" } ]
movements-erpnext
1107f20dd66d0557dee1461f4b9047baf9bc441e
74506ba0603bb4891092e1a7721fc06e8fe07fc8
selling/doctype/sales_common/sales_common.py
https://github.com/ahmadRagheb/movements-erpnext
true
false
false
@@ -8,7 +8,7 @@ from webnotes.utils import cint, cstr, flt from webnotes.model.doc import addchild from webnotes.model.bean import getlist from webnotes.model.code import get_obj -from webnotes import msgprint +from webnotes import msgprint, _ from setup.utils import get_company_currency get_value = webnotes.conn.get_value
from webnotes import msgprint
from webnotes import msgprint , _
SINGLE_STMT
[["Insert", ["import_from_statement", 3, 1, 3, 30], [",:,", "T"], 4], ["Insert", ["import_from_statement", 3, 1, 3, 30], ["dotted_name", "N0"], 5], ["Insert", "N0", ["identifier:_", "T"], 0]]
ahmadRagheb/movements-erpnext@1107f20dd66d0557dee1461f4b9047baf9bc441e
[fix] [minor] bug fixed _ imported
[ { "sha": "3c43c1ede702673a05e87650e1257d6a47ab5db8", "filename": "selling/doctype/sales_common/sales_common.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/ahmadRagheb/movements-erpnext/blob/1107f20dd66d0557dee1461f4b9047baf9bc441e/selling%2Fdoctype%2Fsales_common%2Fsales_common.py", "raw_url": "https://github.com/ahmadRagheb/movements-erpnext/raw/1107f20dd66d0557dee1461f4b9047baf9bc441e/selling%2Fdoctype%2Fsales_common%2Fsales_common.py", "contents_url": "https://api.github.com/repos/ahmadRagheb/movements-erpnext/contents/selling%2Fdoctype%2Fsales_common%2Fsales_common.py?ref=1107f20dd66d0557dee1461f4b9047baf9bc441e", "patch": "@@ -8,7 +8,7 @@\n from webnotes.model.doc import addchild\n from webnotes.model.bean import getlist\n from webnotes.model.code import get_obj\n-from webnotes import msgprint\n+from webnotes import msgprint, _\n from setup.utils import get_company_currency\n \n get_value = webnotes.conn.get_value" } ]
movements-erpnext
f71f5f55e51810e78ac0b3ecdb500c0e8d55686b
ceb4d309b529b464a062bdfce4a1979a0112ecca
stock/doctype/stock_ledger/stock_ledger.py
https://github.com/ahmadRagheb/movements-erpnext
true
false
true
@@ -118,7 +118,7 @@ class DocType: elif purpose == 'Sales Return': webnotes.conn.sql("update `tabSerial No` set status = 'Delivered', purchase_document_type = '', purchase_document_no = '' where name = '%s'" % serial_no) else: - webnotes.conn.sql("update `tabSerial No` set docstatus = 2, status = 'Not in Use', purchase_document_type = '', purchase_document_no = '', purchase_date = null, purchase_rate = 0, supplier = null, supplier_name = '', supplier_address = '', warehouse = '' where name = '%s'" % serial_no) + webnotes.conn.sql("update `tabSerial No` set docstatus = 2, status = 'Not in Use', purchase_document_type = '', purchase_document_no = '', purchase_date = null, purchase_rate = 0, supplier = null, supplier_name = '', address_display = '', warehouse = '' where name = '%s'" % serial_no) def check_serial_no_exists(self, serial_no, item_code):
else : webnotes . conn . sql ( "update `tabSerial No` set docstatus = 2, status = 'Not in Use', purchase_document_type = '', purchase_document_no = '', purchase_date = null, purchase_rate = 0, supplier = null, supplier_name = '', supplier_address = '', warehouse = '' where name = '%s'" % serial_no )
else : webnotes . conn . sql ( "update `tabSerial No` set docstatus = 2, status = 'Not in Use', purchase_document_type = '', purchase_document_no = '', purchase_date = null, purchase_rate = 0, supplier = null, supplier_name = '', address_display = '', warehouse = '' where name = '%s'" % serial_no )
CHANGE_BINARY_OPERAND
[["Update", ["string:\"update `tabSerial No` set docstatus = 2, status = 'Not in Use', purchase_document_type = '', purchase_document_no = '', purchase_date = null, purchase_rate = 0, supplier = null, supplier_name = '', supplier_address = '', warehouse = '' where name = '%s'\"", 3, 23, 3, 278], "\"update `tabSerial No` set docstatus = 2, status = 'Not in Use', purchase_document_type = '', purchase_document_no = '', purchase_date = null, purchase_rate = 0, supplier = null, supplier_name = '', address_display = '', warehouse = '' where name = '%s'\""]]
ahmadRagheb/movements-erpnext@f71f5f55e51810e78ac0b3ecdb500c0e8d55686b
[minor] [fix] update serial no details on cancelling of purchase receipt
[ { "sha": "0af18b965a36ded13e33393ba6c83d0c4fe23ec2", "filename": "stock/doctype/stock_ledger/stock_ledger.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/ahmadRagheb/movements-erpnext/blob/f71f5f55e51810e78ac0b3ecdb500c0e8d55686b/stock%2Fdoctype%2Fstock_ledger%2Fstock_ledger.py", "raw_url": "https://github.com/ahmadRagheb/movements-erpnext/raw/f71f5f55e51810e78ac0b3ecdb500c0e8d55686b/stock%2Fdoctype%2Fstock_ledger%2Fstock_ledger.py", "contents_url": "https://api.github.com/repos/ahmadRagheb/movements-erpnext/contents/stock%2Fdoctype%2Fstock_ledger%2Fstock_ledger.py?ref=f71f5f55e51810e78ac0b3ecdb500c0e8d55686b", "patch": "@@ -118,7 +118,7 @@ def update_serial_purchase_details(self, obj, d, serial_no, is_submit, purpose =\n \t\t\telif purpose == 'Sales Return':\n \t\t\t\twebnotes.conn.sql(\"update `tabSerial No` set status = 'Delivered', purchase_document_type = '', purchase_document_no = '' where name = '%s'\" % serial_no)\n \t\t\telse:\n-\t\t\t\twebnotes.conn.sql(\"update `tabSerial No` set docstatus = 2, status = 'Not in Use', purchase_document_type = '', purchase_document_no = '', purchase_date = null, purchase_rate = 0, supplier = null, supplier_name = '', supplier_address = '', warehouse = '' where name = '%s'\" % serial_no)\n+\t\t\t\twebnotes.conn.sql(\"update `tabSerial No` set docstatus = 2, status = 'Not in Use', purchase_document_type = '', purchase_document_no = '', purchase_date = null, purchase_rate = 0, supplier = null, supplier_name = '', address_display = '', warehouse = '' where name = '%s'\" % serial_no)\n \n \n \tdef check_serial_no_exists(self, serial_no, item_code):" } ]
movements-erpnext
b6084f1e78961b172404f7e3276a669e29205953
79251492fede460c4a929fc7dcd2cd05dac33dce
utilities/transaction_base.py
https://github.com/ahmadRagheb/movements-erpnext
true
false
true
@@ -77,7 +77,7 @@ class TransactionBase(StatusUpdater): customer_defaults = self.get_customer_defaults() - customer_defaults["price_list"] = customer_defaults.get("price_list") or \ + customer_defaults["price_list_name"] = customer_defaults.get("price_list") or \ webnotes.conn.get_value("Customer Group", self.doc.customer_group, "default_price_list") or \ self.doc.price_list
customer_defaults [ "price_list" ] = customer_defaults . get ( "price_list" ) or webnotes . conn . get_value ( "Customer Group" , self . doc . customer_group , "default_price_list" ) or self . doc . price_list
customer_defaults [ "price_list_name" ] = customer_defaults . get ( "price_list" ) or webnotes . conn . get_value ( "Customer Group" , self . doc . customer_group , "default_price_list" ) or self . doc . price_list
CHANGE_STRING_LITERAL
[["Update", ["string:\"price_list\"", 2, 21, 2, 33], "\"price_list_name\""]]
ahmadRagheb/movements-erpnext@b6084f1e78961b172404f7e3276a669e29205953
[fix] [minor] set customer defaults to fetch price list
[ { "sha": "987545c2222b718383f0ffd745787296fa4db2ce", "filename": "utilities/transaction_base.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/ahmadRagheb/movements-erpnext/blob/b6084f1e78961b172404f7e3276a669e29205953/utilities%2Ftransaction_base.py", "raw_url": "https://github.com/ahmadRagheb/movements-erpnext/raw/b6084f1e78961b172404f7e3276a669e29205953/utilities%2Ftransaction_base.py", "contents_url": "https://api.github.com/repos/ahmadRagheb/movements-erpnext/contents/utilities%2Ftransaction_base.py?ref=b6084f1e78961b172404f7e3276a669e29205953", "patch": "@@ -77,7 +77,7 @@ def set_customer_defaults(self):\n \t\t\"\"\"\n \t\tcustomer_defaults = self.get_customer_defaults()\n \t\t\t\t\t\n-\t\tcustomer_defaults[\"price_list\"] = customer_defaults.get(\"price_list\") or \\\n+\t\tcustomer_defaults[\"price_list_name\"] = customer_defaults.get(\"price_list\") or \\\n \t\t\twebnotes.conn.get_value(\"Customer Group\", self.doc.customer_group, \"default_price_list\") or \\\n \t\t\tself.doc.price_list\n \t\t\t" } ]
movements-erpnext
894341be720d7b0d6367fe24222b4ba274a5a239
3cb7cf497b9b94941153af84eb508ba1967037cd
patches/august_2013/p02_rename_price_list.py
https://github.com/ahmadRagheb/movements-erpnext
true
false
true
@@ -23,7 +23,7 @@ def execute(): if t[2] in table_columns and t[1] in table_columns: # already reloaded, so copy into new column and drop old column webnotes.conn.sql("""update `tab%s` set `%s`=`%s`""" % (t[0], t[2], t[1])) - webnotes.conn.sql("""alter table `tab%s` drop column `%s`""" % (t[0], t[1])) + webnotes.conn.sql_ddl("""alter table `tab%s` drop column `%s`""" % (t[0], t[1])) elif t[1] in table_columns: webnotes.conn.sql_ddl("alter table `tab%s` change `%s` `%s` varchar(180)" % t)
webnotes . conn . sql ( """alter table `tab%s` drop column `%s`""" % ( t [ 0 ] , t [ 1 ] ) )
webnotes . conn . sql_ddl ( """alter table `tab%s` drop column `%s`""" % ( t [ 0 ] , t [ 1 ] ) )
WRONG_FUNCTION_NAME
[["Update", ["identifier:sql", 3, 18, 3, 21], "sql_ddl"]]
ahmadRagheb/movements-erpnext@894341be720d7b0d6367fe24222b4ba274a5a239
[fix] [minor] price list rename patch
[ { "sha": "a49adb5b655097995bfd6af51d1707c4ad53b11d", "filename": "patches/august_2013/p02_rename_price_list.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/ahmadRagheb/movements-erpnext/blob/894341be720d7b0d6367fe24222b4ba274a5a239/patches%2Faugust_2013%2Fp02_rename_price_list.py", "raw_url": "https://github.com/ahmadRagheb/movements-erpnext/raw/894341be720d7b0d6367fe24222b4ba274a5a239/patches%2Faugust_2013%2Fp02_rename_price_list.py", "contents_url": "https://api.github.com/repos/ahmadRagheb/movements-erpnext/contents/patches%2Faugust_2013%2Fp02_rename_price_list.py?ref=894341be720d7b0d6367fe24222b4ba274a5a239", "patch": "@@ -23,7 +23,7 @@ def execute():\n \t\tif t[2] in table_columns and t[1] in table_columns:\n \t\t\t# already reloaded, so copy into new column and drop old column\n \t\t\twebnotes.conn.sql(\"\"\"update `tab%s` set `%s`=`%s`\"\"\" % (t[0], t[2], t[1]))\n-\t\t\twebnotes.conn.sql(\"\"\"alter table `tab%s` drop column `%s`\"\"\" % (t[0], t[1]))\n+\t\t\twebnotes.conn.sql_ddl(\"\"\"alter table `tab%s` drop column `%s`\"\"\" % (t[0], t[1]))\n \t\telif t[1] in table_columns:\n \t\t\twebnotes.conn.sql_ddl(\"alter table `tab%s` change `%s` `%s` varchar(180)\" % t)\n " } ]
movements-erpnext
328fc095a094a9eba55946c669ffb4f61522691a
77343391f54d6c3c25db4da131163461a52da4b8
stock/doctype/item/item.py
https://github.com/ahmadRagheb/movements-erpnext
true
false
true
@@ -272,4 +272,4 @@ class DocType(DocListController): from stock.stock_ledger import update_entries_after for wh in webnotes.conn.sql("""select warehouse from `tabBin` where item_code=%s""", newdn): - update_entries_after({"item_code": newdn, "warehouse": wh}) + update_entries_after({"item_code": newdn, "warehouse": wh[0]})
update_entries_after ( { "item_code" : newdn , "warehouse" : wh } )
update_entries_after ( { "item_code" : newdn , "warehouse" : wh [ 0 ] } )
SINGLE_STMT
[["Insert", ["pair", 3, 48, 3, 63], ["subscript", "N0"], 2], ["Move", "N0", ["identifier:wh", 3, 61, 3, 63], 0], ["Insert", "N0", ["[:[", "T"], 1], ["Insert", "N0", ["integer:0", "T"], 2], ["Insert", "N0", ["]:]", "T"], 3]]
ahmadRagheb/movements-erpnext@328fc095a094a9eba55946c669ffb4f61522691a
[fix] [minor] fixes in item merging
[ { "sha": "e6c277ee086fdc4523bf8e6a4e1233abc9730882", "filename": "stock/doctype/item/item.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/ahmadRagheb/movements-erpnext/blob/328fc095a094a9eba55946c669ffb4f61522691a/stock%2Fdoctype%2Fitem%2Fitem.py", "raw_url": "https://github.com/ahmadRagheb/movements-erpnext/raw/328fc095a094a9eba55946c669ffb4f61522691a/stock%2Fdoctype%2Fitem%2Fitem.py", "contents_url": "https://api.github.com/repos/ahmadRagheb/movements-erpnext/contents/stock%2Fdoctype%2Fitem%2Fitem.py?ref=328fc095a094a9eba55946c669ffb4f61522691a", "patch": "@@ -272,4 +272,4 @@ def on_rename(self, newdn, olddn, merge=False):\n \t\t\tfrom stock.stock_ledger import update_entries_after\n \t\t\tfor wh in webnotes.conn.sql(\"\"\"select warehouse from `tabBin` \n \t\t\t\twhere item_code=%s\"\"\", newdn):\n-\t\t\t\t\tupdate_entries_after({\"item_code\": newdn, \"warehouse\": wh})\n+\t\t\t\t\tupdate_entries_after({\"item_code\": newdn, \"warehouse\": wh[0]})" } ]
movements-erpnext
69f2cc8d24a2fd3aecb645f51fd74916f704c9ce
86102064a5d11ae83601755f0f0c5f23f7884e83
erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
https://github.com/ahmadRagheb/movements-erpnext
true
false
true
@@ -243,7 +243,7 @@ class StockReconciliation(StockController): @frappe.whitelist() def get_items(warehouse, posting_date, posting_time): items = frappe.get_list("Item", fields=["name"], filters= - {"is_stock_item": 1, "has_serial_no": 0, "has_batch_no": 0}) + {"is_stock_item": 1, "has_serial_no": 0, "has_batch_no": 0, "has_variants": 0}) for item in items: item.item_code = item.name item.warehouse = warehouse
items = frappe . get_list ( "Item" , fields = [ "name" ] , filters = { "is_stock_item" : 1 , "has_serial_no" : 0 , "has_batch_no" : 0 } )
items = frappe . get_list ( "Item" , fields = [ "name" ] , filters = { "is_stock_item" : 1 , "has_serial_no" : 0 , "has_batch_no" : 0 , "has_variants" : 0 } )
ADD_ELEMENTS_TO_ITERABLE
[["Insert", ["dictionary", 3, 3, 3, 62], [",:,", "T"], 6], ["Insert", ["dictionary", 3, 3, 3, 62], ["pair", "N0"], 7], ["Insert", "N0", ["string:\"has_variants\"", "T"], 0], ["Insert", "N0", [":::", "T"], 1], ["Insert", "N0", ["integer:0", "T"], 2]]
ahmadRagheb/movements-erpnext@69f2cc8d24a2fd3aecb645f51fd74916f704c9ce
[fix] don't fetch template item in get items of stock reconciliation
[ { "sha": "a275de5b277dba6953734608833ec720b9439869", "filename": "erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py", "status": "modified", "additions": 2, "deletions": 2, "changes": 4, "blob_url": "https://github.com/ahmadRagheb/movements-erpnext/blob/69f2cc8d24a2fd3aecb645f51fd74916f704c9ce/erpnext%2Fstock%2Fdoctype%2Fstock_reconciliation%2Fstock_reconciliation.py", "raw_url": "https://github.com/ahmadRagheb/movements-erpnext/raw/69f2cc8d24a2fd3aecb645f51fd74916f704c9ce/erpnext%2Fstock%2Fdoctype%2Fstock_reconciliation%2Fstock_reconciliation.py", "contents_url": "https://api.github.com/repos/ahmadRagheb/movements-erpnext/contents/erpnext%2Fstock%2Fdoctype%2Fstock_reconciliation%2Fstock_reconciliation.py?ref=69f2cc8d24a2fd3aecb645f51fd74916f704c9ce", "patch": "@@ -171,7 +171,7 @@ def update_stock_ledger(self):\n \t\t\tif row.qty and not row.valuation_rate:\n \t\t\t\tfrappe.throw(_(\"Valuation Rate required for Item {0}\").format(row.item_code))\n \n-\t\t\tif ((previous_sle and row.qty == previous_sle.get(\"qty_after_transaction\") \n+\t\t\tif ((previous_sle and row.qty == previous_sle.get(\"qty_after_transaction\")\n \t\t\t\tand row.valuation_rate == previous_sle.get(\"valuation_rate\"))\n \t\t\t\tor (not previous_sle and not row.qty)):\n \t\t\t\t\tcontinue\n@@ -243,7 +243,7 @@ def get_items_for(self, warehouse):\n @frappe.whitelist()\n def get_items(warehouse, posting_date, posting_time):\n \titems = frappe.get_list(\"Item\", fields=[\"name\"], filters=\n-\t\t{\"is_stock_item\": 1, \"has_serial_no\": 0, \"has_batch_no\": 0})\n+\t\t{\"is_stock_item\": 1, \"has_serial_no\": 0, \"has_batch_no\": 0, \"has_variants\": 0})\n \tfor item in items:\n \t\titem.item_code = item.name\n \t\titem.warehouse = warehouse" } ]
movements-erpnext
cba5a684cb7d77fdd8d0747ea8f27d986e01d0e5
340709b2dac9ef810f0025c67e665f471f03ea69
erpnext/patches/v6_0/multi_currency.py
https://github.com/ahmadRagheb/movements-erpnext
true
false
true
@@ -66,7 +66,7 @@ def execute(): # Set party account if default currency of party other than company's default currency for dt in ("Customer", "Supplier"): - parties = frappe.get_all(dt) + parties = frappe.get_all(dt, filters={"docstatus": 0}) for p in parties: party = frappe.get_doc(dt, p.name) party_accounts = []
parties = frappe . get_all ( dt )
parties = frappe . get_all ( dt , filters = { "docstatus" : 0 } )
SAME_FUNCTION_MORE_ARGS
[["Insert", ["argument_list", 3, 27, 3, 31], [",:,", "T"], 2], ["Insert", ["argument_list", 3, 27, 3, 31], ["keyword_argument", "N0"], 3], ["Insert", "N0", ["identifier:filters", "T"], 0], ["Insert", "N0", ["=:=", "T"], 1], ["Insert", "N0", ["dictionary", "N1"], 2], ["Insert", "N1", ["{:{", "T"], 0], ["Insert", "N1", ["pair", "N2"], 1], ["Insert", "N1", ["}:}", "T"], 2], ["Insert", "N2", ["string:\"docstatus\"", "T"], 0], ["Insert", "N2", [":::", "T"], 1], ["Insert", "N2", ["integer:0", "T"], 2]]
ahmadRagheb/movements-erpnext@cba5a684cb7d77fdd8d0747ea8f27d986e01d0e5
[hotfix] multicurrency patch
[ { "sha": "242df94258b48bf45b775b08501a4d3245ff346f", "filename": "erpnext/patches/v6_0/multi_currency.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/ahmadRagheb/movements-erpnext/blob/cba5a684cb7d77fdd8d0747ea8f27d986e01d0e5/erpnext%2Fpatches%2Fv6_0%2Fmulti_currency.py", "raw_url": "https://github.com/ahmadRagheb/movements-erpnext/raw/cba5a684cb7d77fdd8d0747ea8f27d986e01d0e5/erpnext%2Fpatches%2Fv6_0%2Fmulti_currency.py", "contents_url": "https://api.github.com/repos/ahmadRagheb/movements-erpnext/contents/erpnext%2Fpatches%2Fv6_0%2Fmulti_currency.py?ref=cba5a684cb7d77fdd8d0747ea8f27d986e01d0e5", "patch": "@@ -66,7 +66,7 @@ def execute():\n \n \t# Set party account if default currency of party other than company's default currency\n \tfor dt in (\"Customer\", \"Supplier\"):\n-\t\tparties = frappe.get_all(dt)\n+\t\tparties = frappe.get_all(dt, filters={\"docstatus\": 0})\n \t\tfor p in parties:\n \t\t\tparty = frappe.get_doc(dt, p.name)\n \t\t\tparty_accounts = []" } ]
movements-erpnext
ba0bf9e13dbbb0e473a5eb19b35f202784b74f03
c439b87ccc78ed44594738648524a6df2019c4f3
erpnext/patches/v6_0/multi_currency.py
https://github.com/ahmadRagheb/movements-erpnext
true
false
true
@@ -66,7 +66,7 @@ def execute(): # Set party account if default currency of party other than company's default currency for dt in ("Customer", "Supplier"): - parties = frappe.get_all(dt) + parties = frappe.get_all(dt, filters={"docstatus": 0}) for p in parties: party = frappe.get_doc(dt, p.name) party_accounts = []
parties = frappe . get_all ( dt )
parties = frappe . get_all ( dt , filters = { "docstatus" : 0 } )
SAME_FUNCTION_MORE_ARGS
[["Insert", ["argument_list", 3, 27, 3, 31], [",:,", "T"], 2], ["Insert", ["argument_list", 3, 27, 3, 31], ["keyword_argument", "N0"], 3], ["Insert", "N0", ["identifier:filters", "T"], 0], ["Insert", "N0", ["=:=", "T"], 1], ["Insert", "N0", ["dictionary", "N1"], 2], ["Insert", "N1", ["{:{", "T"], 0], ["Insert", "N1", ["pair", "N2"], 1], ["Insert", "N1", ["}:}", "T"], 2], ["Insert", "N2", ["string:\"docstatus\"", "T"], 0], ["Insert", "N2", [":::", "T"], 1], ["Insert", "N2", ["integer:0", "T"], 2]]
ahmadRagheb/movements-erpnext@ba0bf9e13dbbb0e473a5eb19b35f202784b74f03
[hotfix] multicurrency patch
[ { "sha": "242df94258b48bf45b775b08501a4d3245ff346f", "filename": "erpnext/patches/v6_0/multi_currency.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/ahmadRagheb/movements-erpnext/blob/ba0bf9e13dbbb0e473a5eb19b35f202784b74f03/erpnext%2Fpatches%2Fv6_0%2Fmulti_currency.py", "raw_url": "https://github.com/ahmadRagheb/movements-erpnext/raw/ba0bf9e13dbbb0e473a5eb19b35f202784b74f03/erpnext%2Fpatches%2Fv6_0%2Fmulti_currency.py", "contents_url": "https://api.github.com/repos/ahmadRagheb/movements-erpnext/contents/erpnext%2Fpatches%2Fv6_0%2Fmulti_currency.py?ref=ba0bf9e13dbbb0e473a5eb19b35f202784b74f03", "patch": "@@ -66,7 +66,7 @@ def execute():\n \n \t# Set party account if default currency of party other than company's default currency\n \tfor dt in (\"Customer\", \"Supplier\"):\n-\t\tparties = frappe.get_all(dt)\n+\t\tparties = frappe.get_all(dt, filters={\"docstatus\": 0})\n \t\tfor p in parties:\n \t\t\tparty = frappe.get_doc(dt, p.name)\n \t\t\tparty_accounts = []" } ]
movements-erpnext
b3f12c31090db2912ab886909e91c73718f5cd47
f66e6aacd42182684a4a2e0311f8a88a38f0be32
erpnext/patches/v6_3/convert_applicable_territory.py
https://github.com/ahmadRagheb/movements-erpnext
true
false
true
@@ -1,7 +1,7 @@ import frappe def execute(): - frappe.reload_doctype("Price List Country") + frappe.reload_doc("stock", "doctype", "price_list_country") frappe.reload_doctype("Price List") frappe.reload_doctype("Shipping Rule")
frappe . reload_doctype ( "Price List Country" )
frappe . reload_doc ( "stock" , "doctype" , "price_list_country" )
SINGLE_STMT
[["Update", ["identifier:reload_doctype", 3, 9, 3, 23], "reload_doc"], ["Update", ["string:\"Price List Country\"", 3, 24, 3, 44], "\"stock\""], ["Insert", ["argument_list", 3, 23, 3, 45], [",:,", "T"], 2], ["Insert", ["argument_list", 3, 23, 3, 45], ["string:\"doctype\"", "T"], 3], ["Insert", ["argument_list", 3, 23, 3, 45], [",:,", "T"], 4], ["Insert", ["argument_list", 3, 23, 3, 45], ["string:\"price_list_country\"", "T"], 5]]
ahmadRagheb/movements-erpnext@b3f12c31090db2912ab886909e91c73718f5cd47
[fix] [patch] convert_applicable_territory
[ { "sha": "74a8b8cffd3ca9bee7280dc21d576e48016850f7", "filename": "erpnext/patches/v6_3/convert_applicable_territory.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/ahmadRagheb/movements-erpnext/blob/b3f12c31090db2912ab886909e91c73718f5cd47/erpnext%2Fpatches%2Fv6_3%2Fconvert_applicable_territory.py", "raw_url": "https://github.com/ahmadRagheb/movements-erpnext/raw/b3f12c31090db2912ab886909e91c73718f5cd47/erpnext%2Fpatches%2Fv6_3%2Fconvert_applicable_territory.py", "contents_url": "https://api.github.com/repos/ahmadRagheb/movements-erpnext/contents/erpnext%2Fpatches%2Fv6_3%2Fconvert_applicable_territory.py?ref=b3f12c31090db2912ab886909e91c73718f5cd47", "patch": "@@ -1,7 +1,7 @@\n import frappe\n \n def execute():\n-\tfrappe.reload_doctype(\"Price List Country\")\n+\tfrappe.reload_doc(\"stock\", \"doctype\", \"price_list_country\")\n \tfrappe.reload_doctype(\"Price List\")\n \tfrappe.reload_doctype(\"Shipping Rule\")\n " } ]
movements-erpnext
953e97536a3e0c6d1ebc17770ea38358839b62be
e74d7ca33e514db7ad491736fb8193f7c53d7216
erpnext/patches/v5_8/tax_rule.py
https://github.com/ahmadRagheb/movements-erpnext
true
false
true
@@ -5,7 +5,7 @@ from __future__ import unicode_literals import frappe def execute(): - frappe.reload_doc("account", "doctype", "tax_rule") + frappe.reload_doc("accounts", "doctype", "tax_rule") customers = frappe.db.sql("""select name, default_taxes_and_charges from tabCustomer where ifnull(default_taxes_and_charges, '') != '' """, as_dict=1)
frappe . reload_doc ( "account" , "doctype" , "tax_rule" )
frappe . reload_doc ( "accounts" , "doctype" , "tax_rule" )
CHANGE_STRING_LITERAL
[["Update", ["string:\"account\"", 3, 20, 3, 29], "\"accounts\""]]
ahmadRagheb/movements-erpnext@953e97536a3e0c6d1ebc17770ea38358839b62be
[fix] [patch] tax rule
[ { "sha": "80a236429352ceef3033b633700c3fd470113f5e", "filename": "erpnext/patches/v5_8/tax_rule.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/ahmadRagheb/movements-erpnext/blob/953e97536a3e0c6d1ebc17770ea38358839b62be/erpnext%2Fpatches%2Fv5_8%2Ftax_rule.py", "raw_url": "https://github.com/ahmadRagheb/movements-erpnext/raw/953e97536a3e0c6d1ebc17770ea38358839b62be/erpnext%2Fpatches%2Fv5_8%2Ftax_rule.py", "contents_url": "https://api.github.com/repos/ahmadRagheb/movements-erpnext/contents/erpnext%2Fpatches%2Fv5_8%2Ftax_rule.py?ref=953e97536a3e0c6d1ebc17770ea38358839b62be", "patch": "@@ -5,7 +5,7 @@\n import frappe\n \n def execute():\n-\tfrappe.reload_doc(\"account\", \"doctype\", \"tax_rule\")\n+\tfrappe.reload_doc(\"accounts\", \"doctype\", \"tax_rule\")\n \n \tcustomers = frappe.db.sql(\"\"\"select name, default_taxes_and_charges from tabCustomer where\n \t\tifnull(default_taxes_and_charges, '') != '' \"\"\", as_dict=1)" } ]
movements-erpnext
54ecc8ebba614d981dcb039dc429834a482108d2
0bc3ca02f3067d589eccca36e839aa70c5965f1e
erpnext/selling/doctype/customer/customer.py
https://github.com/ahmadRagheb/movements-erpnext
true
false
true
@@ -212,7 +212,7 @@ def get_customer_outstanding(customer, company): - if flt(dn_item.amount) > flt(si_amount): + if flt(dn_item.amount) > flt(si_amount) and dn_item.base_net_total: outstanding_based_on_dn += ((flt(dn_item.amount) - flt(si_amount)) \ / dn_item.base_net_total) * dn_item.base_grand_total
if flt ( dn_item . amount ) > flt ( si_amount ) : outstanding_based_on_dn += ( ( flt ( dn_item . amount ) - flt ( si_amount ) ) / dn_item . base_net_total ) * dn_item . base_grand_total
if flt ( dn_item . amount ) > flt ( si_amount ) and dn_item . base_net_total : outstanding_based_on_dn += ( ( flt ( dn_item . amount ) - flt ( si_amount ) ) / dn_item . base_net_total ) * dn_item . base_grand_total
MORE_SPECIFIC_IF
[["Insert", ["if_statement", 1, 3, 3, 57], ["boolean_operator", "N0"], 1], ["Move", "N0", ["comparison_operator", 1, 6, 1, 42], 0], ["Insert", "N0", ["and:and", "T"], 1], ["Insert", "N0", ["attribute", "N1"], 2], ["Insert", "N1", ["identifier:dn_item", "T"], 0], ["Insert", "N1", [".:.", "T"], 1], ["Insert", "N1", ["identifier:base_net_total", "T"], 2]]
ahmadRagheb/movements-erpnext@54ecc8ebba614d981dcb039dc429834a482108d2
minor fix in credit limit
[ { "sha": "21f6578df45d9ae34e76415ff11dc8033d90221f", "filename": "erpnext/selling/doctype/customer/customer.py", "status": "modified", "additions": 1, "deletions": 1, "changes": 2, "blob_url": "https://github.com/ahmadRagheb/movements-erpnext/blob/54ecc8ebba614d981dcb039dc429834a482108d2/erpnext%2Fselling%2Fdoctype%2Fcustomer%2Fcustomer.py", "raw_url": "https://github.com/ahmadRagheb/movements-erpnext/raw/54ecc8ebba614d981dcb039dc429834a482108d2/erpnext%2Fselling%2Fdoctype%2Fcustomer%2Fcustomer.py", "contents_url": "https://api.github.com/repos/ahmadRagheb/movements-erpnext/contents/erpnext%2Fselling%2Fdoctype%2Fcustomer%2Fcustomer.py?ref=54ecc8ebba614d981dcb039dc429834a482108d2", "patch": "@@ -212,7 +212,7 @@ def get_customer_outstanding(customer, company):\n \t\t\tfrom `tabSales Invoice Item`\n \t\t\twhere dn_detail = %s and docstatus = 1\"\"\", dn_item.name)[0][0]\n \n-\t\tif flt(dn_item.amount) > flt(si_amount):\n+\t\tif flt(dn_item.amount) > flt(si_amount) and dn_item.base_net_total:\n \t\t\toutstanding_based_on_dn += ((flt(dn_item.amount) - flt(si_amount)) \\\n \t\t\t\t/ dn_item.base_net_total) * dn_item.base_grand_total\n " } ]